mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 07:36:42 +08:00
7400cf225f
Close [BS-2314](https://linear.app/affine-design/issue/BS-2314/添加打开toc时,将note-block-高亮), [BS-1868](https://linear.app/affine-design/issue/BS-1868/toc-里面-note之间顺序可拖动性,在page和edgeless里面是不同的,这个是设计的行为么?) This PR refactor the highlight logic of note cards of TOC panel: - notes block selected in edgeless note - notes block covered by text or block selection in page mode - note cards selected in TOC for dragging Other changes: - remove not used codes - add tests for highlight note cards
30 lines
920 B
TypeScript
30 lines
920 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-card').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();
|
|
}
|
|
|
|
export async function openRightSideBar(
|
|
page: Page,
|
|
tab?: 'chat' | 'properties' | 'journal' | 'outline' | 'frame'
|
|
) {
|
|
await page.getByTestId('right-sidebar-toggle').click();
|
|
tab && (await page.getByTestId(`sidebar-tab-${tab}`).click());
|
|
}
|