refactor!: remove next.js (#3267)

This commit is contained in:
Alex Yang
2023-07-19 00:53:10 +08:00
committed by GitHub
parent 79227a1e7c
commit 47f12f77f2
296 changed files with 4115 additions and 3617 deletions

View File

@@ -15,7 +15,6 @@ import {
} from '@affine-test/kit/utils/filter';
import { openHomePage } from '@affine-test/kit/utils/load-page';
import {
closeDownloadTip,
getBlockSuiteEditorTitle,
waitEditorLoad,
} from '@affine-test/kit/utils/page-logic';
@@ -74,7 +73,6 @@ test('allow creation of filters by favorite', async ({ page }) => {
await openHomePage(page);
await waitEditorLoad(page);
await clickSideBarAllPageButton(page);
await closeDownloadTip(page);
await createFirstFilter(page, 'Favourited');
await page
.locator('[data-testid="filter-arg"]', { hasText: 'true' })
@@ -89,7 +87,6 @@ test('allow creation of filters by created time', async ({ page }) => {
await openHomePage(page);
await waitEditorLoad(page);
await clickSideBarAllPageButton(page);
await closeDownloadTip(page);
await createFirstFilter(page, 'Created');
await checkFilterName(page, 'after');
// init date
@@ -120,7 +117,6 @@ test('creation of filters by created time, then click date picker to modify the
await openHomePage(page);
await waitEditorLoad(page);
await clickSideBarAllPageButton(page);
await closeDownloadTip(page);
await createFirstFilter(page, 'Created');
await checkFilterName(page, 'after');
// init date
@@ -149,7 +145,6 @@ test('use monthpicker to modify the month of datepicker', async ({ page }) => {
await openHomePage(page);
await waitEditorLoad(page);
await clickSideBarAllPageButton(page);
await closeDownloadTip(page);
await createFirstFilter(page, 'Created');
await checkFilterName(page, 'after');
// init date
@@ -173,11 +168,9 @@ test('use monthpicker to modify the month of datepicker', async ({ page }) => {
test('allow creation of filters by tags', async ({ page }) => {
await openHomePage(page);
await waitEditorLoad(page);
await closeDownloadTip(page);
await createPageWithTag(page, { title: 'Page A', tags: ['A'] });
await createPageWithTag(page, { title: 'Page B', tags: ['B'] });
await clickSideBarAllPageButton(page);
await closeDownloadTip(page);
await createFirstFilter(page, 'Tags');
await checkFilterName(page, 'is not empty');
await checkPagesCount(page, 2);

View File

@@ -1,12 +0,0 @@
import { test } from '@affine-test/kit/playwright';
import { expect } from '@playwright/test';
test('should have page0', async ({ page }) => {
await page.goto('http://localhost:8080/_debug/init-page.html');
await page.waitForSelector('v-line');
const pageId = await page.evaluate(async () => {
// @ts-expect-error
return globalThis.page.id;
});
expect(pageId).toBe('page0');
});

View File

@@ -5,7 +5,6 @@ import {
} from '@affine-test/kit/utils/filter';
import { openHomePage } from '@affine-test/kit/utils/load-page';
import {
closeDownloadTip,
getBlockSuiteEditorTitle,
newPage,
waitEditorLoad,
@@ -29,7 +28,6 @@ const createAndPinCollection = async (
name: 'test page',
});
await expect(cell).toBeVisible();
await closeDownloadTip(page);
await page.getByTestId('create-first-filter').click();
await page
.getByTestId('variable-select')
@@ -146,7 +144,6 @@ test('create temporary filter by click tag', async ({ page }) => {
await page.keyboard.press('Enter');
await page.keyboard.press('Escape');
await page.locator('.tag', { hasText: 'TODO Tag' }).click();
await closeDownloadTip(page);
const cell = page.getByRole('cell', {
name: 'test page',
});

View File

@@ -25,7 +25,7 @@ test('Open last workspace when back to affine', async ({ page }) => {
expect(currentWorkspaceName).toEqual('New Workspace 2');
});
test('Download client tip', async ({ page }) => {
test.skip('Download client tip', async ({ page }) => {
await openHomePage(page);
const downloadClientTipItem = page.locator(
'[data-testid=download-client-tip]'