From a2ba1ae209ee6bc4c5cd3a5347c99edd10727b42 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Sat, 17 Oct 2015 21:53:43 -0700
Subject: [PATCH] Remove port manually from test since Piwik JS uses
 document.location to construct the link.

---
 tests/UI/specs/UIIntegration_spec.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index bc6d71dbad..8c19f15ebf 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -563,6 +563,13 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
             page.load("?" + generalParams + "&module=Widgetize&action=index");
             page.mouseMove('.widgetpreview-categorylist>li:contains(Visits Summary)');
             page.mouseMove('li[uniqueid=widgetVisitsSummarygetEvolutionGraphcolumnsArray]');
+            page.evaluate(function () {
+                $('.formEmbedCode').each(function () {
+                    var val = $(this).val();
+                    val = val.replace(/localhost\:[0-9]+/g, 'localhost');
+                    $(this).val(val);
+                });
+            });
         }, done);
     });
 
-- 
GitLab