diff --git a/pages/SearchResultsPage.ts b/pages/SearchResultsPage.ts index 5765b6f..988b857 100644 --- a/pages/SearchResultsPage.ts +++ b/pages/SearchResultsPage.ts @@ -25,10 +25,15 @@ export class SearchResultsPage { } async expectResultContainingText(expectedText: string): Promise { - 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 { const releaseOrMasterResult = this.page diff --git a/test-data/search-cases.json b/test-data/search-cases.json index ac994df..ef0a2dd 100644 --- a/test-data/search-cases.json +++ b/test-data/search-cases.json @@ -11,7 +11,7 @@ }, { "type": "label", - "query": "Blue Note", + "query": "Blue Note Records", "expectedText": "Blue Note" } ] \ No newline at end of file