mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 21:38:44 +08:00
1d36e2e4b2
#### PR Dependency Tree * **PR #15317** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Virtualized mobile navigation with shell navigation and interactive swipe menus; coordinated mobile back handling with interactive phases/state restoration. * Added shared auth request proxy and message-port based token handling across mobile and worker flows. * **Bug Fixes** * Hydrated remote worker error stacks for calls and observable errors. * Improved SQLite FTS/indexer and nbstore optional text handling; refined docs-search ref parsing and notification loading/retry. * **Refactor / UX** * Modal focus-preservation and pointer behavior updates; improved mobile menu controls and back gesture plugins. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
45 lines
1.6 KiB
TypeScript
45 lines
1.6 KiB
TypeScript
import { test } from '@affine-test/kit/mobile';
|
|
import { getBlockSuiteEditorTitle } from '@affine-test/kit/utils/page-logic';
|
|
import { getCurrentDocIdFromUrl } from '@affine-test/kit/utils/url';
|
|
import { expect } from '@playwright/test';
|
|
|
|
import {
|
|
expandCollapsibleSection,
|
|
openNavigationPanelNodeSwipeMenu,
|
|
pageBack,
|
|
} from './utils';
|
|
|
|
test('Create new doc in favorites', async ({ page }) => {
|
|
const section = await expandCollapsibleSection(page, 'favorites');
|
|
const newButton = section.getByTestId(
|
|
'navigation-panel-bar-add-favorite-button'
|
|
);
|
|
await newButton.tap();
|
|
|
|
// const testTitleText = 'Test Favorited Doc';
|
|
const title = getBlockSuiteEditorTitle(page);
|
|
await expect(title).toBeVisible();
|
|
// TODO(@CatsJuice): Mobile editor is not ready yet
|
|
// await title.fill(testTitleText);
|
|
const docId = getCurrentDocIdFromUrl(page);
|
|
|
|
await pageBack(page);
|
|
const section2 = await expandCollapsibleSection(page, 'favorites');
|
|
const node = section2.getByTestId(`navigation-panel-doc-${docId}`);
|
|
await expect(node).toBeVisible();
|
|
|
|
await node.getByTestId('navigation-panel-collapsed-button').tap();
|
|
await expect(
|
|
page.getByTestId('navigation-panel-doc-add-linked-page')
|
|
).toBeVisible();
|
|
|
|
await openNavigationPanelNodeSwipeMenu(page, node);
|
|
const menu = page.getByRole('dialog');
|
|
await expect(menu).toBeVisible();
|
|
await expect(menu.getByRole('button', { name: 'Duplicate' })).toBeVisible();
|
|
await expect(page.locator('#app-tabs')).toHaveCount(1);
|
|
|
|
// const label = node.getByText(testTitleText);
|
|
// await expect(label).toBeVisible();
|
|
});
|