feat: add fav button (#4159)

Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
Peng Xiao
2023-09-05 01:14:02 +08:00
committed by GitHub
parent 6609f712e7
commit d57f995e87
4 changed files with 54 additions and 3 deletions

View File

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