build: enhance nx build (#2948)

This commit is contained in:
Alex Yang
2023-07-01 01:17:31 +08:00
committed by GitHub
parent 7a5a5d503a
commit 81c5e6d3d2
27 changed files with 559 additions and 138 deletions

View File

@@ -14,6 +14,7 @@ const addDatabase = async (page: Page) => {
await page.keyboard.press('a', { delay: 50 });
await page.keyboard.press('Enter', { delay: 50 });
};
test('database is useable', async ({ page }) => {
await openHomePage(page);
await waitEditorLoad(page);
@@ -24,7 +25,7 @@ test('database is useable', async ({ page }) => {
expect(await title.innerText()).toBe('test title');
await addDatabase(page);
const database = page.locator('.affine-database-table');
expect(database).toBeVisible();
await expect(database).toBeVisible();
await page.reload();
await waitEditorLoad(page);
await newPage(page);
@@ -34,7 +35,7 @@ test('database is useable', async ({ page }) => {
expect(await title2.innerText()).toBe('test title2');
await addDatabase(page);
const database2 = page.locator('.affine-database-table');
expect(database2).toBeVisible();
await expect(database2).toBeVisible();
});
test('link page is useable', async ({ page }) => {

View File

@@ -2,7 +2,7 @@ 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');
await page.goto('http://localhost:8080/_debug/init-page.html');
await page.waitForSelector('v-line');
const pageId = await page.evaluate(async () => {
return globalThis.page.id;

View File

@@ -10,7 +10,7 @@ test('goto not found page', async ({ page }) => {
const currentUrl = page.url();
const invalidUrl = currentUrl.replace(/\/$/, '') + '/invalid';
await page.goto(invalidUrl);
expect(await page.getByTestId('notFound').isVisible()).toBeTruthy();
await expect(page.getByTestId('notFound').isVisible()).toBeTruthy();
});
test('goto not found workspace', async ({ page }) => {