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 -->
29 lines
880 B
TypeScript
29 lines
880 B
TypeScript
import { test } from '@affine-test/kit/mobile';
|
|
import { expect, type Page } from '@playwright/test';
|
|
|
|
const openSettings = async (page: Page) => {
|
|
await page.getByTestId('settings-button').click();
|
|
await expect(page.getByRole('dialog')).toBeVisible();
|
|
await expect(page.locator('header:has-text("Settings")')).toBeVisible();
|
|
};
|
|
|
|
test('can open settings', async ({ page }) => {
|
|
await openSettings(page);
|
|
await expect(page.getByText('Devices', { exact: true })).toHaveCount(0);
|
|
});
|
|
|
|
test('can change theme', async ({ page }) => {
|
|
await openSettings(page);
|
|
const select = page
|
|
.getByTestId('setting-row')
|
|
.filter({
|
|
hasText: 'Color mode',
|
|
})
|
|
.getByTestId('native-dropdown-select-trigger');
|
|
|
|
await select.selectOption('light');
|
|
await select.selectOption('dark');
|
|
|
|
await expect(page.locator('html')).toHaveAttribute('data-theme', 'dark');
|
|
});
|