feat(mobile): replace search with create in app tab (#8934)

- Remove search on AppTab, replaced with `create doc`
- Always show AppTab for editor page
- Extract `NavigationBack` from `PageHeader`
This commit is contained in:
CatsJuice
2024-12-02 02:55:04 +00:00
parent 5e92d6cfe9
commit 6a71b28a61
10 changed files with 156 additions and 63 deletions
+2 -13
View File
@@ -13,7 +13,8 @@ test('app tabs is visible', async ({ page }) => {
await expect(tabs.getByRole('tab', { name: 'home' })).toBeVisible();
await expect(tabs.getByRole('tab', { name: 'all' })).toBeVisible();
await expect(tabs.getByRole('tab', { name: 'search' })).toBeVisible();
await expect(tabs.getByRole('tab', { name: 'journal' })).toBeVisible();
await expect(tabs.getByRole('tab', { name: 'new' })).toBeVisible();
});
test('recent docs', async ({ page }) => {
@@ -49,15 +50,3 @@ test('all tab', async ({ page }) => {
const todayDocs = page.getByTestId('doc-card');
expect(await todayDocs.count()).toBeGreaterThan(0);
});
test('search tab', async ({ page }) => {
const searchTab = page
.locator('#app-tabs')
.getByRole('tab', { name: 'search' });
await expect(searchTab).toBeVisible();
await searchTab.click();
const searchInput = page.getByTestId('search-header').getByRole('textbox');
await expect(searchInput).toBeVisible();
});