Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions pages/SearchResultsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ export class SearchResultsPage {
}

async expectResultContainingText(expectedText: string): Promise<void> {
await expect(
this.page.getByText(expectedText, { exact: false }).first()
).toBeVisible({ timeout: 10000 });
}
const matchingResult = this.page
.locator(
'a[href*="/release/"], a[href*="/master/"], a[href*="/artist/"], a[href*="/label/"]'
)
.filter({ hasText: expectedText })
.first();

await expect(matchingResult).toBeVisible({ timeout: 15000 });
}

async openReleaseOrMasterResult(expectedText: string): Promise<void> {
const releaseOrMasterResult = this.page
Expand Down
2 changes: 1 addition & 1 deletion test-data/search-cases.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
{
"type": "label",
"query": "Blue Note",
"query": "Blue Note Records",
"expectedText": "Blue Note"
}
]
Loading