From aae69f25ed1d0e9df769d0dc2800ca4fb6bbfd20 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Sun, 18 Oct 2015 02:08:26 -0700
Subject: [PATCH] Get last two Overlay tests to pass.

---
 config/environment/ui-test.php | 6 ++++++
 tests/UI/specs/Overlay_spec.js | 8 ++++++++
 2 files changed, 14 insertions(+)

diff --git a/config/environment/ui-test.php b/config/environment/ui-test.php
index 4d68a6f9ba..fefb038673 100644
--- a/config/environment/ui-test.php
+++ b/config/environment/ui-test.php
@@ -20,6 +20,12 @@ return array(
                 return;
             }
 
+            if (!empty($request['module']) && $request['module'] == 'Overlay'
+                && !empty($request['action']) && $request['action'] == 'renderSidebar'
+            ) {
+                return;
+            }
+
             $config = \Piwik\Config::getInstance();
             $host = $config->tests['http_host'];
             $port = $config->tests['port'];
diff --git a/tests/UI/specs/Overlay_spec.js b/tests/UI/specs/Overlay_spec.js
index 07068e96f5..2a63870081 100644
--- a/tests/UI/specs/Overlay_spec.js
+++ b/tests/UI/specs/Overlay_spec.js
@@ -49,6 +49,14 @@ describe("Overlay", function () {
             });
             page.sendMouseEvent('mousemove', pos);
 
+            page.evaluate(function () {
+                $('div#PIS_StatusBar', $('iframe').contents()).each(function () {
+                    var html = $(this).html();
+                    html = html.replace(/localhost\:[0-9]+/g, 'localhost');
+                    $(this).html(html);
+                });
+            });
+
             removeOptOutIframe(page);
         }, done);
     });
-- 
GitLab