feat(core): replace onboarding template (#11768)

This commit is contained in:
EYHN
2025-04-18 02:31:13 +00:00
parent 0b33fb6dbf
commit dd51180acb
13 changed files with 71 additions and 59 deletions

View File

@@ -329,11 +329,11 @@ test('click display button to group pages', async ({ page }) => {
// the group header should appear
await expect(
page.locator('[data-testid="group-label-favourited-1"]')
page.locator('[data-testid="group-label-favourited"]')
).toBeVisible();
await expect(
page.locator('[data-testid="group-label-notFavourited-1"]')
page.locator('[data-testid="group-label-notFavourited"]')
).toBeVisible();
});

View File

@@ -27,15 +27,12 @@ test('should close embed editing modal when editor switching to page mode by sho
page,
}) => {
await page.keyboard.press('@');
await page
.getByTestId('cmdk-label')
.getByText('Write, Draw, Plan all at Once.')
.click();
await page.getByTestId('cmdk-label').getByText('Getting Started').click();
const toolbar = locateToolbar(page);
await toolbar.getByLabel('Edit').click();
const editingModal = page.locator('embed-card-edit-modal');
expect(editingModal).toBeVisible();
await expect(editingModal).toBeVisible();
await page.keyboard.press('Alt+s');
await waitForEditorLoad(page);

View File

@@ -27,35 +27,35 @@ test('Switch to edgeless by switch edgeless item', async ({ page }) => {
test('Quick Switch Doc Mode, Doc Mode should stable', async ({ page }) => {
await openHomePage(page);
await waitForEditorLoad(page);
await ensureInEdgelessMode(page);
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await ensureInPageMode(page);
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await page.keyboard.down('Alt');
await page.keyboard.down('S');
await page.keyboard.up('S');
await page.keyboard.up('Alt');
await ensureInEdgelessMode(page);
await page.waitForTimeout(1000);
expect(await getPageMode(page)).toBe('page');
expect(await getPageMode(page)).toBe('edgeless');
});
test('default to edgeless by editor header items', async ({ page }) => {

View File

@@ -50,11 +50,11 @@ test('create one workspace in the workspace list', async ({
await clickSideBarAllPageButton(page);
await page.waitForTimeout(2000);
const result = await getPagesCount(page);
expect(result).toBe(1);
expect(result).toBe(2);
await page.reload();
await page.waitForTimeout(4000);
const result1 = await getPagesCount(page);
expect(result1).toBe(1);
expect(result1).toBe(2);
const currentWorkspace = await workspace.current();
expect(currentWorkspace.meta.flavour).toContain('local');

View File

@@ -484,7 +484,7 @@ test('can use @ to open quick search to search for doc and insert into canvas',
).toBeVisible();
await expect(
page.locator('.affine-embed-linked-doc-content-title')
).toContainText('Write, Draw, Plan all at Once');
).toContainText('Getting Started');
// focus on the note block
await page.waitForTimeout(500);
@@ -514,7 +514,7 @@ test('can paste a doc link to create link reference', async ({ page }) => {
// check the link reference
await page.waitForTimeout(500);
await expect(
page.locator('affine-reference:has-text("Write, Draw, Plan all at Once.")')
page.locator('affine-reference:has-text("Getting Started")')
).toBeVisible();
// can ctrl-z to revert to normal link