Skip to content

Commit

Permalink
fix: click on search icon instead
Browse files Browse the repository at this point in the history
  • Loading branch information
xandervedder committed Nov 16, 2024
1 parent b136663 commit 497adbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 5 additions & 0 deletions packages/elements/test/integration/po/Breadcrumb.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ export default class Breadcrumb extends PageObject {
const anchor = this.host.getByText(to);
await anchor.click();
}

public async clickOnSearchIcon(): Promise<void> {
const button = this.$('button');
await button.click();
}
}
4 changes: 0 additions & 4 deletions packages/elements/test/integration/po/ReportPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,4 @@ export class ReportPage extends ElementSelector {
pageYOffset(): Promise<number> {
return this.page.evaluate('window.pageYOffset');
}

async openPicker(): Promise<void> {
await this.page.keyboard.press('Control+K');
}
}
4 changes: 2 additions & 2 deletions packages/elements/test/integration/theming.it.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 497adbe

Please sign in to comment.