Browse Source

fix(playwright): waitForResponse in ProjectPage

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
f9568866d0
  1. 21
      tests/playwright/pages/ProjectsPage/index.ts

21
tests/playwright/pages/ProjectsPage/index.ts

@ -136,14 +136,7 @@ export class ProjectsPage extends BasePage {
let project: any;
const openProjectUiAction = this.get()
.locator(`.ant-table-cell`, {
hasText: title,
})
.click();
await Promise.all([
this.rootPage.waitForResponse(async res => {
const responsePromise = this.rootPage.waitForResponse(async res => {
let json: any = {};
try {
json = await res.json();
@ -161,9 +154,15 @@ export class ProjectsPage extends BasePage {
}
return isRequiredResponse;
}),
openProjectUiAction,
]);
})
await this.get()
.locator(`.ant-table-cell`, {
hasText: title,
})
.click();
await responsePromise
const dashboard = new DashboardPage(this.rootPage, project);

Loading…
Cancel
Save