feat(mobile): show page back by url search (#9100)

close AF-1911
This commit is contained in:
CatsJuice
2024-12-12 07:14:05 +00:00
parent 84df2a1d16
commit 5dd2dddd74
8 changed files with 75 additions and 15 deletions

View File

@@ -41,3 +41,15 @@ export async function openExplorerNodeMenu(page: Page, node: Locator) {
await expect(menu).toBeVisible();
return menu;
}
export async function openTab(
page: Page,
name: 'home' | 'all' | 'Journal' | 'New Page'
) {
const tab = page.locator('#app-tabs').getByRole('tab', { name });
await expect(tab).toBeVisible();
await tab.click();
// eslint-disable-next-line unicorn/prefer-dom-node-dataset
const isActive = await tab.getAttribute('data-active');
expect(isActive).toBe('true');
}