mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-12-23 21:55:02 +03:00
6f0bded0a2
This reverts commit c0b410a1b2
.
23 lines
858 B
TypeScript
23 lines
858 B
TypeScript
import { test, expect } from '@playwright/test';
|
|
import { loadPage } from './libs/load-page.js';
|
|
import { newPage } from './libs/page-logic.js';
|
|
loadPage();
|
|
|
|
test.describe('local first new page', () => {
|
|
test('click btn new page', async ({ page }) => {
|
|
const originPageId = page.url().split('/').reverse()[0];
|
|
await newPage(page);
|
|
const newPageId = page.url().split('/').reverse()[0];
|
|
expect(newPageId).not.toBe(originPageId);
|
|
});
|
|
|
|
test('click btn bew page and find it in all pages', async ({ page }) => {
|
|
await newPage(page);
|
|
await page.getByPlaceholder('Title').click();
|
|
await page.getByPlaceholder('Title').fill('this is a new page');
|
|
await page.getByRole('link', { name: 'All pages' }).click();
|
|
const cell = page.getByRole('cell', { name: 'this is a new page' });
|
|
expect(cell).not.toBeUndefined();
|
|
});
|
|
});
|