Skip to content

Commit

Permalink
Improve go to page test method
Browse files Browse the repository at this point in the history
  • Loading branch information
apedroferreira committed Mar 28, 2023
1 parent 2c34cf5 commit 0d5cc96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/models/ToolpadRuntime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export class ToolpadRuntime {

async gotoPage(pageName: string) {
await this.goto();
await this.page.getByRole('button', { name: pageName }).click();

const navLocator = this.page.locator('nav');
await navLocator.getByRole('button', { name: pageName }).click();
}

async gotoPageById(appId: string, pageId: string) {
Expand Down

0 comments on commit 0d5cc96

Please sign in to comment.