mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 12:50:47 +08:00
test(server-e2e): fix test for new create note option
This commit is contained in:
parent
b8367600ad
commit
a787afcf54
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue