Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
NikxDa committed Jan 10, 2024
1 parent 462f754 commit b0f3851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1374,13 +1374,15 @@ function TransactionError({ error, isDeposit, onAddSplit, onDistributeRemainder,
type="normal"
style={{ marginLeft: 15 }}
onClick={onDistributeRemainder}
data-testid="distribute-split-button"
>
Distribute
</Button>
<Button
type="primary"
style={{ marginLeft: 10, padding: '4px 10px' }}
onClick={onAddSplit}
data-testid="add-split-button"
>
Add Split
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ describe('Transactions', () => {
await waitForAutocomplete();

await userEvent.click(
container.querySelector('[data-testid="transaction-error"] button'),
container.querySelector('[data-testid="add-split-button"]'),
);

input = await editNewField(container, 'debit', 1);
Expand Down Expand Up @@ -910,7 +910,7 @@ describe('Transactions', () => {
await userEvent.click(splitButton);
await waitForAutocomplete();
await userEvent.click(
container.querySelector('[data-testid="transaction-error"] button'),
container.querySelector('[data-testid="add-split-button"]'),
);
expect(getTransactions().length).toBe(7);

Expand Down

0 comments on commit b0f3851

Please sign in to comment.