mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 07:08:55 +02:00
test(server/e2e): flaky test
This commit is contained in:
parent
aefa2315b7
commit
a3ba5ca109
@ -72,6 +72,7 @@ test("Tabs are restored in right order", async ({ page, context }) => {
|
|||||||
|
|
||||||
// Select the mid one.
|
// Select the mid one.
|
||||||
await app.getTab(1).click();
|
await app.getTab(1).click();
|
||||||
|
await expect(app.noteTreeActiveNote).toContainText("Text notes");
|
||||||
|
|
||||||
// Refresh the page and check the order.
|
// Refresh the page and check the order.
|
||||||
await app.goto( { preserveTabs: true });
|
await app.goto( { preserveTabs: true });
|
||||||
|
@ -65,9 +65,12 @@ export default class App {
|
|||||||
async goToNoteInNewTab(noteTitle: string) {
|
async goToNoteInNewTab(noteTitle: string) {
|
||||||
const autocomplete = this.currentNoteSplit.locator(".note-autocomplete");
|
const autocomplete = this.currentNoteSplit.locator(".note-autocomplete");
|
||||||
await autocomplete.fill(noteTitle);
|
await autocomplete.fill(noteTitle);
|
||||||
await expect(this.currentNoteSplit.locator(".note-detail-empty-results")).toContainText(noteTitle);
|
|
||||||
await autocomplete.press("ArrowDown");
|
const resultsSelector = this.currentNoteSplit.locator(".note-detail-empty-results");
|
||||||
await autocomplete.press("Enter");
|
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"
|
||||||
|
.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
async goToSettings() {
|
async goToSettings() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user