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/Actions
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/Actions')
-rw-r--r--plugins/Actions/tests/UI/ActionsDataTable_spec.js125
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png3
-rw-r--r--plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png3
16 files changed, 170 insertions, 0 deletions
diff --git a/plugins/Actions/tests/UI/ActionsDataTable_spec.js b/plugins/Actions/tests/UI/ActionsDataTable_spec.js
new file mode 100644
index 0000000000..7ee45bfbc5
--- /dev/null
+++ b/plugins/Actions/tests/UI/ActionsDataTable_spec.js
@@ -0,0 +1,125 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * ActionsDataTable screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("ActionsDataTable", function () {
+ this.timeout(0);
+
+ var url = "?module=Widgetize&action=iframe&idSite=1&period=year&date=2012-08-09&moduleToWidgetize=Actions&actionToWidgetize=getPageUrls&isFooterExpandedInDashboard=1";
+
+ it("should load correctly", function (done) {
+ expect.screenshot('initial').to.be.capture(function (page) {
+ page.load(url);
+ }, done);
+ });
+
+ it("should sort column correctly when column header clicked", function (done) {
+ expect.screenshot('column_sorted').to.be.capture(function (page) {
+ page.click('th#avg_time_on_page', 3000);
+ }, done);
+ });
+
+ it("should load subtables correctly when row clicked", function (done) {
+ expect.screenshot('subtables_loaded').to.be.capture(function (page) {
+ page.evaluate(function(){
+ $('tr.subDataTable:first').click();
+ $('tr.subDataTable:eq(2)').click();
+ });
+ }, done);
+ });
+
+ it("should show configuration options", function (done) {
+ expect.screenshot('configuration_options').to.be.captureSelector('.tableConfiguration', function (page) {
+ page.click('.dropdownConfigureIcon');
+ }, done);
+ });
+
+ it("should flatten table when flatten link clicked", function (done) {
+ expect.screenshot('flattened').to.be.capture(function (page) {
+ page.click('.dataTableFlatten');
+ }, done);
+ });
+
+ it("should exclude low population rows when exclude low population link clicked", function (done) {
+ expect.screenshot('exclude_low_population').to.be.capture(function (page) {
+ page.click('.dropdownConfigureIcon');
+ page.click('.dataTableExcludeLowPopulation');
+ }, done);
+ });
+
+ it("should load normal view when switch to view hierarchical view link is clicked", function (done) {
+ expect.screenshot('unflattened').to.be.capture(function (page) {
+ page.click('.dropdownConfigureIcon span');
+ page.click('.dataTableFlatten');
+ }, done);
+ });
+
+ it("should display pageview percentages when hovering over pageviews column", function (done) {
+ this.retries(3);
+ expect.screenshot('pageview_percentages').to.be.capture(function (page) {
+ page.mouseMove('tr:contains("thankyou") td.column:eq(1)');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should generate a proper title for the visitor log segmented by the current row", function (done) {
+ this.retries(3);
+ expect.screenshot('segmented_visitor_log_hover').to.be.capture(function (page) {
+ var row = 'tr:contains("thankyou") ';
+ page.mouseMove(row + 'td.column:first');
+ page.mouseMove(row + 'td.label .actionSegmentVisitorLog');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should open the visitor log segmented by the current row", function (done) {
+ expect.screenshot('segmented_visitor_log').to.be.captureSelector('.ui-dialog', function (page) {
+ page.evaluate(function(){
+ $('tr:contains("thankyou") td.label .actionSegmentVisitorLog').click();
+ }, 3000);
+ }, done);
+ });
+
+ it("should display unique pageview percentages when hovering over unique pageviews column", function (done) {
+ this.retries(3);
+ expect.screenshot('unique_pageview_percentages').to.be.capture(function (page) {
+ page.click('.ui-widget .ui-dialog-titlebar-close');
+
+ page.mouseMove('tr:contains("thankyou") td.column:eq(2)');
+ page.wait(1000);
+ }, done);
+ });
+
+ it("should show the search when clicking on the search icon", function (done) {
+ expect.screenshot('search_visible').to.be.capture(function (page) {
+ page.click('.dataTableAction.searchAction');
+ }, done);
+ });
+
+ it("should search through table when search input entered and search button clicked and input should be visible", function (done) {
+ expect.screenshot('search').to.be.capture(function (page) {
+ page.sendKeys('.searchAction .dataTableSearchInput', 'i');
+ page.click('.searchAction .icon-search', 1500);
+ page.mouseMove('#logo', 100);
+ }, done);
+ });
+
+ it("should close search when clicking on the x icon", function (done) {
+ expect.screenshot('search_closed').to.be.capture(function (page) {
+ page.click('.searchAction .icon-close');
+ }, done);
+ });
+
+ it("should automatically expand subtables if it contains only one folder", function (done) {
+ expect.screenshot('auto_expand').to.be.capture(function (page) {
+ page.load(url + '&viewDataTable=table');
+ page.click('tr .value:contains("blog")');
+ page.click('tr .value:contains("2012")');
+ }, done);
+ });
+});
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png
new file mode 100644
index 0000000000..ed4623c453
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2bafb7590170d13adf50e652f85f5a9c916fe8d9f6c4ee95e3e90547b817524c
+size 377310
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png
new file mode 100644
index 0000000000..ba7ab2fd13
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:f0e2f7637aa4f0f22570ba6809e3738bb26755165b0dabd9b13dfa7d4465f012
+size 352618
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png
new file mode 100644
index 0000000000..a7a5aff93d
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_configuration_options.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1bb1ae2f7cfc4c0b8fdf58e76a5a2f1be30a88a7b00d71e7d3298b1844e30cbf
+size 7589
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
new file mode 100644
index 0000000000..4a3e03d153
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:288e98c77eb4f4ff40d175260de216f82afa50032a1d4f4b095f5e238c5559cc
+size 79542
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
new file mode 100644
index 0000000000..8fb04a3e91
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b6b236609a19e3710137cf38fc73c660b730746492001add90cc59d66d7c95b0
+size 478557
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png
new file mode 100644
index 0000000000..e32e283c0c
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:adfd031e477ed8e76e72d0d6ea2774b534dd118c501b13a8c6e82d8d425ebb29
+size 352012
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png
new file mode 100644
index 0000000000..eae235c336
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:99b4dc5d20badb210aa7995d60d36c018b1a371fc46f1b03483eb236cc242354
+size 71291
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png
new file mode 100644
index 0000000000..e717a0d14d
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:59288cfeb15c12178d884707cc7ef136a2a47a723b77fbc90cbda1021460c9c7
+size 84535
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png
new file mode 100644
index 0000000000..81965eee95
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c5671d5423773312e8f6ad4ec1bd7aeb5363c7aaebf1f71da4bcbefb6cc0e9d
+size 63264
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png
new file mode 100644
index 0000000000..48a7bcf3e6
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ca56eddb117fb27c2a27a419c8d8f3c41490ac9e5cc7425cb4a5dbbf00d43c22
+size 63782
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png
new file mode 100644
index 0000000000..712c4740b8
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5a949e61f2b9d00a0c0af95755d2113e047d9345ed95a76a3bd08eec5b200185
+size 424489
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png
new file mode 100644
index 0000000000..09cf131436
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d21a7cb9d45bad644cfc1ea8ffd9f8e9cbf8330da9473eacde846d3c569f948
+size 70730
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png
new file mode 100644
index 0000000000..0f02b60613
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b9c877245bd20f4a67f7f3ef2b3d3e48d8a94d048136842014d99b42e7371a23
+size 382648
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
new file mode 100644
index 0000000000..81965eee95
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5c5671d5423773312e8f6ad4ec1bd7aeb5363c7aaebf1f71da4bcbefb6cc0e9d
+size 63264
diff --git a/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png
new file mode 100644
index 0000000000..60522aac93
--- /dev/null
+++ b/plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:55a8bb4bebacbe5ca1b288a7b38a13c69469f6d0e016f5a6a5a5e1f8709e6f2e
+size 71279