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
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2017-11-20 00:17:54 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-11-20 00:17:54 +0300
commit5e625c2e6611f19d47e48839a33c19e33d7643ad (patch)
tree0c34c1611ca2c1a2213a8f3e82c8cafde29c0860 /tests
parent4021a5e902db269c6c03edc351fcc2e3a77dc7d8 (diff)
Show instance id in update screen (#12259)
Diffstat (limited to 'tests')
-rw-r--r--tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png3
-rw-r--r--tests/UI/specs/CoreUpdaterDb_spec.js24
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png b/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png
new file mode 100644
index 0000000000..bea90f0401
--- /dev/null
+++ b/tests/UI/expected-screenshots/CoreUpdaterDb_main_instance.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:256f2070fa119e08b4d462472a1758cf4b13f4c6a93d8e2864d60be912edbf59
+size 290439
diff --git a/tests/UI/specs/CoreUpdaterDb_spec.js b/tests/UI/specs/CoreUpdaterDb_spec.js
index 032ab0933d..c65c9585f9 100644
--- a/tests/UI/specs/CoreUpdaterDb_spec.js
+++ b/tests/UI/specs/CoreUpdaterDb_spec.js
@@ -17,6 +17,13 @@ describe("CoreUpdaterDb", function () {
testEnvironment.save();
});
+ after(function () {
+ if (testEnvironment.configOverride.General) {
+ delete testEnvironment.configOverride.General;
+ testEnvironment.save();
+ }
+ });
+
function apiUpgradeTest(format) {
it("should start the updater when an old version of Piwik is detected in the DB with format " + format, function (done) {
expect.file('CoreUpdater.API.ErrorMessage' + format + '.txt').to.be.pageContents(function (page) {
@@ -41,6 +48,23 @@ describe("CoreUpdaterDb", function () {
}, done);
});
+ it("should show instance id in updating screen", function (done) {
+ expect.screenshot("main_instance").to.be.capture(function (page) {
+ testEnvironment.configOverride.General = {
+ instance_id: 'custom.instance'
+ };
+ testEnvironment.save();
+
+ page.load("");
+ page.evaluate(function () {
+ $('p').each(function () {
+ var replace = $(this).html().replace(/(?!1\.0)\d+\.\d+(\.\d+)?([\-a-z]*\d+)?/g, '');
+ $(this).html(replace);
+ });
+ });
+ }, done);
+ });
+
it("should show the donation form when the update process is complete", function (done) {
expect.screenshot("updated").to.be.capture(function (page) {
page.click('.btn');