|
|
|
|
@ -82,3 +82,21 @@ test("Tabs are restored in right order", async ({ page, context }) => {
|
|
|
|
|
// Check the note tree has the right active node.
|
|
|
|
|
await expect(app.noteTreeActiveNote).toContainText("Text notes");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test("Empty tabs are cleared out", async ({ page, context }) => {
|
|
|
|
|
const app = new App(page, context);
|
|
|
|
|
await app.goto();
|
|
|
|
|
|
|
|
|
|
// Open three tabs.
|
|
|
|
|
await app.closeAllTabs();
|
|
|
|
|
await app.addNewTab();
|
|
|
|
|
await app.goToNoteInNewTab("Code notes");
|
|
|
|
|
await app.addNewTab();
|
|
|
|
|
await app.addNewTab();
|
|
|
|
|
|
|
|
|
|
// Refresh the page and check the order.
|
|
|
|
|
await app.goto({ preserveTabs: true });
|
|
|
|
|
|
|
|
|
|
// Expect no empty tabs.
|
|
|
|
|
expect(await app.tabBar.locator(".note-tab-wrapper").count()).toBe(1);
|
|
|
|
|
});
|
|
|
|
|
|