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