Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
obulat committed Jul 18, 2023
1 parent ee20609 commit 9915ead
Show file tree
Hide file tree
Showing 4 changed files with 5,373 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/test/playwright/e2e/load-more.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { expect, Page, test } from "@playwright/test"

import {
closeFiltersUsingCookies,
dismissAllBannersUsingCookies,
goToSearchTerm,
renderModes,
t,
Expand Down Expand Up @@ -143,11 +145,12 @@ test.describe("Load more button", () => {
context,
}) => {
const analyticsEvents = collectAnalyticsEvents(context)
await dismissAllBannersUsingCookies(page)
await closeFiltersUsingCookies(page)

await page.goto("/search/?q=cat")

await page.locator(loadMoreButton).scrollIntoViewIfNeeded()
await expect(page.locator(loadMoreButton)).toBeVisible()

const reachResultEndEvent = analyticsEvents.find(
(event) => event.n === "REACH_RESULT_END"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ for (const dir of languageDirections) {
await openFiltersTab(page)

await page.locator('input[type="checkbox"]').first().check()
await page.waitForLoadState("load")

await expectSnapshot(`filters-modal-filters-selected-${dir}.png`, page)
})
Expand Down
Loading

0 comments on commit 9915ead

Please sign in to comment.