diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-10-06 12:54:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-06 12:54:11 +0300 |
commit | 39a522ec3420fdbf64badd6cf35f3e3503e9f0a8 (patch) | |
tree | a60a6c5263f6b3942d00404c190dab86111e852a | |
parent | 97ce8b4587c055b0c5f96481062756e074161146 (diff) | |
parent | 385ddfc9c33c29f22b36ef05b4abcd21710d152a (diff) |
Retry ui tests + some random UI test fix (hide changing blog post and date) (#10698)
-rw-r--r-- | plugins/RssWidget/stylesheets/rss.less | 6 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png | 4 | ||||
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_not_segmented.png | 4 | ||||
-rw-r--r-- | tests/UI/specs/ActionsDataTable_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/DashboardManager_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/Overlay_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/SegmentSelectorEditor_spec.js | 3 | ||||
-rw-r--r-- | tests/UI/specs/UIIntegration_spec.js | 11 | ||||
-rw-r--r-- | tests/UI/specs/VisitorMap_spec.js | 2 |
9 files changed, 26 insertions, 10 deletions
diff --git a/plugins/RssWidget/stylesheets/rss.less b/plugins/RssWidget/stylesheets/rss.less index 11f4d9dbbe..5becda42f3 100644 --- a/plugins/RssWidget/stylesheets/rss.less +++ b/plugins/RssWidget/stylesheets/rss.less @@ -31,3 +31,9 @@ font-size: 13px; color: #333333; } + +/* hide changing blog post title and date in UI test */ +.uiTest .rss-title, .uiTest .rss-date { + visibility:hidden; + +}
\ No newline at end of file diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png index 87b82189f8..c31803e482 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7809e3398fe17d090a3416144c3ab099d754728e93efd465dbba77d55f9e712e -size 488526 +oid sha256:add381b4f3751dd6d07fab5268258308f3c708398e89897289c66d5b0bd4b5cd +size 484850 diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_not_segmented.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_not_segmented.png index 91125c7a9c..e039dfd1ff 100644 --- a/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_not_segmented.png +++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitor_profile_not_segmented.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0643bf59751bacd616d9939d172df5b3a962993ec72a93cc3547d56974b5a15d -size 471571 +oid sha256:5f5d739ebb23695b9a205c9d965ee705ec9f6807c4d35973ee6ddb6de368edc3 +size 765265 diff --git a/tests/UI/specs/ActionsDataTable_spec.js b/tests/UI/specs/ActionsDataTable_spec.js index a870b842b8..4f24ecaeb1 100644 --- a/tests/UI/specs/ActionsDataTable_spec.js +++ b/tests/UI/specs/ActionsDataTable_spec.js @@ -60,6 +60,7 @@ describe("ActionsDataTable", function () { it("should display pageview percentages when hovering over pageviews column", function (done) { expect.screenshot('pageview_percentages').to.be.capture(function (page) { page.mouseMove('tr:contains("thankyou") td.column:eq(1)'); + page.wait(1000); }, done); }); @@ -68,6 +69,7 @@ describe("ActionsDataTable", function () { var row = 'tr:contains("thankyou") '; page.mouseMove(row + 'td.column:first'); page.mouseMove(row + 'td.label .actionSegmentVisitorLog'); + page.wait(1000); }, done); }); diff --git a/tests/UI/specs/DashboardManager_spec.js b/tests/UI/specs/DashboardManager_spec.js index a2bc2aaa94..512f5f4b79 100644 --- a/tests/UI/specs/DashboardManager_spec.js +++ b/tests/UI/specs/DashboardManager_spec.js @@ -54,6 +54,8 @@ describe("DashboardManager", function () { }); it("should create new dashboard with new default widget selection when create dashboard process completed", function (done) { + this.retries(3); + expect.screenshot("create_new").to.be.capture(function (page) { page.click('.dashboard-manager .title'); page.click('li[data-action=createDashboard]'); diff --git a/tests/UI/specs/Overlay_spec.js b/tests/UI/specs/Overlay_spec.js index 79de66f8cc..53888b14ac 100644 --- a/tests/UI/specs/Overlay_spec.js +++ b/tests/UI/specs/Overlay_spec.js @@ -9,6 +9,8 @@ // TODO: should be stored in Overlay plugin describe("Overlay", function () { + this.retries(3); + this.timeout(0); var url = null; diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js index 4c85e89c24..1caf61b5fe 100644 --- a/tests/UI/specs/SegmentSelectorEditor_spec.js +++ b/tests/UI/specs/SegmentSelectorEditor_spec.js @@ -28,6 +28,9 @@ describe("SegmentSelectorEditorTest", function () { }); it("should open segment editor when edit link clicked for existing segment", function (done) { + + this.retries(3); + expect.screenshot("2_segment_editor_update").to.be.captureSelector(selectorsToCapture, function (page) { page.click('.segmentList .editSegment:first'); page.wait(1000); diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index 0f6d3866e2..443b10ced6 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -710,24 +710,23 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? }); it('should not apply current segmented when opening visitor log', function (done) { + this.retries(3); + var url = "?" + widgetizeParams + "&" + generalParams + "&moduleToWidgetize=Live&actionToWidgetize=getVisitorLog&segment=visitCount==2&enableAnimation=0"; delete testEnvironment.queryParamOverride.visitorId; testEnvironment.save(); expect.screenshot("visitor_profile_not_segmented").to.be.capture(function (page) { + // as the process sometimes hang, we force timeout of 15s + page.settings.resourceTimeout = 15000; + page.load(url); page.evaluate(function () { $('.visitor-log-visitor-profile-link').first().click(); }); - page.evaluate(function () { - $(document).ready(function () { - $('.visitor-profile-show-map').click(); - }); - }); - page.wait(1000); }, done); }); diff --git a/tests/UI/specs/VisitorMap_spec.js b/tests/UI/specs/VisitorMap_spec.js index eb480c6010..c8685a3e7f 100644 --- a/tests/UI/specs/VisitorMap_spec.js +++ b/tests/UI/specs/VisitorMap_spec.js @@ -16,6 +16,8 @@ describe("VisitorMap", function () { + "actionToWidgetize=visitorMap&viewDataTable=table&filter_limit=5&isFooterExpandedInDashboard=1"; it("should display the bounce rate metric correctly", function (done) { + this.retries(3); + expect.screenshot('bounce_rate').to.be.similar(0.002).to.capture(function (page) { page.load(url); page.evaluate(function () { |