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/ImageGraph
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/ImageGraph')
-rw-r--r--plugins/ImageGraph/tests/UI/ImageGraph_spec.js41
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png3
-rw-r--r--plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png3
5 files changed, 53 insertions, 0 deletions
diff --git a/plugins/ImageGraph/tests/UI/ImageGraph_spec.js b/plugins/ImageGraph/tests/UI/ImageGraph_spec.js
new file mode 100644
index 0000000000..089e06b168
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/ImageGraph_spec.js
@@ -0,0 +1,41 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * ImageGraph plugin screenshot tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("ImageGraph", function () {
+ this.timeout(0);
+
+ function getImageGraphUrl(apiModule, apiAction, graphType, period, date) {
+ return "index.php?module=API&method=ImageGraph.get&idSite=1&width=500&height=250&apiModule=" + apiModule + "&apiAction=" + apiAction
+ + "&graphType=" + graphType + "&period=" + period + "&date=" + date;
+ }
+
+ it("should render evolution graphs correctly", function (done) {
+ expect.screenshot('evolution_graph').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('VisitsSummary', 'get', 'evolution', 'month', '2011-06-01,2012-06-01'));
+ }, done);
+ });
+
+ it("should render horizontal bar graphs correctly", function (done) {
+ expect.screenshot('horizontal_bar').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('UserSettings', 'getBrowser', 'horizontalBar', 'year', '2012-01-01'));
+ }, done);
+ });
+
+ it("should render vertical bar graphs correctly", function (done) {
+ expect.screenshot('vertical_bar').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('UserCountry', 'getCountry', 'verticalBar', 'year', '2012-01-01'));
+ }, done);
+ });
+
+ it("should render pie graphs correctly", function (done) {
+ expect.screenshot('pie').to.be.similar(.95).to.capture(function (page) {
+ page.load(getImageGraphUrl('DevicesDetection', 'getOsVersions', 'pie', 'year', '2012-01-01'));
+ }, done);
+ });
+}); \ No newline at end of file
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png
new file mode 100644
index 0000000000..d0f8abe9d9
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_evolution_graph.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:9ba345b1629e2b4ba2fcbd00f893ad5b3a0fd0dcb2111ed6ba5a7fa6e8bcc64c
+size 11324
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png
new file mode 100644
index 0000000000..9e47bd6438
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_horizontal_bar.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e1f2130952eab4290e33548654633b5855539583c12a618fcc1226aa7d1424ce
+size 13748
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png
new file mode 100644
index 0000000000..e8d583ec8a
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_pie.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c86bbbe8925d13fd67a03878bc91eec82966a3041250f1e4d9489aeb3cf9fbaf
+size 18970
diff --git a/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png
new file mode 100644
index 0000000000..e358ad8c0b
--- /dev/null
+++ b/plugins/ImageGraph/tests/UI/expected-screenshots/ImageGraph_vertical_bar.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5d8772af7d359169027df85c15319612d4359a2607d672487b1cb4bed96a08db
+size 6302