test(e2e): refine condition wait

pull/3855/head^2
Andelf 2022-01-17 13:48:32 +08:00
parent f5be683963
commit ddbe7cabeb
2 changed files with 5 additions and 4 deletions

View File

@ -67,6 +67,11 @@ base.beforeAll(async () => {
// NOTE: The following ensures first start.
// await page.waitForSelector('text=This is a demo graph, changes will not be saved until you open a local folder')
await page.waitForSelector(':has-text("Loading")', {
state: "hidden",
timeout: 1000 * 15,
});
page.once('load', async () => {
console.log('Page loaded!')
await page.screenshot({ path: 'startup.png' })

View File

@ -18,10 +18,6 @@ export function randomString(length: number) {
return result;
}
export async function appFirstLoaded(page: Page) {
await page.waitForSelector('text=This is a demo graph, changes will not be saved until you open a local folder')
}
export async function createRandomPage(page: Page) {
const randomTitle = randomString(20)