From 497adbe31e51208c2f655613c18d3d224cbea8c5 Mon Sep 17 00:00:00 2001 From: Xander Vedder Date: Sat, 16 Nov 2024 15:55:37 +0100 Subject: [PATCH] fix: click on search icon instead --- packages/elements/test/integration/po/Breadcrumb.po.ts | 5 +++++ packages/elements/test/integration/po/ReportPage.ts | 4 ---- packages/elements/test/integration/theming.it.spec.ts | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/packages/elements/test/integration/po/Breadcrumb.po.ts b/packages/elements/test/integration/po/Breadcrumb.po.ts index 5f1559eb8..7d61cb85b 100644 --- a/packages/elements/test/integration/po/Breadcrumb.po.ts +++ b/packages/elements/test/integration/po/Breadcrumb.po.ts @@ -9,4 +9,9 @@ export default class Breadcrumb extends PageObject { const anchor = this.host.getByText(to); await anchor.click(); } + + public async clickOnSearchIcon(): Promise { + const button = this.$('button'); + await button.click(); + } } diff --git a/packages/elements/test/integration/po/ReportPage.ts b/packages/elements/test/integration/po/ReportPage.ts index 480101242..e0276a01f 100644 --- a/packages/elements/test/integration/po/ReportPage.ts +++ b/packages/elements/test/integration/po/ReportPage.ts @@ -72,8 +72,4 @@ export class ReportPage extends ElementSelector { pageYOffset(): Promise { return this.page.evaluate('window.pageYOffset'); } - - async openPicker(): Promise { - await this.page.keyboard.press('Control+K'); - } } diff --git a/packages/elements/test/integration/theming.it.spec.ts b/packages/elements/test/integration/theming.it.spec.ts index 5cc50c6c3..49dfd482c 100644 --- a/packages/elements/test/integration/theming.it.spec.ts +++ b/packages/elements/test/integration/theming.it.spec.ts @@ -44,7 +44,7 @@ test.describe('Theming', () => { test.describe('when opening the file picker', () => { test('should show the file picker', async () => { - await page.openPicker(); + await page.breadcrumb().clickOnSearchIcon(); }); itShouldMatchScreenshot('should match the dark theme'); @@ -78,7 +78,7 @@ test.describe('Theming', () => { test.describe('when opening the file picker', () => { test('should match screenshot', async () => { - await page.openPicker(); + await page.breadcrumb().clickOnSearchIcon(); }); itShouldMatchScreenshot('should match the light theme');