diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2016-10-20 04:00:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-20 04:00:03 +0300 |
commit | 9ffc095180d34647474097171e8cae4a76352141 (patch) | |
tree | f3b82abf17068f0fb4d7c7b4c6da5bc69e2a007f /tests | |
parent | 7eddea26a948671aabaf7e7c381c7d804660dee3 (diff) | |
parent | 1818390441cb71b74de08fb18e49d1e321153782 (diff) |
Trying to improve UI screenshots tests build (#10769)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Integration/EmailValidatorTest.php | 2 | ||||
-rw-r--r-- | tests/UI/specs/DashboardManager_spec.js | 4 | ||||
-rw-r--r-- | tests/UI/specs/MultiSites_spec.js | 8 | ||||
-rw-r--r-- | tests/UI/specs/QuickAccess_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/SegmentSelectorEditor_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/Theme_spec.js | 2 | ||||
-rw-r--r-- | tests/UI/specs/UIIntegration_spec.js | 10 |
7 files changed, 21 insertions, 9 deletions
diff --git a/tests/PHPUnit/Integration/EmailValidatorTest.php b/tests/PHPUnit/Integration/EmailValidatorTest.php index a9adff114a..8cb0c198c0 100644 --- a/tests/PHPUnit/Integration/EmailValidatorTest.php +++ b/tests/PHPUnit/Integration/EmailValidatorTest.php @@ -24,7 +24,7 @@ class EmailValidatorTest extends \PHPUnit_Framework_TestCase private function getAllTlds() { /** @var array $response */ - $response = \Piwik\Http::sendHttpRequest("http://data.iana.org/TLD/tlds-alpha-by-domain.txt", 30, null, null, null, null, null, true); + $response = \Piwik\Http::sendHttpRequest("http://data.iana.org/TLD/tlds-alpha-by-domain.txt", 60, null, null, null, null, null, true); $this->assertEquals("200", $response['status']); diff --git a/tests/UI/specs/DashboardManager_spec.js b/tests/UI/specs/DashboardManager_spec.js index 512f5f4b79..dc0c7818fe 100644 --- a/tests/UI/specs/DashboardManager_spec.js +++ b/tests/UI/specs/DashboardManager_spec.js @@ -54,13 +54,13 @@ 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]'); page.sendKeys('#createDashboardName', 'newdash2'); page.click('.modal.open .modal-footer a:contains(Ok)'); + + page.wait(2000); }, done); }); diff --git a/tests/UI/specs/MultiSites_spec.js b/tests/UI/specs/MultiSites_spec.js index 1360e6eed6..3dff0f5cc2 100644 --- a/tests/UI/specs/MultiSites_spec.js +++ b/tests/UI/specs/MultiSites_spec.js @@ -8,8 +8,6 @@ */ describe("MultiSitesTest", function () { - this.retries(3); - this.timeout(0); var generalParams = 'idSite=1&period=year&date=2012-08-09'; @@ -41,13 +39,17 @@ describe("MultiSitesTest", function () { }); it('should load the all websites dashboard correctly', function (done) { + this.retries(3); + expect.screenshot('all_websites').to.be.captureSelector(selector, function (page) { page.load("?" + generalParams + "&module=MultiSites&action=index"); - page.wait(1000); + page.wait(3000); }, done); }); it('should load next page correctly', function (done) { + this.retries(3); + expect.screenshot('all_websites_page_1').to.be.captureSelector(selector, function (page) { page.click('.paging .next'); page.wait(1000); diff --git a/tests/UI/specs/QuickAccess_spec.js b/tests/UI/specs/QuickAccess_spec.js index 52a37e4c58..ff7493a704 100644 --- a/tests/UI/specs/QuickAccess_spec.js +++ b/tests/UI/specs/QuickAccess_spec.js @@ -8,6 +8,8 @@ */ describe("QuickAccess", function () { + this.retries(3); + var selectorToCapture = ".quick-access,.quick-access .dropdown"; this.timeout(0); diff --git a/tests/UI/specs/SegmentSelectorEditor_spec.js b/tests/UI/specs/SegmentSelectorEditor_spec.js index 1caf61b5fe..5b22be9ad1 100644 --- a/tests/UI/specs/SegmentSelectorEditor_spec.js +++ b/tests/UI/specs/SegmentSelectorEditor_spec.js @@ -1,6 +1,6 @@ /*! * Piwik - free/libre analytics platform - * + * * ViewDataTable screenshot tests. * * @link http://piwik.org diff --git a/tests/UI/specs/Theme_spec.js b/tests/UI/specs/Theme_spec.js index a7fffd2f30..eb9b9dfff3 100644 --- a/tests/UI/specs/Theme_spec.js +++ b/tests/UI/specs/Theme_spec.js @@ -10,6 +10,8 @@ var fs = require('fs'); describe("Theme", function () { + this.retries(2); + this.timeout(0); function clearAssets() { diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index 89b7cfc805..9e7ed5dd12 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -373,6 +373,7 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? }); it('should load the widgetized all websites dashboard correctly', function (done) { + this.retries(3); expect.screenshot('widgetize_allwebsites').to.be.capture(function (page) { page.load("?" + widgetizeParams + "&" + generalParams + "&moduleToWidgetize=MultiSites&actionToWidgetize=standalone"); }, done); @@ -658,6 +659,8 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? // visitor profile popup it('should load the visitor profile popup correctly', function (done) { + this.retries(3); + expect.screenshot('visitor_profile_popup').to.be.capture(function (page) { page.load("?" + widgetizeParams + "&" + idSite2Params + "&moduleToWidgetize=Live&actionToWidgetize=getVisitorProfilePopup" + "&enableAnimation=0"); @@ -704,13 +707,16 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? var url = "?module=CoreHome&action=index&idSite=1&period=year&date=2012-01-13#?category=General_Visitors&subcategory=CustomVariables_CustomVariables&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.wait(1000); page.click('.segmentationTitle'); + page.wait(500); page.click('.segname:contains(From Europe)'); - + page.wait(500); page.mouseMove('table.dataTable tbody tr:first-child'); + page.wait(500); page.mouseMove('a.actionSegmentVisitorLog:visible'); // necessary to get popover to display + page.wait(500); page.click('a.actionSegmentVisitorLog:visible'); - page.wait(1000); }, done); |