Skip to content

Commit a9bdbf9

Browse files
committed
test: links no more duplicated
TH-1409 TH-1427. TH-1427 removed the duplicated links, so it should no longer be required to double the result count in browser tests.
1 parent 1c541f9 commit a9bdbf9

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

apps/events-helsinki/browser-tests/search-page/search-page.testcafe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ test('Verify searching', async () => {
3232
test('Verify navigation between the search page and event details page', async (t) => {
3333
await searchPage.verify();
3434
const results = searchPage.results;
35-
await t.expect(results.count).eql(10 * 2); // all links twice
35+
await t.expect(results.count).eql(10);
3636
const firstCard = results.nth(0);
3737
const lastCard = results.nth(-1);
3838
testNavigationFromSearchToDetailsAndBack(firstCard);

apps/hobbies-helsinki/browser-tests/search-page/search-page.testcafe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test('Verify searching', async () => {
2828
test('Verify navigation between the search page and event details page', async (t) => {
2929
await searchPage.verify();
3030
const results = searchPage.results;
31-
await t.expect(results.count).eql(10 * 2); // all links twice
31+
await t.expect(results.count).eql(10);
3232
const firstCard = results.nth(0);
3333
const lastCard = results.nth(-1);
3434
testNavigationFromSearchToDetailsAndBack(firstCard);

packages/common-tests/browser-tests/page-model/eventSearchPage.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ class EventSearchPage {
9999
if (searchType === 'Venue')
100100
await t.expect(this.notFoundResultVenues.exists).notOk();
101101
const results = this.results;
102-
// NOTE: the link is there twice
103-
await t.expect(results.count).gte(minResults * 2); // At least one result should be found.
104-
await t.expect(results.count).lte(maxResults * 2); // max 10 result per page
102+
await t.expect(results.count).gte(minResults); // At least one result should be found.
103+
await t.expect(results.count).lte(maxResults); // max 10 result per page
105104
}
106105

107106
public async expectNoSearchResults(searchType: SearchType = 'GeneralEvent') {

0 commit comments

Comments
 (0)