From fa84474ba6508e2acffe4556c522eb74efa176d1 Mon Sep 17 00:00:00 2001 From: Xander Vedder Date: Sat, 16 Nov 2024 16:27:20 +0100 Subject: [PATCH] fix: beforeEach --- packages/elements/test/integration/po/Breadcrumb.po.ts | 1 + packages/elements/test/integration/theming.it.spec.ts | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/elements/test/integration/po/Breadcrumb.po.ts b/packages/elements/test/integration/po/Breadcrumb.po.ts index 7d61cb85b..42206fe1f 100644 --- a/packages/elements/test/integration/po/Breadcrumb.po.ts +++ b/packages/elements/test/integration/po/Breadcrumb.po.ts @@ -12,6 +12,7 @@ export default class Breadcrumb extends PageObject { public async clickOnSearchIcon(): Promise { const button = this.$('button'); + console.log(button); await button.click(); } } diff --git a/packages/elements/test/integration/theming.it.spec.ts b/packages/elements/test/integration/theming.it.spec.ts index 49dfd482c..c6a1b3cb4 100644 --- a/packages/elements/test/integration/theming.it.spec.ts +++ b/packages/elements/test/integration/theming.it.spec.ts @@ -43,10 +43,10 @@ test.describe('Theming', () => { }); test.describe('when opening the file picker', () => { - test('should show the file picker', async () => { - await page.breadcrumb().clickOnSearchIcon(); + test.beforeEach(async () => { + await page.breadcrumb().clickOnSearchIcon(); }); - + itShouldMatchScreenshot('should match the dark theme'); }); }); @@ -77,10 +77,10 @@ test.describe('Theming', () => { }); test.describe('when opening the file picker', () => { - test('should match screenshot', async () => { + test.beforeEach(async () => { await page.breadcrumb().clickOnSearchIcon(); }); - + itShouldMatchScreenshot('should match the light theme'); }); });