feat: add fav button (#4159)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng XiaoandAlex Yang authored and GitHub committed 2023-09-04 17:14:02 +00:00
1 parent 6609f712e7
commit d57f995e87
4 files changed
+54 -3

No files matched your search

@@ -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();
});