feat: update the default workspace nameto AFFiNE Test and add e2e test for it
This commit is contained in:
@@ -32,13 +32,13 @@ export const WorkspaceSelector = () => {
|
|||||||
>
|
>
|
||||||
<WorkspaceUnitAvatar
|
<WorkspaceUnitAvatar
|
||||||
size={28}
|
size={28}
|
||||||
name={currentWorkspace?.name ?? 'AFFiNE'}
|
name={currentWorkspace?.name ?? 'AFFiNE Test'}
|
||||||
workspaceUnit={currentWorkspace}
|
workspaceUnit={currentWorkspace}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Avatar>
|
</Avatar>
|
||||||
<WorkspaceName data-testid="workspace-name">
|
<WorkspaceName data-testid="workspace-name">
|
||||||
{currentWorkspace?.name ?? 'AFFiNE'}
|
{currentWorkspace?.name ?? 'AFFiNE Test'}
|
||||||
</WorkspaceName>
|
</WorkspaceName>
|
||||||
</SelectorWrapper>
|
</SelectorWrapper>
|
||||||
<WorkspaceModal
|
<WorkspaceModal
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { DataCenter } from '@affine/datacenter';
|
import { DataCenter } from '@affine/datacenter';
|
||||||
|
|
||||||
const DEFAULT_WORKSPACE_NAME = 'affine';
|
const DEFAULT_WORKSPACE_NAME = 'AFFiNE Test';
|
||||||
|
|
||||||
export const createDefaultWorkspace = async (dataCenter: DataCenter) => {
|
export const createDefaultWorkspace = async (dataCenter: DataCenter) => {
|
||||||
return dataCenter.createWorkspace({
|
return dataCenter.createWorkspace({
|
||||||
|
|||||||
@@ -5,15 +5,15 @@ import { loadPage } from './libs/load-page.js';
|
|||||||
loadPage();
|
loadPage();
|
||||||
|
|
||||||
test.describe('Local first default workspace', () => {
|
test.describe('Local first default workspace', () => {
|
||||||
test.skip('Default workspace name', async ({ page }) => {
|
test('preset workspace name', async ({ page }) => {
|
||||||
const workspaceName = page.getByTestId('workspace-name');
|
const workspaceName = page.getByTestId('workspace-name');
|
||||||
expect(await workspaceName.textContent()).toBe('AFFiNE');
|
expect(await workspaceName.textContent()).toBe('AFFiNE Test');
|
||||||
});
|
});
|
||||||
|
|
||||||
test.skip('Default workspace avatar', async ({ page }) => {
|
test('default workspace avatar', async ({ page }) => {
|
||||||
const workspaceAvatar = page.getByTestId('workspace-avatar');
|
const workspaceAvatar = page.getByTestId('workspace-avatar');
|
||||||
expect(await workspaceAvatar.innerHTML()).toBe(
|
expect(
|
||||||
'<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="0.5" y="0.5" width="39" height="39" rx="19.5" stroke="#6880FF" fill="#FFF"></rect><path fillRule="evenodd" clipRule="evenodd" d="M18.6303 8.79688L11.2559 29.8393H15.5752L20.2661 15.2858L24.959 29.8393H29.2637L21.8881 8.79688H18.6303Z" fill="#6880FF"></path></svg>'
|
await workspaceAvatar.locator('img').getAttribute('src')
|
||||||
);
|
).not.toBeNull();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user