feat(e2e): basic test for note map rendering

This commit is contained in:
Elian Doran 2025-01-17 20:15:48 +02:00
parent 7e40200436
commit 8d026c8134
No known key found for this signature in database
3 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,4 @@
import { test, expect, Page } from "@playwright/test"; import { test, expect } from "@playwright/test";
import App from "../support/app"; import App from "../support/app";
test("displays simple map", async ({ page, context }) => { test("displays simple map", async ({ page, context }) => {

View File

@ -0,0 +1,9 @@
import { test, expect } from "@playwright/test";
import App from "../support/app";
test("renders global map", async ({ page, context }) => {
const app = new App(page, context);
await app.goto();
await app.launcherBar.locator(".launcher-button.bx-map-alt").click();
await expect(app.currentNoteSplit.locator(".force-graph-container canvas")).toBeVisible();
});

View File

@ -13,6 +13,7 @@ export default class App {
readonly tabBar: Locator; readonly tabBar: Locator;
readonly noteTree: Locator; readonly noteTree: Locator;
readonly launcherBar: Locator;
readonly currentNoteSplit: Locator; readonly currentNoteSplit: Locator;
readonly sidebar: Locator; readonly sidebar: Locator;
@ -22,6 +23,7 @@ export default class App {
this.tabBar = page.locator(".tab-row-widget-container"); this.tabBar = page.locator(".tab-row-widget-container");
this.noteTree = page.locator(".tree-wrapper"); this.noteTree = page.locator(".tree-wrapper");
this.launcherBar = page.locator("#launcher-container");
this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)") this.currentNoteSplit = page.locator(".note-split:not(.hidden-ext)")
this.sidebar = page.locator("#right-pane"); this.sidebar = page.locator("#right-pane");
} }