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:
Diffstat (limited to 'plugins/IntranetMeasurable/tests/UI')
-rw-r--r--plugins/IntranetMeasurable/tests/UI/.gitignore2
-rw-r--r--plugins/IntranetMeasurable/tests/UI/IntranetMeasurable_spec.js51
-rw-r--r--plugins/IntranetMeasurable/tests/UI/expected-screenshots/.gitkeep0
-rw-r--r--plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_add_new_dialog.png3
-rw-r--r--plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_create.png3
-rw-r--r--plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_created.png3
-rw-r--r--plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_reloaded.png3
7 files changed, 65 insertions, 0 deletions
diff --git a/plugins/IntranetMeasurable/tests/UI/.gitignore b/plugins/IntranetMeasurable/tests/UI/.gitignore
new file mode 100644
index 0000000000..f39be478e7
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/.gitignore
@@ -0,0 +1,2 @@
+/processed-ui-screenshots
+/screenshot-diffs \ No newline at end of file
diff --git a/plugins/IntranetMeasurable/tests/UI/IntranetMeasurable_spec.js b/plugins/IntranetMeasurable/tests/UI/IntranetMeasurable_spec.js
new file mode 100644
index 0000000000..c898da7214
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/IntranetMeasurable_spec.js
@@ -0,0 +1,51 @@
+/*!
+ * Piwik - free/libre analytics platform
+ *
+ * Site selector screenshot tests.
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+describe("IntranetMeasurable", function () {
+ this.timeout(0);
+ this.fixture = "Piwik\\Plugins\\SitesManager\\tests\\Fixtures\\ManySites";
+
+ var url = "?module=SitesManager&action=index&idSite=1&period=day&date=yesterday&showaddsite=false";
+
+ before(function () {
+ testEnvironment.pluginsToLoad = ['IntranetMeasurable'];
+
+ testEnvironment.save();
+ });
+
+ function assertScreenshotEquals(screenshotName, done, test, selector)
+ {
+ expect.screenshot(screenshotName).to.be.captureSelector(selector, test, done);
+ }
+
+ it("should show intranet selection", function (done) {
+ assertScreenshotEquals("add_new_dialog", done, function (page) {
+ page.load(url);
+ page.click('.SitesManager .addSite:first');
+ }, '.modal.open');
+ });
+
+ it("should load intranet specific fields", function (done) {
+ assertScreenshotEquals("intranet_create", done, function (page) {
+ page.click('.modal.open .btn:contains(Intranet)');
+ page.evaluate(function () {
+ $('.form-help:contains(UTC time is)').hide();
+ });
+ page.wait(250);
+ }, '.editingSite');
+ });
+
+ it("should load intranet specific fields", function (done) {
+ assertScreenshotEquals("intranet_created", done, function (page) {
+ page.sendKeys('.editingSite [placeholder="Name"]', 'My intranet');
+ page.sendKeys('.editingSite [name="urls"]', 'https://www.example.com');
+ page.click('.editingSiteFooter input.btn');
+ }, '.site[type=intranet]');
+ });
+
+}); \ No newline at end of file
diff --git a/plugins/IntranetMeasurable/tests/UI/expected-screenshots/.gitkeep b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/.gitkeep
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/.gitkeep
diff --git a/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_add_new_dialog.png b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_add_new_dialog.png
new file mode 100644
index 0000000000..0066cb93a6
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_add_new_dialog.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3a2c31cfc730449d51a42dc9b737af474c7d0e09e2000a902398ff3353b877a2
+size 11525
diff --git a/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_create.png b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_create.png
new file mode 100644
index 0000000000..361342b60d
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_create.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c6dd2153069832ada0e3ac5106b959147d9fcb204e972b078bab8163b6c77ffd
+size 247555
diff --git a/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_created.png b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_created.png
new file mode 100644
index 0000000000..145cdfcd4d
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_created.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:965315308d66ab9d40b520e4a7bbf9254b6df4a622236dac9d66a373e3d1bd0b
+size 14386
diff --git a/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_reloaded.png b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_reloaded.png
new file mode 100644
index 0000000000..5a2630d3de
--- /dev/null
+++ b/plugins/IntranetMeasurable/tests/UI/expected-screenshots/IntranetMeasurable_intranet_reloaded.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bcc87f8a8ae38808f008c8945cf9d353359a31c2b45526ea45ec2513d7743edb
+size 258493