mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: fix keyboard-navigation-list tests
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user