Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

test: wait for page to load

lawvs1e27b2a61964
diff --git a/tests/console.spec.ts b/tests/console.spec.ts
index 708ab965cf..62df984d49 100644
--- a/tests/console.spec.ts
+++ b/tests/console.spec.ts
@@ -12,10 +12,7 @@ test.describe('web console', () => {
//Later on, call this function with some arguments.
// const msg = await getEditoVersionHandle.evaluate((post, args) => post);
// console.log(getEditoVersionHandle);
- await page.waitForTimeout(500);
- const editoVersion = await page.evaluate(
- () => (window as any).__editoVersion
- );
+ const editoVersion = await page.evaluate(() => window.__editoVersion);
// const documentEditorVersion = await page.inputValue('input#editor-version');
const pkgEditorVersion = pkg.dependencies['@blocksuite/editor'];
diff --git a/tests/libs/load-page.ts b/tests/libs/load-page.ts
index 002341de65..8428f27ec8 100644
--- a/tests/libs/load-page.ts
+++ b/tests/libs/load-page.ts
@@ -4,6 +4,6 @@ export function loadPage() {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:8080');
// waiting for page loading end
- // await page.waitForTimeout(1000);
+ await page.waitForSelector('#__next');
});
}