File tree Expand file tree Collapse file tree 6 files changed +18
-12
lines changed Expand file tree Collapse file tree 6 files changed +18
-12
lines changed Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ list help::
1616 @echo " <PRE-COMMIT>"
1717 @echo " setup-pre-commit: Sets up pre-commit (assuming it is installed)"
1818 @echo " <PLAYWRIGHT TESTS>"
19- @echo " tests: Runs playwright against the old theme."
20- @echo " tests-update-screenshots: Runs playwright against the old theme."
19+ @echo " tests: Runs playwright against the new theme."
20+ @echo " tests-update-screenshots: Runs playwright against the new theme."
2121
2222.PHONY : biome-format biome-lint biome-all setup-pre-commit tests build-example-site
2323FLAG :=
Original file line number Diff line number Diff line change 4343 {{ partial "lucide" (dict "context" . "icon" "chevron-down") }}
4444 </ span >
4545 </ button >
46- < div class ="dropdown-content " id ="dropdown-content " data-testid ="header__f5sites_content ">
46+ < div class ="dropdown-content " id ="dropdown-content " data-testid ="header__f5sites__content ">
4747 < ul >
4848 {{ range $f5Sites }}
4949 < li >
Original file line number Diff line number Diff line change @@ -14,7 +14,8 @@ export default defineConfig({
1414 screenshots : 'only-on-failure' ,
1515 video : 'retain-on-failure' ,
1616 trace : 'on-first-retry' ,
17- timezoneId : 'America/Los_Angeles' ,
17+ geolocation : { longitude : - 8.486316 , latitude : 51.896893 } ,
18+ permissions : [ 'geolocation' ] ,
1819 } ,
1920 projects : [
2021 {
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ test.describe('Smoke test for header', () => {
4646 test ( 'F5 Sites button works' , async ( { page } ) => {
4747 const f5SitesButton = await page . getByTestId ( 'header__f5sites__button' ) ;
4848 await f5SitesButton . click ( ) ;
49- const f5SitesContent = await page . getByTestId ( 'header__f5sites_content ' ) ;
49+ const f5SitesContent = await page . getByTestId ( 'header__f5sites__content ' ) ;
5050 await expect ( f5SitesContent . count ( ) ) . toBeTruthy ( ) ;
5151 } ) ;
5252} ) ;
Original file line number Diff line number Diff line change @@ -40,6 +40,10 @@ async function openPage(page, sidebarPage) {
4040}
4141
4242test . describe ( 'Smoke test for sidebar' , ( ) => {
43+
44+ // Slow test
45+ test . setTimeout ( 100_000 ) ;
46+
4347 test . beforeEach ( async ( { page } ) => {
4448 await page . goto ( '/test-product/' ) ;
4549 } ) ;
Original file line number Diff line number Diff line change @@ -12,13 +12,14 @@ export async function runSmokeTestOnPage(page) {
1212
1313// THE GDPR Consent button appears when test is run from EU locations. This handles that popup.
1414export async function handleConsentPopup ( page ) {
15- const consentContent = page . locator ( '#truste-consent-content' ) ;
16- const isConsentContentVisibile = await consentContent . isVisible ( ) ;
17- if ( isConsentContentVisibile ) {
18- const consentButton = page . locator ( '#truste-consent-required' ) ;
19- expect ( consentButton ) . toBeVisible ( ) ;
20- await consentButton . click ( ) ;
21- }
15+ await page . addLocatorHandler (
16+ page . locator ( '#truste-consent-content' ) ,
17+ async ( ) => {
18+ const consentButton = page . locator ( '#truste-consent-required' ) ;
19+ expect ( consentButton ) . toBeVisible ( ) ;
20+ await consentButton . click ( ) ;
21+ }
22+ ) ;
2223}
2324
2425const sleep = ( ms ) => new Promise ( ( r ) => setTimeout ( r , ms ) ) ;
You can’t perform that action at this time.
0 commit comments