diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-09-01 16:37:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-01 16:37:38 +0300 |
commit | a3ee690ea3863ff16a828ac0afbc77243bb45f5b (patch) | |
tree | 77f3341e86608894b1020725700b348bbcd44567 /plugins/Login | |
parent | ba1facfd1ecb4e618f3162aedbdb3170e9461e50 (diff) |
Use newer version of Puppeteer for UI tests (#17880)
* Use latest version of Puppeteer for UI tests
* use newer node on travis
* test
* use waitForTimeout / waitForSelector instead of waitFor
* Handle BC for removed waitFor method
* Updates expected UI test files
* update submodules
* improve/fix some UI tests
* Updates expected UI test files
* improve/fix some UI tests
* update url-parse dependency
* simplify some UI tests
* update screenshot
* avoid using merged assets that are broken
* fix expected compare exit code
* don't use merged assets for TwoFactorAuth UI tests
it seems due to too many requests to login, logout and other pages merging the CoreJS assets somehow fails, and results in returning an empty file. Even the reload fails to serve the correct content, so maybe the file, the content should be written to, is somehow locked. Disabling the merged assets seems to fix this issue for this tests. Locally the tests are also running correctly with merged assets.
* improve handling of automatic css / js reloading in UI tests
* increase timeouts of TwoFactorAuth UI tests
* fix 2fa ui test
* revert change
* update new screenshot
* updates UI screenshots
* submodule updates
Diffstat (limited to 'plugins/Login')
20 files changed, 44 insertions, 44 deletions
diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js index 653f2149f0..968bea18eb 100644 --- a/plugins/Login/tests/UI/Login_spec.js +++ b/plugins/Login/tests/UI/Login_spec.js @@ -64,9 +64,9 @@ describe("Login", function () { it("should load correctly", async function() { await page.goto(""); await page.waitForNetworkIdle(); - await page.waitFor('input'); + await page.waitForSelector('input'); await page.mouse.click(0, 0); - await page.waitFor(250); + await page.waitForTimeout(250); expect(await page.screenshot({ fullPage: true })).to.matchImage('login_form'); }); @@ -78,9 +78,9 @@ describe("Login", function () { $('#login_form_submit').click(); }); await page.waitForNetworkIdle(); - await page.waitFor('.notification'); + await page.waitForSelector('.notification'); await page.mouse.click(0, 0); - await page.waitFor(250); + await page.waitForTimeout(250); expect(await page.screenshot({ fullPage: true })).to.matchImage('login_fail'); }); @@ -101,9 +101,9 @@ describe("Login", function () { it("should redirect to login when logout link clicked", async function() { await page.click("nav .right .icon-sign-out"); await page.waitForNetworkIdle(); - await page.waitFor('input'); + await page.waitForSelector('input'); await page.mouse.click(0, 0); - await page.waitFor(250); + await page.waitForTimeout(250); expect(await page.screenshot({ fullPage: true })).to.matchImage('login_form_logout'); }); @@ -123,7 +123,7 @@ describe("Login", function () { it("should display password reset form when forgot password link clicked", async function() { await page.click("nav .right .icon-sign-out"); await page.waitForNetworkIdle(); - await page.waitFor("a#login_form_nav"); + await page.waitForSelector("a#login_form_nav"); await page.click("a#login_form_nav"); await page.waitForNetworkIdle(); @@ -135,7 +135,7 @@ describe("Login", function () { await page.type("#reset_form_password", "superUserPass2"); await page.click("#reset_form_submit"); await page.waitForNetworkIdle(); - await page.waitFor('.notification'); + await page.waitForSelector('.notification'); expect(await page.screenshot({ fullPage: true })).to.matchImage('password_reset_error'); }); diff --git a/plugins/Login/tests/UI/NoAccess_spec.js b/plugins/Login/tests/UI/NoAccess_spec.js index d829962daa..fe69896a2a 100644 --- a/plugins/Login/tests/UI/NoAccess_spec.js +++ b/plugins/Login/tests/UI/NoAccess_spec.js @@ -50,7 +50,7 @@ describe("NoAccess", function () { $('#login_form_submit').click(); }); - await page.waitFor(60500); // wait for session timeout + await page.waitForTimeout(60500); // wait for session timeout await page.click('#topmenu-corehome'); await page.waitForNetworkIdle(); diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png index 6fadc05759..7d1919e08f 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b59ee6a447784996410aba5a54c5e2cb03608ca2b59277aca245754f5095e34 +oid sha256:96d146d0451779db1b91b233b8e65a36406a096339ad3138ac3b6d693968f785 size 13253 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png index 8d9da40589..9a42cde0a9 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7602b4dcf8fc4e77750e3335051d106415dbeea5082b154347245ac2e08dd0e -size 48281 +oid sha256:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517 +size 48163 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png index 8d9da40589..9a42cde0a9 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7602b4dcf8fc4e77750e3335051d106415dbeea5082b154347245ac2e08dd0e -size 48281 +oid sha256:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517 +size 48163 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png index 72ff2004c8..5e12f8534c 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a144c6e43a86a9286defe3dfc1798408d85f51472f136983e42afe86edb1ec79 -size 49830 +oid sha256:0fb0f55731af170b52697c4ca0319c4cc66dab563fb7ec0cdaabd385180cbde6 +size 49836 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png index 449e5c19b9..1e1f1312db 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a731f0f05758fcd67663059bc5d4acf6677483501c1ad4d8e88703d12911c9d1 -size 67431 +oid sha256:7c13b6ae466331318983ff9f1fc50653c6f564be343df20a4e03fda7cb7b191a +size 67218 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png index 49f09695cb..2525c91025 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77164625203d044ec1d7058bdea51af51634f1c9c818ddf2f626944694824543 -size 29965 +oid sha256:d3ace83bcac411282ada8a81a209c30e70d3ea70f0db03ff6c06b889d6c60d58 +size 29973 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png b/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png index 1fd4733ba8..bad0c494d8 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_ip_not_whitelisted.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f668dbd2e6ed9b1ebbd825898c5957638825799668b23330454bef9d5f2b7440 -size 33192 +oid sha256:ae8fb99e397c00cb3cc44e55e064508985e28dce029a3e8cc6fbe3752c2da516 +size 33169 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png index 983318fb64..435afa8475 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1b0f2591ce9a6bb387980941bf109f654f5ac79776fa253256ffbef6adcf0b71 -size 32034 +oid sha256:79c147975d2d9560ba63653449e0f2f0aabe58557bb4cd1dedaa9bcf376d6fd4 +size 32041 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png index 92b9b407b7..0e8689e442 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_form.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:747ed4268328512117426c37c653f0e812276f348ae72da7585c3dd9ca0e8278 -size 24643 +oid sha256:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc +size 24653 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png b/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png index 92b9b407b7..0e8689e442 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:747ed4268328512117426c37c653f0e812276f348ae72da7585c3dd9ca0e8278 -size 24643 +oid sha256:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc +size 24653 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_logme_disabled.png b/plugins/Login/tests/UI/expected-screenshots/Login_logme_disabled.png index 7d60d43c04..d82f273614 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_logme_disabled.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_logme_disabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f65dfc6e14865782065da6c644112ca2bfa50c16966b42e963a999e4ab97610 -size 41859 +oid sha256:ad7e8efb37f95b6938c6864869dab551479ab45614873b11d80c3060006462f5 +size 41697 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_logme_redirect_invalid.png b/plugins/Login/tests/UI/expected-screenshots/Login_logme_redirect_invalid.png index 3b8b2359ea..8c84e8146d 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_logme_redirect_invalid.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_logme_redirect_invalid.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:882e9ee5db5d65cba04c14b34f56058625c631df67d45b1dce3e46ac0231283b -size 62022 +oid sha256:e6857b08acc900c2889c681cdbbb8b467635da9f071c7152c86c6efac9f6d6cd +size 61861 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png index d185c34b07..02ff47119b 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fcc817e7ee5912d68b32cf776144b27dd98bc616f25b5c51c17728b1acb0e9e -size 35064 +oid sha256:a746bb9a3c3ce0d903932b0b9f02e5c023ce0eabd0ca4630dfa4f73681d8386e +size 35075 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png index be5bef5d82..444c34ef1c 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8d1debd74ba8a5a1a2c39891f5e203f5b5aa41509308813b89ce88f29655c1d5 -size 29315 +oid sha256:75c01e8424d84fcffd001bdc461150ddc599f1442b509c8279443289296f8d8f +size 29322 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png index 5cbabdf2f9..a8d316b14b 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec46909c1a4f613f345285313d8b3b41fc446d123bddc096a2d45759f2c14c0b -size 34444 +oid sha256:e1dc84be8b6ff77a388fb1f32ab9264a2f3b55f103117b2f697dd9fd6d4f00e3 +size 34453 diff --git a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png index 0f411b3ed9..5518708478 100644 --- a/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png +++ b/plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9fe053b046f9d701b8fddb21ba3e266c808fbd58af106fe5d3b4a789da0860ec -size 38912 +oid sha256:e06a70d46e00b5b3ee12f67c404302873240d432d704d8ece727c495b8d1591f +size 38921 diff --git a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png index 2391c68a79..1f36d7d639 100644 --- a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png +++ b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3c2bf876689974ba0e3bbd46b1dd309877f1838809344d37e28633cd4b8c0bc9 -size 31939 +oid sha256:8cad0d53718fdf9e776a22b2f0a1c9ced6b710585e085789e697f7a4f725f2af +size 31950 diff --git a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png index cc31f29313..84a2b2ae4b 100644 --- a/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png +++ b/plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8c62cd426bd1fc44e9456bd1d7b65a424e52bb01cc919ddff6f07442abb50e1 -size 34146 +oid sha256:c943113aa506b42f3055fd2735fefd42adeebdc53941039f4525d968d69bbc2e +size 34156 |