AFFiNE/tests/kit/utils/sidebar.ts
CatsJuice 0731872347
feat(core): refactor sidebar header (#6251)
- Add user avatar
- Move sign-out/user settings link from workspace-modal to user avatar modal
- Modify the style of workspace list items
- Modify gap of navigation buttons
- Animate Syncing/Offline/...

![CleanShot 2024-03-22 at 10.22.38.gif](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/LakojjjzZNf6ogjOVwKE/7305f561-a85b-4ec6-89c2-27e2f1b63c85.gif)
2024-03-26 06:10:38 +00:00

22 lines
667 B
TypeScript

import type { Page } from '@playwright/test';
export async function clickSideBarSettingButton(page: Page) {
return page.getByTestId('slider-bar-workspace-setting-button').click();
}
export async function clickSideBarAllPageButton(page: Page) {
return page.getByTestId('all-pages').click();
}
export async function clickSideBarCurrentWorkspaceBanner(page: Page) {
return page.getByTestId('current-workspace').click();
}
export async function clickSideBarUseAvatar(page: Page) {
return page.getByTestId('sidebar-user-avatar').click();
}
export async function clickNewPageButton(page: Page) {
return page.getByTestId('sidebar-new-page-button').click();
}