Skip to content

Commit

Permalink
e2e: Add tests for localized /plans route logged-out redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
yuliyan committed Sep 3, 2024
1 parent 8b21a6e commit 1193a32
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/e2e/specs/i18n/i18n__logged-out-redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ describe( 'I18N: Homepage Redirect', function () {
// Locale slug for English is not included in the path name.
const localePath = locale === 'en' ? '' : `${ locale }/`;
await page.waitForURL( DataHelper.getCalypsoURL( localePath ) );
await page.close();
}
);
} );

describe( 'I18N: Plans Page Redirect', function () {
it.each( envVariables.TEST_LOCALES as ReadonlyArray< string > )(
'Plans Page Redirect (%s)',
async function ( locale ) {
// Launch a new BrowserContext with the custom locale specified.
const page = await browser.newPage( { locale: locale } );
// Locale slug for English is not included in the path name.
const localePath = locale === 'en' ? '' : `${ locale }/`;

await page.goto( DataHelper.getCalypsoURL( `${ localePath }plans/` ) );
await page.waitForURL( DataHelper.getCalypsoURL( `${ localePath }pricing/` ) );
await page.close();
}
);
} );

0 comments on commit 1193a32

Please sign in to comment.