mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-28 09:14:57 +03:00
21 lines
767 B
TypeScript
21 lines
767 B
TypeScript
import fs from 'fs';
|
|
import path from 'path';
|
|
import { expect } from '@playwright/test';
|
|
import { test } from './libs/playwright.js';
|
|
import { loadPage } from './libs/load-page.js';
|
|
import { fileURLToPath } from 'url';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
const pkgPath = path.join(__dirname, '../packages/app/package.json');
|
|
const record = fs.readFileSync(pkgPath, 'utf8');
|
|
const temp = JSON.parse(record);
|
|
loadPage();
|
|
test.describe('web console', () => {
|
|
test('editor version', async ({ page }) => {
|
|
const pkgEditorVersion = temp.dependencies['@blocksuite/editor'];
|
|
const editoVersion = await page.evaluate(() => window.__editoVersion);
|
|
expect(editoVersion).toBe(pkgEditorVersion);
|
|
});
|
|
});
|