mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-25 14:28:51 +08:00
refactor(core): new back&forward button base on workbench (#6012)
# feature: ## In Browser: - hidden back&forward button in sidebar. - back and forward is equal with `window.history.back()` `window.history.forward()` ## In Desktop: - Back and forward can be controlled through the sidebar, cmdk, and shortcut keys. - back and forward act on the currently **active** view. - buttons change disable&enable style based on current active view history # Refactor: Move app-sidebar and app-container from @affine/component to @affine/core
This commit is contained in:
@@ -62,13 +62,13 @@ test('app sidebar router forward/back', async ({ page }) => {
|
||||
await expect(getBlockSuiteEditorTitle(page)).toHaveText('test3');
|
||||
}
|
||||
|
||||
await page.click('[data-testid="app-sidebar-arrow-button-back"]');
|
||||
await page.click('[data-testid="app-sidebar-arrow-button-back"]');
|
||||
await page.click('[data-testid="app-navigation-button-back"]');
|
||||
await page.click('[data-testid="app-navigation-button-back"]');
|
||||
{
|
||||
await expect(getBlockSuiteEditorTitle(page)).toHaveText('test1');
|
||||
}
|
||||
await page.click('[data-testid="app-sidebar-arrow-button-forward"]');
|
||||
await page.click('[data-testid="app-sidebar-arrow-button-forward"]');
|
||||
await page.click('[data-testid="app-navigation-button-forward"]');
|
||||
await page.click('[data-testid="app-navigation-button-forward"]');
|
||||
{
|
||||
await expect(getBlockSuiteEditorTitle(page)).toHaveText('test3');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user