feat: cloud sync playground (#662)

* feat: add workspace playground page
* feat: add all demands to playground

Co-authored-by: tzhangchi <terry.zhangchi@outlook.com>
This commit is contained in:
DarkSky
2023-01-03 20:24:40 +08:00
committed by GitHub
parent b309e2670d
commit b6993ca3ba
21 changed files with 2475 additions and 589 deletions

View File

@@ -1,7 +1,6 @@
import { test, expect } from '@playwright/test';
import { loadPage } from './libs/load-page';
import { clickPageMoreActions } from './libs/page-logic';
loadPage();
test.describe('Change page mode(Paper or Edgeless)', () => {

24
tests/console.spec.ts Normal file
View File

@@ -0,0 +1,24 @@
import { test, expect } from '@playwright/test';
import { loadPage } from './libs/load-page';
import pkg from './../packages/app/package.json';
loadPage();
test.describe('web console', () => {
test('editor version', async ({ page }) => {
// https://playwright.dev/docs/evaluating
// https://github.com/microsoft/playwright/issues/13059
// Get the handle to a specific function.
//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 documentEditorVersion = await page.inputValue('input#editor-version');
const pkgEditorVersion = pkg.dependencies['@blocksuite/editor'];
expect(editoVersion).toBe(pkgEditorVersion);
});
});

View File

@@ -11,7 +11,6 @@ test.describe('Local first delete page', () => {
await newPage(page);
await page.getByPlaceholder('Title').click();
await page.getByPlaceholder('Title').fill('this is a new page to restore');
const originPageUrl = page.url();
const newPageId = page.url().split('/').reverse()[0];
await page.getByRole('link', { name: 'All pages' }).click();
const cell = page.getByRole('cell', {

View File

@@ -5,7 +5,7 @@ loadPage();
test.describe('Local first export page', () => {
test('New a page ,then open it and export html', async ({ page }) => {
await page.getByText('New Page').click();
await newPage(page);
await page.getByPlaceholder('Title').click();
await page
.getByPlaceholder('Title')