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 'tests/UI/specs/Dashboard_spec.js')
-rw-r--r--tests/UI/specs/Dashboard_spec.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/UI/specs/Dashboard_spec.js b/tests/UI/specs/Dashboard_spec.js
index 0c4f28f080..f647bdab68 100644
--- a/tests/UI/specs/Dashboard_spec.js
+++ b/tests/UI/specs/Dashboard_spec.js
@@ -223,4 +223,24 @@ describe("Dashboard", function () {
}, done);
});
+ it("should load correctly with token_auth", function (done) {
+ testEnvironment.testUseMockAuth = 0;
+ testEnvironment.save();
+
+ expect.screenshot("loaded_token_auth").to.be.capture(function (page) {
+ var tokenAuth = "9ad1de7f8b329ab919d854c556f860c1";
+ page.load(url.replace("idDashboard=5", "idDashboard=1") + '&token_auth=' + tokenAuth, 5000);
+ }, done);
+ });
+
+ it("should fail to load with invalid token_auth", function (done) {
+ testEnvironment.testUseMockAuth = 0;
+ testEnvironment.save();
+
+ expect.screenshot("invalid_token_auth").to.be.capture(function (page) {
+ var tokenAuth = "anyInvalidToken";
+ page.load(url.replace("idDashboard=5", "idDashboard=1") + '&token_auth=' + tokenAuth, 5000);
+ }, done);
+ });
+
});