Skip to content

Commit

Permalink
trim and ignore trailing '/'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonycoo committed Nov 14, 2024
1 parent 9926016 commit c4b2f78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/features/step_definitions/stepdefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ Then('So I will be navigated to the website: {string}', async function checkUrl(
const world = this;
try {
await driver.getCurrentUrl().then(async (currentUrl) => {
expect(currentUrl == url , 'ERROR expected: ' + url + '; actual: ' + currentUrl).to.be.true
expect(currentUrl.replace(/\/$/, '') == url.trim().replace(/\/$/, '') , 'ERROR expected: ' + url.trim() + '; actual: ' + currentUrl).to.be.true
});
} catch (e) {
await driver.takeScreenshot().then(async (buffer) => {
Expand Down

0 comments on commit c4b2f78

Please sign in to comment.