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@piwik.org>2018-03-30 23:56:02 +0300
committerGitHub <noreply@github.com>2018-03-30 23:56:02 +0300
commitda1fec50e51071c775278ac2b9c2eb5db7a20f2f (patch)
tree704e7d0ebe0477fe02c3ac9057e8bb67f27b079b /plugins/MultiSites
parent119e62cd5cc076396dd83736e402d4f470acadd8 (diff)
Moves various UI tests to their plugins (#12649)
* move Overlay UI tests to Overlay plugin * remove UI files that has been moved * move Login UI tests to Login plugin * check for element instead of comparing screenshots * Move Installation UI tests to it's plugin * Move UI tests for Marketplace to Marketplace plugin * Updates Sync Screenshots command to download test files to correct directories * ensure shortcut help is always tested with same useragent * Move VisitorMap UI tests to UserCountryMap plugin * Move Morpheus UI tests to plugin * Move MultiSites UI tests zu plugin * Move ActionsDataTable UI tests to Actions plugin * Renames Test directories to tests * Move UsersManager UI tests to plugin * Move CoreUpdater UI tests to plugin * Move DBStats UI tests to plugin * Move Transitions UI tests to plugin * Move Insights UI tests to plugin * improve UI tests splitting on travis * Moves SegmentEditor UI tests to plugin * Moves SitesManager UI tests to plugin * Moves ImageGraph UI tests to plugin * move live ui test files to git lfs * remove retry * update test file * improve splitting for travis * prevent test from failing randomly
Diffstat (limited to 'plugins/MultiSites')
-rw-r--r--plugins/MultiSites/tests/UI/MultiSites_spec.js72
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png3
-rw-r--r--plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png3
5 files changed, 84 insertions, 0 deletions
diff --git a/plugins/MultiSites/tests/UI/MultiSites_spec.js b/plugins/MultiSites/tests/UI/MultiSites_spec.js
new file mode 100644
index 0000000000..832955e70a
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/MultiSites_spec.js
@@ -0,0 +1,72 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Screenshot integration tests for MultiSites.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("MultiSitesTest", function () {
+ this.timeout(0);
+
+ var generalParams = 'idSite=1&period=year&date=2012-08-09';
+ var selector = '#multisites,.expandDataTableFooterDrawer';
+
+ var createdSiteId = null;
+
+ before(function (done) {
+ var callback = function (error, response) {
+ if (error) {
+ done(error, response);
+ return;
+ }
+
+ createdSiteId = response.value;
+ done();
+ };
+
+ testEnvironment.callApi("SitesManager.addSite", {
+ siteName: '%3CMy%20website%22%27%3E%3B%2C%3F with a very very very very long stupid name',
+ urls: 'http%3A%2F%2Fpiwik.org'},
+ callback);
+ });
+
+ after(function (done) {
+ if (createdSiteId) {
+ testEnvironment.callApi("SitesManager.deleteSite", {idSite: createdSiteId}, done);
+ }
+ });
+
+ 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(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);
+ }, done);
+ });
+
+ it('should search correctly', function (done) {
+ expect.screenshot('all_websites_search').to.be.captureSelector(selector, function (page) {
+ page.sendKeys('.site_search input', 'Site');
+ page.click('.site_search .search_ico');
+ }, done);
+ });
+
+ it('should toggle sort order when click on current metric', function (done) {
+ expect.screenshot('all_websites_changed_sort_order').to.be.captureSelector(selector, function (page) {
+ page.click('#visits .heading');
+ }, done);
+ });
+
+});
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png
new file mode 100644
index 0000000000..3c2fc1ef8b
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28cde14696cab904cdf1ff20caa839456f559ef1b4c165ba5b02fcd42a351d3b
+size 77346
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png
new file mode 100644
index 0000000000..98a1bf9f35
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:15a766fe64a245931131000412d5e2ad9ede120306d9dd2b12960772d7211044
+size 67240
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png
new file mode 100644
index 0000000000..3c2fc1ef8b
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:28cde14696cab904cdf1ff20caa839456f559ef1b4c165ba5b02fcd42a351d3b
+size 77346
diff --git a/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png
new file mode 100644
index 0000000000..2d2063916a
--- /dev/null
+++ b/plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e9ebb3b39db30606aacecc9cb2b0c1695d7e9447e65244b2ef61d22f5821fe64
+size 67203