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
path: root/tests/UI
diff options
context:
space:
mode:
authorKate Butler <kate@innocraft.com>2019-08-26 01:04:01 +0300
committerThomas Steur <tsteur@users.noreply.github.com>2019-08-26 01:04:01 +0300
commit64bcf78cf9bf45319f9b7a5d8ebbe10e1970e952 (patch)
tree427c32f94c7174d85725e65f613eb396047278bb /tests/UI
parent444e8415ed5e0771213be972bd96249f091fdbf1 (diff)
Send tracking code JS by email (#14569)
* Button to email standard install instructions on installation page 7 and no data tracked yet page * Send tracking code email from the tracking code generator page * Escape HTML tags * Send email in plain text * Move email button next to header * Fix width of header div * Update reference screenshots * PR fixes * Expand tracking code email template * Fix double escaping of message * Hide links to Matomo for whitelabel, fix missing space * ignore event in documentation * Update reference screenshots * Changes to email template * fix missing translation key * Add idsite and tracking url to email template * Fix extra slash in URL * Update UI test
Diffstat (limited to 'tests/UI')
-rw-r--r--tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png4
-rw-r--r--tests/UI/expected-screenshots/OneClickUpdate_login.png4
-rw-r--r--tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png4
-rw-r--r--tests/UI/specs/EmptySite_spec.js9
4 files changed, 15 insertions, 6 deletions
diff --git a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
index 61bb1e49b9..ad363d0705 100644
--- a/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
+++ b/tests/UI/expected-screenshots/EmptySite_emptySiteDashboard.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:0c6892454bb5d9b6bf96e93b64973d65b927a90f294d8f84b71aeaa16fe8f498
-size 272822
+oid sha256:b8cef5fcd6834947f4332f80404bf93d1dc4e5c7c177fd6542aa2d51612fd811
+size 275785
diff --git a/tests/UI/expected-screenshots/OneClickUpdate_login.png b/tests/UI/expected-screenshots/OneClickUpdate_login.png
index b199390c52..8ffded54d4 100644
--- a/tests/UI/expected-screenshots/OneClickUpdate_login.png
+++ b/tests/UI/expected-screenshots/OneClickUpdate_login.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:62107e7bad9e2cc88a8e72a7ab720798d7672578aaafa115ba621e25b7aa7ba4
-size 241887
+oid sha256:63cfae7c2afcafca1d96340384b829f817219e36dbd6d89fca81a0079f71610f
+size 244652
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
index 5b691b009a..67cdab5ce2 100644
--- a/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
+++ b/tests/UI/expected-screenshots/UIIntegrationTest_admin_manage_tracking_code.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:98fc8e8facbb9f8a3562221ebff176976a67cef0f5633c3f4d16285de0985a0d
-size 437885
+oid sha256:23693cc87b6fcec46d4afc7928834b1169a643c18f602daac0f643490a809c6b
+size 440883
diff --git a/tests/UI/specs/EmptySite_spec.js b/tests/UI/specs/EmptySite_spec.js
index 410dbe18f7..0a0f10e593 100644
--- a/tests/UI/specs/EmptySite_spec.js
+++ b/tests/UI/specs/EmptySite_spec.js
@@ -18,6 +18,15 @@ describe("EmptySite", function () {
expect(await pageElement.screenshot()).to.matchImage('emptySiteDashboard');
});
+ it('should have button to send tracking code to developer', async function() {
+ var mailtoLink = await page.$eval('#emailTrackingCodeBtn', btn => btn.getAttribute('href'));
+
+ // Check that it's a mailto link with correct subject line
+ expect(mailtoLink).to.include('mailto:?subject=Matomo%20Analytics%20Tracking%20Code&body');
+ // Check that template rendered and only contains chars that are OK in all mail clients (e.g. no HTML at all)
+ expect(mailtoLink).to.match(/^mailto:\?[a-zA-Z0-9&%=.,-_]*$/);
+ });
+
it('should be possible to ignore this screen for one hour', async function () {
await page.click('.ignoreSitesWithoutData');
await page.waitFor('.widget');