mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-25 04:16:05 +00:00
fix(playwright): add waitForResponse after goto
This commit is contained in:
@@ -10,14 +10,11 @@ export class AccountLicensePage extends BasePage {
|
||||
}
|
||||
|
||||
async goto() {
|
||||
return this.waitForResponse({
|
||||
uiAction: async () => await this.rootPage.goto('/#/account/license'),
|
||||
httpMethodsToMatch: ['GET'],
|
||||
requestUrlPathToMatch: 'api/v1/license',
|
||||
});
|
||||
await this.rootPage.goto(`/#/account/license`);
|
||||
await this.waitUntilContentLoads();
|
||||
}
|
||||
|
||||
waitUntilContentLoads() {
|
||||
async waitUntilContentLoads() {
|
||||
return this.rootPage.waitForResponse(resp => resp.url().includes('api/v1/license') && resp.status() === 200);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,10 @@ const setup = async ({ page, isEmptyProject }: { page: Page; isEmptyProject?: bo
|
||||
|
||||
await page.goto(`/#/nc/${project.id}/auth`);
|
||||
|
||||
await page.waitForResponse(
|
||||
resp => resp.url().includes(`api/v1/db/meta/projects/${project.id}/users`) && resp.status() === 200
|
||||
);
|
||||
|
||||
return { project, token, dbType, workerId } as NcContext;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user