Skip to content

Commit

Permalink
fix: checkPageUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
eleanorreem committed Aug 27, 2024
1 parent 6863099 commit 3d0233f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ Cypress.Commands.add('checkLink', (href, text) => {
});

Cypress.Commands.add('checkPageUrl', (url, locale = 'en') => {
const localePart = locale === 'en' ? '' : `/${locale}`;
const localePart = locale === 'en' ? '' : `${locale}/`;
const pageUrl = `${Cypress.config('baseUrl')}/${localePart}${url}`;
cy.url().should('be.equal', pageUrl);
});
Expand Down

0 comments on commit 3d0233f

Please sign in to comment.