From e65df09f255c20e8090b6833cc877af174ecd2fb Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Fri, 16 Oct 2015 17:16:43 -0700 Subject: [PATCH] Remove port from URL in Installation UI test. --- tests/UI/specs/Installation_spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/UI/specs/Installation_spec.js b/tests/UI/specs/Installation_spec.js index 6830091da6..6119036238 100644 --- a/tests/UI/specs/Installation_spec.js +++ b/tests/UI/specs/Installation_spec.js @@ -121,6 +121,15 @@ describe("Installation", function () { }); page.click('.btn'); page.wait(3000); + + // remove the port from URLs if any so UI tests won't fail if the port isn't 80 + // TODO: code redundancy w/ UIIntegrationTest. can be fixed w/ new UI test DI environment type. + page.evaluate(function () { + $('pre').each(function () { + var html = $(this).html().replace(/localhost\:[0-9]+/g, 'localhost'); + $(this).html(html); + }); + }); }, done); }); -- GitLab