Skip to content

Commit

Permalink
test(Popup): improve visual tests
Browse files Browse the repository at this point in the history
  • Loading branch information
itwillwork committed Dec 27, 2024
1 parent 629629d commit a5997a2
Show file tree
Hide file tree
Showing 161 changed files with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/Popup/__tests__/Popup.visual.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@ test.describe('Popup', {tag: '@Popup'}, () => {
test(title, details, async ({mount, page, expectScreenshot}) => {
const root = await mount(<VisualTestPopup {...props} />);

await expectScreenshot({
screenshotPostfix: 'init',
});
await expectScreenshot({});

await root.locator(`button[data-qa="${VisualTestQA.trigger}"]`).click();

await expect(page.locator(`[data-qa="${VisualTestQA.popupContent}"]`)).toBeVisible();
await expect(page.getByTestId(VisualTestQA.popupContent)).toBeVisible();

await expectScreenshot({
screenshotPostfix: 'opened state',
nameSuffix: 'opened',
});
});
});
Expand Down

0 comments on commit a5997a2

Please sign in to comment.