mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 21:41:52 +08:00
feat: add fav button (#4159)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
@@ -127,3 +127,18 @@ test("Deleted page's reference will not be shown in sidebar", async ({
|
||||
|
||||
expect(currentWorkspace.flavour).toContain('local');
|
||||
});
|
||||
|
||||
test('Add new favorite page via sidebar', async ({ page }) => {
|
||||
await openHomePage(page);
|
||||
await waitForEditorLoad(page);
|
||||
await page.getByTestId('slider-bar-add-favorite-button').click();
|
||||
await waitForEditorLoad(page);
|
||||
|
||||
// enter random page title
|
||||
await getBlockSuiteEditorTitle(page).fill('this is a new fav page');
|
||||
// check if the page title is shown in the favorite list
|
||||
const favItem = page.locator(
|
||||
'[data-type=favorite-list-item] >> text=this is a new fav page'
|
||||
);
|
||||
await expect(favItem).toBeVisible();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user