From bba5c639e5a074b6e6a3f673d3b579de5f42e20b Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Sun, 18 Oct 2015 01:19:24 -0700
Subject: [PATCH] Remove port manually in installation tracking code generator
 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..6aca4b0b78 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);
+
+            // manually remove port in tracking code, since ui-test.php won't be using the correct INI config file
+            page.evaluate(function () {
+                $('pre').each(function () {
+                    var html = $(this).html();
+                    html = html.replace(/localhost\:[0-9]+/g, 'localhost');
+                    $(this).html(html);
+                });
+            });
         }, done);
     });
 
-- 
GitLab