AFFiNE/tests/local-first-workspace.spec.ts

30 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-02-05 13:41:18 +03:00
import { expect } from '@playwright/test';
2023-02-17 10:33:32 +03:00
2023-02-17 05:43:52 +03:00
import { loadPage } from './libs/load-page';
2023-02-17 10:33:32 +03:00
import { test } from './libs/playwright';
loadPage();
2022-12-30 20:59:07 +03:00
test.describe('Local first default workspace', () => {
test('preset workspace name', async ({ page }) => {
const workspaceName = page.getByTestId('workspace-name');
expect(await workspaceName.textContent()).toBe('Untitled Workspace');
});
// test('default workspace avatar', async ({ page }) => {
// const workspaceAvatar = page.getByTestId('workspace-avatar');
// expect(
// await workspaceAvatar.locator('img').getAttribute('src')
// ).not.toBeNull();
// });
});
2023-02-07 10:21:34 +03:00
test.describe('Language switch', () => {
test('Open language switch menu', async ({ page }) => {
await page.getByTestId('current-workspace').click();
const languageMenuButton = page.getByTestId('language-menu-button');
await expect(languageMenuButton).toBeVisible();
const actual = await languageMenuButton.innerText();
expect(actual).toEqual('English');
});
});