Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lelemm committed Sep 4, 2024
1 parent 622c470 commit e315330
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions packages/desktop-client/e2e/accounts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ test.describe('Accounts', () => {
balance: 100,
});

const transaction = accountPage.getNthTransaction(1); //jump header line
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Starting Balance');
await expect(transaction.notes).toHaveText('');
await expect(transaction.category).toHaveText('Starting Balances');
Expand Down Expand Up @@ -86,13 +86,13 @@ test.describe('Accounts', () => {
await accountPage.selectNthTransaction(1);
await accountPage.clickSelectAction('Make transfer');

let transaction = accountPage.getNthTransaction(1); //jump header line
let transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Ally Savings');
await expect(transaction.category).toHaveText('Transfer');
await expect(transaction.credit).toHaveText('34.56');
await expect(transaction.account).toHaveText('HSBC');

transaction = accountPage.getNthTransaction(2);
transaction = accountPage.getNthTransaction(1);
await expect(transaction.payee).toHaveText('HSBC');
await expect(transaction.category).toHaveText('Transfer');
await expect(transaction.debit).toHaveText('34.56');
Expand Down
8 changes: 4 additions & 4 deletions packages/desktop-client/e2e/rules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ test.describe('Rules', () => {
debit: '12.34',
});

const transaction = accountPage.getNthTransaction(1); //jump header line
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Fast Internet');
await expect(transaction.category).toHaveText('General');
await expect(transaction.debit).toHaveText('12.34');
Expand Down Expand Up @@ -118,19 +118,19 @@ test.describe('Rules', () => {
payee: 'Ikea',
});

const transaction = accountPage.getNthTransaction(1); //jump header line
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Ikea');
await expect(transaction.notes).toHaveText('food / entertainment');
await expect(transaction.category).toHaveText('Split');
await expect(transaction.debit).toHaveText('100.00');
await expect(page).toMatchThemeScreenshots();

const firstSplitTransaction = accountPage.getNthTransaction(2);
const firstSplitTransaction = accountPage.getNthTransaction(1);
await expect(firstSplitTransaction.payee).toHaveText('Ikea');
await expect(firstSplitTransaction.debit).toHaveText('90.00');
await expect(firstSplitTransaction.category).toHaveText('Entertainment');

const secondSplitTransaction = accountPage.getNthTransaction(3);
const secondSplitTransaction = accountPage.getNthTransaction(2);
await expect(secondSplitTransaction.payee).toHaveText('Ikea');
await expect(secondSplitTransaction.debit).toHaveText('10.00');
await expect(secondSplitTransaction.category).toHaveText('Food');
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop-client/e2e/schedules.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test.describe('Schedules', () => {

// Go to transactions page
const accountPage = await navigation.goToAccountPage('HSBC');
const transaction = accountPage.getNthTransaction(1); //jump header line
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Home Depot');
await expect(transaction.category).toHaveText('Categorize');
await expect(transaction.debit).toHaveText('25.00');
Expand Down
16 changes: 8 additions & 8 deletions packages/desktop-client/e2e/transactions.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ test.describe('Transactions', () => {
await filterTooltip.applyButton.click();

// Assert that there are only clothing transactions
await expect(accountPage.getNthTransaction(0).category).toHaveText(
'Clothing',
);
await expect(accountPage.getNthTransaction(1).category).toHaveText(
'Clothing',
);
Expand All @@ -79,9 +82,6 @@ test.describe('Transactions', () => {
await expect(accountPage.getNthTransaction(4).category).toHaveText(
'Clothing',
);
await expect(accountPage.getNthTransaction(5).category).toHaveText(
'Clothing',
);
await expect(page).toMatchThemeScreenshots();
});
});
Expand All @@ -94,7 +94,7 @@ test.describe('Transactions', () => {
debit: '12.34',
});

const transaction = accountPage.getNthTransaction(1); //jump header line
const transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Home Depot');
await expect(transaction.notes).toHaveText('Notes field');
await expect(transaction.category).toHaveText('Food');
Expand All @@ -119,21 +119,21 @@ test.describe('Transactions', () => {
},
]);

const firstTransaction = accountPage.getNthTransaction(1); //jump header line
const firstTransaction = accountPage.getNthTransaction(0);
await expect(firstTransaction.payee).toHaveText('Krogger');
await expect(firstTransaction.notes).toHaveText('Notes');
await expect(firstTransaction.category).toHaveText('Split');
await expect(firstTransaction.debit).toHaveText('333.33');
await expect(firstTransaction.credit).toHaveText('');

const secondTransaction = accountPage.getNthTransaction(2);
const secondTransaction = accountPage.getNthTransaction(1);
await expect(secondTransaction.payee).toHaveText('Krogger');
await expect(secondTransaction.notes).toHaveText('');
await expect(secondTransaction.category).toHaveText('General');
await expect(secondTransaction.debit).toHaveText('222.22');
await expect(secondTransaction.credit).toHaveText('');

const thirdTransaction = accountPage.getNthTransaction(3);
const thirdTransaction = accountPage.getNthTransaction(2);
await expect(thirdTransaction.payee).toHaveText('Krogger');
await expect(thirdTransaction.notes).toHaveText('');
await expect(thirdTransaction.category).toHaveText('Categorize');
Expand All @@ -155,7 +155,7 @@ test.describe('Transactions', () => {

await accountPage.addEnteredTransaction();

transaction = accountPage.getNthTransaction(1); //jump header line
transaction = accountPage.getNthTransaction(0);
await expect(transaction.payee).toHaveText('Bank of America');
await expect(transaction.notes).toHaveText('Notes field');
await expect(transaction.category).toHaveText('Transfer');
Expand Down

0 comments on commit e315330

Please sign in to comment.