Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@matomo.org>2021-03-21 18:34:03 +0300
committerGitHub <noreply@github.com>2021-03-21 18:34:03 +0300
commit9a9e57b2d5a60dee61bf5496067595f2d6f21a6f (patch)
treef17b6b094930a6678b117de5eb30b6e6f2285e3f
parent59ee8ce9c8ced7c0fab5d5a910cb5ef4c3a901f4 (diff)
Fix remaining regressions & ui tests (#17360)
* fix som ui tests * improve randomly failing ui test * Ensure not to abort ajax requests on initial page load * updates expected ui files * fix more ui tests * adds missing ui screenshot * updates expected ui file
-rw-r--r--plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js8
-rw-r--r--plugins/Transitions/tests/UI/Transitions_spec.js3
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png4
-rw-r--r--plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png4
-rw-r--r--plugins/UsersManager/tests/UI/UsersManager_spec.js2
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_category_help.png3
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png4
-rw-r--r--tests/UI/specs/UIIntegration_spec.js6
9 files changed, 26 insertions, 12 deletions
diff --git a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
index 0928858d98..5a9f301370 100644
--- a/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
+++ b/plugins/CoreHome/angularjs/reporting-menu/reportingmenu.controller.js
@@ -24,6 +24,8 @@
var showSubcategoryHelpOnLoad = null;
+ var initialLoad = true;
+
$scope.currentCategory = piwikUrl.getSearchParam('category');
$scope.currentSubcategory = piwikUrl.getSearchParam('subcategory');
@@ -218,7 +220,9 @@
});
$rootScope.$on('piwikPageChange', function (event) {
- globalAjaxQueue.abort();
+ if (!initialLoad) {
+ globalAjaxQueue.abort();
+ }
$scope.helpShownCategory = null;
$scope.currentCategory = piwikUrl.getSearchParam('category');
@@ -230,6 +234,8 @@
}
$('#loadingError').hide();
+
+ initialLoad = false;
});
}
})();
diff --git a/plugins/Transitions/tests/UI/Transitions_spec.js b/plugins/Transitions/tests/UI/Transitions_spec.js
index 2261967734..4d2ebb61ad 100644
--- a/plugins/Transitions/tests/UI/Transitions_spec.js
+++ b/plugins/Transitions/tests/UI/Transitions_spec.js
@@ -39,8 +39,11 @@ describe("Transitions", function () {
});
it('should load the transitions popup correctly for the page urls report', async function() {
+ await page.goto('about:blank');
await page.goto("?" + urlBase + "#?" + generalParams + "&category=General_Actions&subcategory=General_Pages&"
+ "popover=RowAction$3ATransitions$3Aurl$3Ahttp$3A$2F$2Fpiwik.net$2Fdocs$2Fmanage-websites$2F");
+ await page.waitFor(500);
+ await page.waitForNetworkIdle();
await page.hover('.Transitions_CurveTextRight');
expect(await page.screenshotSelector('.ui-dialog')).to.matchImage('transitions_popup_urls');
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png
index 82b59c80a5..b6bd0e6187 100644
--- a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_cities.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b8fa287087f6e90df90f91566013e868fb4fb8ed7e1a95d474fbae6efcc09552
-size 114508
+oid sha256:1e6eab272abfcfe11e07d8418a4ae36b6be24940c7e24b14bd66daca7e039971
+size 116131
diff --git a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png
index 5159225887..8e2afb3e08 100644
--- a/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png
+++ b/plugins/UserCountryMap/tests/UI/expected-screenshots/VisitorMap_regions.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c1bb4c48dabc5e484d7e3d93db825f25590805c582016112178af4355fada02c
-size 113953
+oid sha256:60331f813404c415e2fd3262c24844cfa2de8fce0a9fc980c8051493737c26ec
+size 115647
diff --git a/plugins/UsersManager/tests/UI/UsersManager_spec.js b/plugins/UsersManager/tests/UI/UsersManager_spec.js
index 01ce61700b..850f142690 100644
--- a/plugins/UsersManager/tests/UI/UsersManager_spec.js
+++ b/plugins/UsersManager/tests/UI/UsersManager_spec.js
@@ -309,7 +309,7 @@ describe("UsersManager", function () {
expect(await page.screenshotSelector('.usersManager')).to.matchImage({
imageName: 'permissions_bulk_access_set',
- comparisonThreshold: 0.0008
+ comparisonThreshold: 0.001
});
});
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png
index 6d0c51b93c..6eee1cc461 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_permissions_bulk_access_set.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:90e921862d34025cc8915b1832f6c96a6967acfa60047c55d16786f92f546454
-size 110504
+oid sha256:e8abce161c3760b2e2d53a5a9470986ff1eaf8fff6986a2cc07ef50918a048de
+size 110507
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png b/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png
new file mode 100644
index 0000000000..bd8eb76ca4
--- /dev/null
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_category_help.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9cd69949116dc1c58f178b28ee6b368ebe302ac27f010d440921b5b7e7639cd
+size 124912
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png
index 9db72661d9..8bd7ee0412 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_visitors_overview_segment.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:2843fc117649fa7828b8ffbb9d65e30a4bcf2b180ea4382eecc2ab2042540f81
-size 134676
+oid sha256:035898fa91efa0be4a68850ba62658377ff13709f2213acde6867d819bf4c080
+size 108400
diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js
index 9bf8d7a329..e4c54d3ced 100644
--- a/tests/UI/specs/UIIntegration_spec.js
+++ b/tests/UI/specs/UIIntegration_spec.js
@@ -140,15 +140,17 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik?
});
it('should show category help correctly', async function () {
+ await page.goto('about:blank');
await page.goto("?" + urlBase + "#?" + generalParams + "&category=General_Visitors&subcategory=General_Overview");
await page.waitFor('.dataTable');
- await (await page.jQuery('#secondNavBar li[role=menuitem]:contains(Overview)')).hover();
- await (await page.jQuery('#secondNavBar li[role=menuitem]:contains(Overview) .item-help-icon')).click();
+ await (await page.jQuery('#secondNavBar ul ul li[role=menuitem]:contains(Overview):eq(0)')).hover();
+ await (await page.jQuery('#secondNavBar ul ul li[role=menuitem]:contains(Overview):eq(0) .item-help-icon')).click();
expect(await page.screenshotSelector('#secondNavBar,#notificationContainer')).to.matchImage('category_help');
});
// one page w/ segment
it('should load the visitors > overview page correctly when a segment is specified', async function () {
+ await page.goto('about:blank');
testEnvironment.overrideConfig('General', {
enable_segments_cache: 0
});