From 7e0bfa54f40a880d0bb4cc810238590950cc5ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20K=C3=B6hler?= Date: Thu, 14 Nov 2024 17:03:34 +0100 Subject: [PATCH] simplify, use just regex --- backend/features/step_definitions/stepdefs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/features/step_definitions/stepdefs.js b/backend/features/step_definitions/stepdefs.js index 9d90b647..c34f9e96 100644 --- a/backend/features/step_definitions/stepdefs.js +++ b/backend/features/step_definitions/stepdefs.js @@ -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.replace(/\/$/, '') == url.trim().replace(/\/$/, '') , 'ERROR expected: ' + url.trim() + '; actual: ' + currentUrl).to.be.true + expect(currentUrl.replace(/\/$/g, '') == url.replace(/[\s]|\/\s*$/g, '') , 'ERROR expected: ' + url.replace(/[\s]|\/\s*$/g, '') + '; actual: ' + currentUrl.replace(/\/$/g, '')).to.be.true }); } catch (e) { await driver.takeScreenshot().then(async (buffer) => {