Skip to content

Commit

Permalink
Change duplicate e2e test to go through the modal
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofilipenunes committed Jan 18, 2024
1 parent 3e6a688 commit e4e5e4d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions e2e/tests/strategy/recurring/duplicate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
} from './../../../utils/strategy';
import { NotificationDriver } from './../../../utils/NotificationDriver';
import { ManageStrategyDriver } from './../../../utils/strategy/ManageStrategyDriver';
import { waitModalOpen } from '../../../utils/modal';

export const duplicateStrategyTest = (testCase: CreateStrategyTestCase) => {
assertRecurringTestCase(testCase);
Expand All @@ -16,6 +17,9 @@ export const duplicateStrategyTest = (testCase: CreateStrategyTestCase) => {
const strategy = await manage.createStrategy(testCase.input);
await strategy.clickManageEntry('manage-strategy-duplicateStrategy');

const modal = await waitModalOpen(page);
await modal.getByTestId('duplicate-strategy-btn').click();

await page.waitForURL('/strategies/create?strategy=*', {
timeout: 10_000,
});
Expand Down

0 comments on commit e4e5e4d

Please sign in to comment.