From 4173de5328c51b7fb49b2b51bd024a3c9bc19ad8 Mon Sep 17 00:00:00 2001
From: diosmosis <benaka@piwik.pro>
Date: Thu, 15 Oct 2015 18:10:27 -0700
Subject: [PATCH] Add UI test for loading same page.

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

diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index ddb7bf6456..e9424f25fb 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -82,7 +82,13 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
     it('should load visitors > overview page correctly', function (done) {
         expect.screenshot("visitors_overview").to.be.captureSelector('.pageWrap,.expandDataTableFooterDrawer', function (page) {
             // use columns query param to make sure columns works when supplied in URL fragment
-            page.load("?" + urlBase + "#" + generalParams + "&module=VisitsSummary&action=index&columns=nb_visits,nb_actions");
+            page.load("?" + urlBase + "#/?" + generalParams + "&module=VisitsSummary&action=index&columns=nb_visits,nb_actions");
+        }, done);
+    });
+
+    it('should reload the visitors > overview page when clicking on the visitors overview page element again', function (done) {
+        expect.screenshot("visitors_overview").to.be.captureSelector("visitors_overview_reloaded", '.pageWrap,.expandDataTableFooterDrawer', function (page) {
+            page.click('#VisitsSummary_index > a.item');
         }, done);
     });
 
-- 
GitLab