diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-05-06 15:57:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-06 15:57:40 +0300 |
commit | 39c46ff55165d8b14e1ecc4261c0d1ac8756b5aa (patch) | |
tree | 40f6e3bfe429fc079ca9d7ff7ec6303f3296fdb9 /tests | |
parent | a4f8566d95c7c9c172f411c78c01e281ed5b34e6 (diff) |
Improve UI test (#11633)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/UI/expected-screenshots/UIIntegrationTest_menu_apidisallowed.png | 3 | ||||
-rw-r--r-- | tests/UI/specs/UIIntegration_spec.js | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/tests/UI/expected-screenshots/UIIntegrationTest_menu_apidisallowed.png b/tests/UI/expected-screenshots/UIIntegrationTest_menu_apidisallowed.png deleted file mode 100644 index df6dc42398..0000000000 --- a/tests/UI/expected-screenshots/UIIntegrationTest_menu_apidisallowed.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de19092a7c1e4b1a2be299462df1b50c87fce71a87276fe63440dd11210acae2 -size 494117 diff --git a/tests/UI/specs/UIIntegration_spec.js b/tests/UI/specs/UIIntegration_spec.js index a1e43ead5c..a7d781ae69 100644 --- a/tests/UI/specs/UIIntegration_spec.js +++ b/tests/UI/specs/UIIntegration_spec.js @@ -399,9 +399,10 @@ describe("UIIntegrationTest", function () { // TODO: Rename to Piwik? }, done); }); - it('should not display API response in the content', function (done) { - expect.screenshot('menu_apidisallowed').to.be.captureSelector('#content', function (page) { - page.load("?" + urlBase + "#?" + generalParams + "&module=API&action=SitesManager.getImageTrackingCode"); + it('should not display API response in the content and redirect to dashboard instead', function (done) { + expect.page().contains('#dashboardWidgetsArea', /*'menu_apidisallowed',*/ function (page) { + var url = "?" + urlBase + "#?" + generalParams + "&module=API&action=SitesManager.getImageTrackingCode"; + page.load(url, 2000); }, done); }); |