1
+ import { expect } from "@playwright/test"
1
2
import { test } from "~~/test/playwright/utils/test"
2
3
import breakpoints from "~~/test/playwright/utils/breakpoints"
3
4
import {
7
8
} from "~~/test/playwright/utils/navigation"
8
9
import { setViewportToFullHeight } from "~~/test/playwright/utils/viewport"
9
10
import { languageDirections } from "~~/test/playwright/utils/i18n"
11
+ import { getH1 } from "~~/test/playwright/utils/components"
12
+ import { t } from "~~/test/unit/test-utils/i18n"
10
13
11
14
import { ALL_MEDIA , supportedSearchTypes } from "#shared/constants/media"
12
15
@@ -56,6 +59,7 @@ breakpoints.describeXl(({ breakpoint, expectSnapshot }) => {
56
59
// eslint-disable-next-line playwright/no-networkidle
57
60
await page . waitForLoadState ( "networkidle" )
58
61
62
+ await expect ( getH1 ( page , t ( "404.title" ) ) ) . toBeVisible ( )
59
63
await expectSnapshot ( page , "generic-error-ltr" , page , {
60
64
screenshotOptions : { fullPage : true } ,
61
65
} )
@@ -77,6 +81,7 @@ for (const searchType of supportedSearchTypes) {
77
81
await preparePageForTests ( page , breakpoint )
78
82
await goToSearchTerm ( page , `SearchPage500error` , { searchType } )
79
83
84
+ await expect ( getH1 ( page , t ( "404.title" ) ) ) . toBeVisible ( )
80
85
await expectSnapshot ( page , "generic-error-ltr" , page , {
81
86
screenshotOptions : { fullPage : true } ,
82
87
} )
@@ -101,6 +106,7 @@ for (const searchType of supportedSearchTypes) {
101
106
searchType,
102
107
} )
103
108
109
+ await expect ( getH1 ( page , t ( "404.title" ) ) ) . toBeVisible ( )
104
110
await expectSnapshot ( page , "generic-error" , page , {
105
111
dir,
106
112
screenshotOptions : {
@@ -136,6 +142,8 @@ for (const searchType of supportedSearchTypes) {
136
142
} )
137
143
await goToSearchTerm ( page , "cat" , { dir, searchType, mode : "CSR" } )
138
144
145
+ await expect ( getH1 ( page , t ( "serverTimeout.heading" , dir ) ) ) . toBeVisible ( )
146
+
139
147
await setViewportToFullHeight ( page )
140
148
141
149
await page . mouse . move ( 0 , 82 )
0 commit comments