From cde04663c3846c9b43f2c979f87d8e813b56c933 Mon Sep 17 00:00:00 2001 From: diosmosis <benaka@piwik.pro> Date: Sun, 20 Sep 2015 18:00:19 -0700 Subject: [PATCH] Add tests for loading row evolution & segmented visitor log popups when segment is selected in segment editor. --- tests/UI/specs/UIIntegration_spec.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index 97e3afad93..1334a9dd19 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -614,5 +614,28 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? }, done); }); + // extra segment tests + it('should load the row evolution page correctly when a segment is selected', function (done) { + var url = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-01-13#?module=CustomVariables&action=menuGetCustomVariables&idSite=1&period=year&date=2012-01-13"; + expect.page(url).contains('.ui-dialog > .ui-dialog-content > div.rowevolution:visible', 'segmented_rowevolution', function (page) { + page.click('.segmentationTitle'); + page.click('.segname:contains(From Europe)'); + page.mouseMove('table.dataTable tbody tr:first-child'); + page.mouseMove('a.actionRowEvolution:visible'); // necessary to get popover to display + page.click('a.actionRowEvolution:visible'); + }, done); + }); + + it('should load the segmented visitor log correctly when a segment is selected', function (done) { + var url = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-01-13#?module=CustomVariables&action=menuGetCustomVariables&idSite=1&period=year&date=2012-01-13"; + expect.page(url).contains('.ui-dialog > .ui-dialog-content > div.dataTableVizVisitorLog:visible', 'segmented_visitorlog', function (page) { + page.click('.segmentationTitle'); + page.click('.segname:contains(From Europe)'); + + page.mouseMove('table.dataTable tbody tr:first-child'); + page.mouseMove('a.actionSegmentVisitorLog:visible'); // necessary to get popover to display + page.click('a.actionSegmentVisitorLog:visible'); + }, done); + }); }); \ No newline at end of file -- GitLab