mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat: add ai-is-land (#7259)
This commit is contained in:
16
tests/affine-local/e2e/ai-land.spec.ts
Normal file
16
tests/affine-local/e2e/ai-land.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import {
|
||||
clickNewPageButton,
|
||||
waitForEditorLoad,
|
||||
} from '@affine-test/kit/utils/page-logic';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test('Click ai-land icon', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await clickNewPageButton(page);
|
||||
await page.locator('[data-testid=ai-island]').click();
|
||||
|
||||
await expect(page.locator('chat-panel')).toBeVisible();
|
||||
});
|
||||
@@ -1,17 +0,0 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test('Click right-bottom corner contact icon', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await page.locator('[data-testid=help-island]').click();
|
||||
const rightBottomContactUs = page.getByTestId('right-bottom-contact-us-icon');
|
||||
await expect(rightBottomContactUs).toBeVisible();
|
||||
|
||||
await rightBottomContactUs.click();
|
||||
|
||||
const title = page.getByTestId('about-title');
|
||||
await expect(title).toBeVisible();
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
import { test } from '@affine-test/kit/playwright';
|
||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||
import { waitForEditorLoad } from '@affine-test/kit/utils/page-logic';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
test('Open shortcuts modal', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await page.locator('[data-testid=help-island]').click();
|
||||
|
||||
const shortcutsIcon = page.locator('[data-testid=shortcuts-icon]');
|
||||
await page.waitForTimeout(1000);
|
||||
await expect(shortcutsIcon).toBeVisible();
|
||||
|
||||
await shortcutsIcon.click();
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
const settingModal = page.getByTestId('setting-modal');
|
||||
await expect(settingModal).toBeVisible();
|
||||
|
||||
const title = page.getByTestId('keyboard-shortcuts-title');
|
||||
await expect(title).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user