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/UserCountry/tests/UI')
-rw-r--r--plugins/UserCountry/tests/UI/UserCountry_spec.js35
-rw-r--r--plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_geoip2.png3
-rw-r--r--plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_no_providers.png3
3 files changed, 41 insertions, 0 deletions
diff --git a/plugins/UserCountry/tests/UI/UserCountry_spec.js b/plugins/UserCountry/tests/UI/UserCountry_spec.js
new file mode 100644
index 0000000000..140b152ddf
--- /dev/null
+++ b/plugins/UserCountry/tests/UI/UserCountry_spec.js
@@ -0,0 +1,35 @@
+/*!
+ * Matomo - free/libre analytics platform
+ *
+ * Screenshot integration tests.
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+
+describe("UserCountry", function () {
+
+ afterEach(function () {
+ delete testEnvironment.pluginsToUnload;
+ testEnvironment.save();
+ });
+
+ it('should show geolocation admin without additional providers', async function () {
+ testEnvironment.pluginsToUnload = ['GeoIp2'];
+ testEnvironment.save();
+
+ await page.goto("?module=UserCountry&action=adminIndex");
+
+ expect(await page.screenshotSelector('#content')).to.matchImage('admin_no_providers');
+ });
+
+ it('should show geolocation admin with GeoIP2 providers', async function () {
+ testEnvironment.pluginsToLoad = ['GeoIp2'];
+ testEnvironment.save();
+
+ await page.goto("?module=UserCountry&action=adminIndex");
+
+ expect(await page.screenshotSelector('#content')).to.matchImage('admin_geoip2');
+ });
+
+});
diff --git a/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_geoip2.png b/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_geoip2.png
new file mode 100644
index 0000000000..b2b9a0746d
--- /dev/null
+++ b/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_geoip2.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:80072ca5e400445105511d146c386428b68f4d0f812c054081f5fe5539a0bf9f
+size 237893
diff --git a/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_no_providers.png b/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_no_providers.png
new file mode 100644
index 0000000000..0e88b39b47
--- /dev/null
+++ b/plugins/UserCountry/tests/UI/expected-screenshots/UserCountry_admin_no_providers.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:31448253e042c0c4f62cd2232e1408529cde22595999d8355bde3ea955bcfd27
+size 67691