A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: fix keyboard-navigation-list tests
Abdullah Atta8b357559fa4a
diff --git a/apps/web/__e2e__/models/base-view.model.ts b/apps/web/__e2e__/models/base-view.model.tsindex 63d0638a2..d62db5af2 100644--- a/apps/web/__e2e__/models/base-view.model.ts+++ b/apps/web/__e2e__/models/base-view.model.ts@@ -47,7 +47,7 @@ export class BaseViewModel {async findGroup(groupName: string) {const locator = this.list- .locator(getTestId(`virtuoso-item-list`))+ .locator(getTestId(`virtuoso-item-list`, "data-testid")).locator(getTestId("group-header"));for await (const item of iterateList(locator)) {@@ -95,7 +95,7 @@ export class BaseViewModel {// }async press(key: string) {- const itemList = this.list.locator(getTestId(`virtuoso-item-list`));+ const itemList = this.list.locator(getTestId(`virtuoso-item-list`, "data-testid"));await itemList.press(key);await this.page.waitForTimeout(300);}diff --git a/apps/web/__e2e__/utils/index.ts b/apps/web/__e2e__/utils/index.tsindex ca6ec78c2..e0deb339e 100644--- a/apps/web/__e2e__/utils/index.ts+++ b/apps/web/__e2e__/utils/index.ts@@ -74,8 +74,8 @@ const PASSWORD = "123abc123abc";const APP_LOCK_PASSWORD = "lockapporelse🔪";-function getTestId<TId extends string>(id: TId): `[data-test-id="${TId}"]` {- return `[data-test-id="${id}"]`;+function getTestId(id: string, variant: "data-test-id" | "data-testid" = "data-test-id") {+ return `[${variant}="${id}"]`;}async function createNote(page: Page, note: Note) {