Skip to content

Commit

Permalink
Merge From org/master
Browse files Browse the repository at this point in the history
* 🐛  Fix Initializing the connection to the local database hang (actualbudget#4375)

* fix initializing to the local db

* release notes

* Add percentage adjustments to schedule templates (actualbudget#4098) (actualbudget#4257)

* add percentage adjustments to schedule templates

* update release note

* remove unecessary parentheses

* Update packages/loot-core/src/server/budget/goalsSchedule.ts

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* PR comments addressed

* Linting fixes

* Updated error handling, added tests

* Linting fixes

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Custom mapping and import settings for bank sync providers (actualbudget#4253)

* barebones UI

* add saving and prefs

* add last sync functionality

* use mapping for synced transactions

* note

* jest -u

* Update VRT

* Coderabbit

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* add new fields

* rename migration, newer in master

* lint

* coderabbit

* update snapshots

* GoCardless handlers fallback and notes

* expose new fields from SimpleFIN

* update tests

* update instructions on GoCardless handlers

* lint

* feedback

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>

* Add fallback value for payeename: 'undefined' - CBC Bank (actualbudget#4384)

* Add fallback value for payename: 'undefined'

* docs: add release note

* Add fallback value for payename: 'undefined' (for negative amounts)

* [TypeScript] Convert test page models to TS (actualbudget#4218)

* Dummy commit

* Delete js snapshots

* Move extended expect and test to fixtures

* Fix wrong commit

* Update VRT

* Dummy commit to run GH actions

* Convert test page models to TS

* Release notes

* Fix typecheck errors

* New page models to TS

* Fix typecheck error

* Fix page name

* Put awaits on getTableTotals

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* rename two migrations to realign with convention (actualbudget#4343)

* Updating sync server package name to @actual-app/sync-server (actualbudget#4370)

* updating sync server to have a consistent package name

* release notes

* Add today button on mobile budget page (actualbudget#4380)

* feat: today button on mobile budget page

Jumps to the current month

* add release note

* cleaner onCurrentMonth

* Update VRT

* use SvgCalendar from icons/v2

Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>

* Development mode for sync server (React Fast Refresh on port 5006) (actualbudget#4372)

* devmode for sync server

* removed pluggy from this version

* md

* code review

* changed how open browser

* missed this

* linter

* trigger actions

* 🐛 Fix: Error rate limit at user directory page (actualbudget#4397)

* Error rate limit

* md

* 🐛 Fix new proxy middleware dependency missing on prod build (actualbudget#4400)

* fix new proxy middleware not installed on prod build

* release notes

* Remove deprecated imports for several components (actualbudget#4385)

* don't unbudget goals

* lint

* Fixes actualbudget#4069 : Ignore CSV inOutMode during OFX imports (actualbudget#4382)

* Ignore inOutMode during OFX imports

* Add release notes

---------

Co-authored-by: youngcw <calebyoung94@gmail.com>

* fix tooltip translation (actualbudget#4402)

* [TypeScript] Make `db.runQuery` generic to make it easy to type DB query results (actualbudget#4247)

* Make runQuery generic to make it easy to type DB query results.

* Release notes

* typo

* update mapping data for existing synced transactions and always show direction dropdown (actualbudget#4403)

* update sync mapping data for existing transactions on sync

* show payment direction dropdown regardless of sample data

* note

* ignore changes in raw_synced_data

* Fix top-level types of `send` function (actualbudget#4145)

* Add release notes

* Fix types of `send` function

* Fix `send` types in a number of places

* PR feedback

* Foundations for the budget automations UI (actualbudget#4308)

* Foundations for the budget automations UI

* Coderabbit

* Fix react-hooks/exhaustive-deps error on useSelected.tsx (actualbudget#4258)

* Fix react-hooks/exhaustive-deps error on useSelected.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on usePayees.ts (actualbudget#4260)

* Fix react-hooks/exhaustive-deps error on usePayees.ts

* Rename

* Release notes

* Fix react-hooks/exhaustive-deps error on useAccounts.ts (actualbudget#4262)

* Fix react-hooks/exhaustive-deps error on useAccounts.ts

* Release notes

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx (actualbudget#4273)

* Fix react-hooks/exhaustive-deps error on Titlebar.tsx

* Release notes

* [WIP] BANKS_WITH_LIMITED_HISTORY constant update (actualbudget#4388)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx (actualbudget#4259)

* Fix react-hooks/exhaustive-deps error on useProperFocus.tsx

* Remove comment in eslint config

* Release notes

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx (actualbudget#4268)

* Fix react-hooks/exhaustive-deps error on TransactionsTable.jsx

* Release notes

* Fix lint

* Fix react-hooks/exhaustive-deps error on table.tsx (actualbudget#4274)

* Fix react-hooks/exhaustive-deps error on table.tsx

* Release notes

* Fix react-hooks/exhaustive-deps error on useCategories.ts (actualbudget#4261)

* Fix react-hooks/exhaustive-deps error on useCategories.ts

* Release notes

* 👷 Typescript: Improving typing of asyncStorage (global-store.json) (actualbudget#4369)

* typing globalprefs

* adding release notes

* unneeded partial

* removing prop that crept in

* 📚 Translation batch #1 (actualbudget#4408)

* Translation batch

* md

* Update packages/desktop-client/src/components/settings/Export.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix code review from coderabbit

* code review

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Fix currencyToAmount incorrectly converting input (actualbudget#4383)

* fix: ensure currencyToAmount works regardless of the configured number format

* chore: linting

* docs: add release note

* test: ensure correct amount is entered for debit when adding split transactions

* chore: rename variable thousandsSep to thousandsSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename variable decimalSep to decimalSeparator

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* chore: rename decimalSep and thousandsSep variables to decimalSeparator and thousandsSeparator

---------

Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>

* useDisplayPayee hook to unify payee names in mobile and desktop. (actualbudget#4213)

* useDisplayPayee hook to unify payee logic in mobile and desktop

* Release notes

* Fix typecheck errors

* Fix test

* Update test

* Revert (No payee) color

* Fix tests

* VRT

* Fix category transactions

* Fix lint and VRT

* Update VRT

* Translate

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Extract transaction related server handlers from `main.ts` to `server/transactions/app.ts` (actualbudget#4221)

* Move transaction related handlers to server/transactions folder and use the new convention

* Fix lint and typecheck

* Release notes

* Update handler names

* Move get-earliest-transaction

* Update release notes

* Fix tests

* Fix types

* Fix lint

* Update snapshot

* Remove duplicate parse-file.ts

* Fix lint

* 🐛 Fix `On budget` / `Off budget` underline with translated languages (actualbudget#4417)

* Fix `On budget` / `Off budget` underline

* md

* ajuste para o merge

---------

Co-authored-by: Michael Clark <5285928+MikesGlitch@users.noreply.github.com>
Co-authored-by: Matt Farrell <10377148+MattFaz@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: youngcw <calebyoung94@gmail.com>
Co-authored-by: Matt Fiddaman <github@m.fiddaman.uk>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Michotte <55855805+MMichotte@users.noreply.github.com>
Co-authored-by: Joel Jeremy Marquez <joeljeremy.marquez@gmail.com>
Co-authored-by: Adam Stück <adam@adast.dk>
Co-authored-by: Alberto Cortina Eduarte <albertocortina96@gmail.com>
Co-authored-by: Gabriel J. Michael <gabriel.j.michael@gmail.com>
Co-authored-by: Julian Dominguez-Schatz <julian.dominguezschatz@gmail.com>
Co-authored-by: Michał Gołąb <23549913+michalgolab@users.noreply.github.com>
Co-authored-by: Antoine Taillard <an.taillard@gmail.com>
  • Loading branch information
15 people authored Feb 20, 2025
1 parent e8533c9 commit 1ecfc78
Show file tree
Hide file tree
Showing 606 changed files with 5,014 additions and 2,534 deletions.
13 changes: 0 additions & 13 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -790,20 +790,7 @@ export default [
'packages/desktop-client/src/components/sidebar/Tools.tsx',
'packages/desktop-client/src/components/sort.tsx',
'packages/desktop-client/src/components/spreadsheet/useSheetValue.ts',
'packages/desktop-client/src/components/table.tsx',
'packages/desktop-client/src/components/Titlebar.tsx',
'packages/desktop-client/src/components/transactions/MobileTransaction.jsx',
'packages/desktop-client/src/components/transactions/SelectedTransactions.jsx',
'packages/desktop-client/src/components/transactions/SimpleTransactionsTable.jsx',
'packages/desktop-client/src/components/transactions/TransactionList.jsx',
'packages/desktop-client/src/components/transactions/TransactionsTable.jsx',
'packages/desktop-client/src/components/transactions/TransactionsTable.test.jsx',
'packages/desktop-client/src/hooks/useAccounts.ts',
'packages/desktop-client/src/hooks/useCategories.ts',
'packages/desktop-client/src/hooks/usePayees.ts',
'packages/desktop-client/src/hooks/useProperFocus.tsx',
'packages/desktop-client/src/hooks/useSelected.tsx',
'packages/loot-core/src/client/query-hooks.tsx',
],

rules: {
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
},
"scripts": {
"start": "yarn start:browser",
"start:server": "yarn workspace actual-sync start",
"start:server": "yarn workspace @actual-app/sync-server start",
"start:server-monitor": "yarn workspace @actual-app/sync-server start-monitor",
"start:server-dev": "NODE_ENV=development BROWSER_OPEN=localhost:5006 yarn npm-run-all --parallel 'start:server-monitor' 'start'",
"start:desktop": "yarn rebuild-electron && npm-run-all --parallel 'start:desktop-*'",
"start:desktop-node": "yarn workspace loot-core watch:node",
"start:desktop-client": "yarn workspace @actual-app/web watch",
Expand All @@ -41,7 +43,7 @@
"rebuild-node": "yarn workspace loot-core rebuild",
"lint": "eslint . --max-warnings 0",
"lint:verbose": "DEBUG=eslint:cli-engine eslint . --max-warnings 0",
"install:server": "yarn workspaces focus actual-sync --production",
"install:server": "yarn workspaces focus @actual-app/sync-server --production",
"typecheck": "yarn tsc && tsc-strict",
"jq": "./node_modules/node-jq/bin/jq",
"prepare": "husky"
Expand Down
6 changes: 6 additions & 0 deletions packages/component-library/src/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,10 @@ export const styles: Record<string, any> = {
lightScrollbar: null as CSSProperties | null,
darkScrollbar: null as CSSProperties | null,
scrollbarWidth: null as number | null,
editorPill: {
color: theme.pillText,
backgroundColor: theme.pillBackground,
borderRadius: 4,
padding: '3px 5px',
},
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions packages/desktop-client/e2e/budget.mobile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ async function setBudgetAverage(
await budgetPage.goToPreviousMonth();
const spentButton = await budgetPage.getButtonForSpent(categoryName);
const spent = await spentButton.textContent();
if (!spent) {
throw new Error('Failed to get spent amount');
}
totalSpent += currencyToAmount(spent) ?? 0;
}

Expand Down Expand Up @@ -280,6 +283,10 @@ budgetTypes.forEach(budgetType => {

const lastMonthBudget = await budgetedButton.textContent();

if (!lastMonthBudget) {
throw new Error('Failed to get last month budget');
}

await budgetPage.goToNextMonth();

await copyLastMonthBudget(budgetPage, categoryName);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
import { type Locator, type Page } from '@playwright/test';

import { CloseAccountModal } from './close-account-modal';

type TransactionEntry = {
debit?: string;
credit?: string;
account?: string;
payee?: string;
notes?: string;
category?: string;
};

export class AccountPage {
constructor(page) {
readonly page: Page;
readonly accountName: Locator;
readonly accountBalance: Locator;
readonly addNewTransactionButton: Locator;
readonly newTransactionRow: Locator;
readonly addTransactionButton: Locator;
readonly cancelTransactionButton: Locator;
readonly accountMenuButton: Locator;
readonly transactionTable: Locator;
readonly transactionTableRow: Locator;
readonly filterButton: Locator;
readonly filterSelectTooltip: Locator;
readonly selectButton: Locator;
readonly selectTooltip: Locator;

constructor(page: Page) {
this.page = page;

this.accountName = this.page.getByTestId('account-name');
Expand Down Expand Up @@ -30,14 +56,14 @@ export class AccountPage {
this.selectTooltip = this.page.getByTestId('transactions-select-tooltip');
}

async waitFor() {
await this.transactionTable.waitFor();
async waitFor(...options: Parameters<Locator['waitFor']>) {
await this.transactionTable.waitFor(...options);
}

/**
* Enter details of a transaction
*/
async enterSingleTransaction(transaction) {
async enterSingleTransaction(transaction: TransactionEntry) {
await this.addNewTransactionButton.click();
await this._fillTransactionFields(this.newTransactionRow, transaction);
}
Expand All @@ -53,15 +79,18 @@ export class AccountPage {
/**
* Create a single transaction
*/
async createSingleTransaction(transaction) {
async createSingleTransaction(transaction: TransactionEntry) {
await this.enterSingleTransaction(transaction);
await this.addEnteredTransaction();
}

/**
* Create split transactions
*/
async createSplitTransaction([rootTransaction, ...transactions]) {
async createSplitTransaction([
rootTransaction,
...transactions
]: TransactionEntry[]) {
await this.addNewTransactionButton.click();

// Root transaction
Expand All @@ -87,7 +116,7 @@ export class AccountPage {
await this.cancelTransactionButton.click();
}

async selectNthTransaction(index) {
async selectNthTransaction(index: number) {
const row = this.transactionTableRow.nth(index);
await row.getByTestId('select').click();
}
Expand All @@ -96,7 +125,7 @@ export class AccountPage {
* Retrieve the data for the nth-transaction.
* 0-based index
*/
getNthTransaction(index) {
getNthTransaction(index: number) {
const row = this.transactionTableRow.nth(index);

return this._getTransactionDetails(row);
Expand All @@ -106,11 +135,9 @@ export class AccountPage {
return this._getTransactionDetails(this.newTransactionRow);
}

_getTransactionDetails(row) {
const account = row.getByTestId('account');

_getTransactionDetails(row: Locator) {
return {
...(account ? { account } : {}),
account: row.getByTestId('account'),
payee: row.getByTestId('payee'),
notes: row.getByTestId('notes'),
category: row.getByTestId('category'),
Expand All @@ -119,7 +146,7 @@ export class AccountPage {
};
}

async clickSelectAction(action) {
async clickSelectAction(action: string | RegExp) {
await this.selectButton.click();
await this.selectTooltip.getByRole('button', { name: action }).click();
}
Expand All @@ -130,16 +157,13 @@ export class AccountPage {
async clickCloseAccount() {
await this.accountMenuButton.click();
await this.page.getByRole('button', { name: 'Close Account' }).click();
return new CloseAccountModal(
this.page,
this.page.getByTestId('close-account-modal'),
);
return new CloseAccountModal(this.page.getByTestId('close-account-modal'));
}

/**
* Open the filtering popover.
*/
async filterBy(field) {
async filterBy(field: string | RegExp) {
await this.filterButton.click();
await this.filterSelectTooltip.getByRole('button', { name: field }).click();

Expand All @@ -149,7 +173,7 @@ export class AccountPage {
/**
* Filter to a specific note
*/
async filterByNote(note) {
async filterByNote(note: string) {
const filterTooltip = await this.filterBy('Note');
await this.page.keyboard.type(note);
await filterTooltip.applyButton.click();
Expand All @@ -158,16 +182,20 @@ export class AccountPage {
/**
* Remove the nth filter
*/
async removeFilter(idx) {
async removeFilter(idx: number) {
await this.page
.getByRole('button', { name: 'Delete filter' })
.nth(idx)
.click();
}

async _fillTransactionFields(transactionRow, transaction) {
async _fillTransactionFields(
transactionRow: Locator,
transaction: TransactionEntry,
) {
if (transaction.debit) {
await transactionRow.getByTestId('debit').click();
// double click to ensure the content is selected when adding split transactions
await transactionRow.getByTestId('debit').dblclick();
await this.page.keyboard.type(transaction.debit);
await this.page.keyboard.press('Tab');
}
Expand Down Expand Up @@ -210,8 +238,11 @@ export class AccountPage {
}

class FilterTooltip {
constructor(page) {
this.page = page;
this.applyButton = page.getByRole('button', { name: 'Apply' });
readonly locator: Locator;
readonly applyButton: Locator;

constructor(locator: Locator) {
this.locator = locator;
this.applyButton = locator.getByRole('button', { name: 'Apply' });
}
}
89 changes: 0 additions & 89 deletions packages/desktop-client/e2e/page-models/budget-page.js

This file was deleted.

Loading

0 comments on commit 1ecfc78

Please sign in to comment.