refactor: improve code
This commit is contained in:
1 parent
c93a3ec5e1
commit
42ac45fe15
4 files changed
+20
-25
No files matched your search
@@ -9,16 +9,16 @@ test.describe('web console', () => {
|
||||
// https://playwright.dev/docs/evaluating
|
||||
// https://github.com/microsoft/playwright/issues/13059
|
||||
// Get the handle to a specific function.
|
||||
// const getEditoVersionHandle = await page.evaluate(
|
||||
// 'window.__getEditoVersion'
|
||||
// );
|
||||
//Later on, call this function with some arguments.
|
||||
// const msg = await getEditoVersionHandle.evaluate((post, args) => post);
|
||||
// console.log(getEditoVersionHandle);
|
||||
const documentEditorVersion = await page.inputValue('input#editor-version');
|
||||
await page.waitForTimeout(500);
|
||||
const editoVersion = await page.evaluate(
|
||||
() => (window as any).__editoVersion
|
||||
);
|
||||
// const documentEditorVersion = await page.inputValue('input#editor-version');
|
||||
const pkgEditorVersion = pkg.dependencies['@blocksuite/editor'];
|
||||
|
||||
expect(documentEditorVersion).toBe(pkgEditorVersion);
|
||||
console.log('pkgEditorVersion', pkgEditorVersion);
|
||||
expect(editoVersion).toBe(pkgEditorVersion);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user