mirror of
https://github.com/zadam/trilium.git
synced 2025-12-05 06:54:23 +01:00
test(server-e2e): fix test for new create note option
This commit is contained in:
parent
f65be4f368
commit
feefa389b4
@ -8,6 +8,7 @@ interface GotoOpts {
|
||||
}
|
||||
|
||||
const BASE_URL = "http://127.0.0.1:8082";
|
||||
const NUM_OF_CREATE_NOTE_OPTIONS = 2;
|
||||
|
||||
interface DropdownLocator extends Locator {
|
||||
selectOptionByText: (text: string) => Promise<void>;
|
||||
@ -73,7 +74,8 @@ export default class App {
|
||||
const resultsSelector = this.currentNoteSplit.locator(".note-detail-empty-results");
|
||||
await expect(resultsSelector).toContainText(noteTitle);
|
||||
await resultsSelector.locator(".aa-suggestion", { hasText: noteTitle })
|
||||
.nth(1) // Select the second one, as the first one is "Create a new note"
|
||||
// Select the n+1 one, as the first one is "Create a new note"
|
||||
.nth(NUM_OF_CREATE_NOTE_OPTIONS)
|
||||
.click();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user