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:
authordiosmosis <diosmosis@users.noreply.github.com>2019-05-16 12:50:10 +0300
committerGitHub <noreply@github.com>2019-05-16 12:50:10 +0300
commit03ca65180e488847c3faec1167b1c82ac7cc9722 (patch)
tree8d61ccbb0c246d049f074e520f93ea3456c7243d /plugins/TwoFactorAuth
parented823e9c1521a6a5aada6fc1572433845322967f (diff)
One Click Install UI test (#14049)
* Add initial fixture and install script for one click install UI test. * Move matomo-package to outside matomo dir. * Create package before getting latest stable install. * More changes to fixture. * Get test releasechannel to work in latest stable version. * Handle build archives w/ matomo folders in one click update. * Fill out one click update UI test and get to pass. * Remove useless use statement. * Try cloning from HTTPS. * Add new screenshots. * Apply pr feedback and remove CoreUpdaterCode UI test. * undo submodule change * re-add line * re-add CoreUpdaterDb png files, need to keep those. * Add cron archiving test to one click update test. * use master branch of matomo-package * Make sure node_modules is accessible in screenshot testing specs. * Fix matomo-package command. * test fixes * Use correct method. * ui test fixes * Couple more test fixes. * some more test fixes * hopefully last ui test fixes * Last fix. * real last fix * Couple more random failure fixes. * Prevent from running outside of cli mode. * More aggresive check.
Diffstat (limited to 'plugins/TwoFactorAuth')
-rw-r--r--plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js8
-rw-r--r--plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step4.png4
2 files changed, 7 insertions, 5 deletions
diff --git a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
index 8b702b230f..4d93240f2b 100644
--- a/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
+++ b/plugins/TwoFactorAuth/tests/UI/TwoFactorAuth_spec.js
@@ -95,7 +95,8 @@ describe("TwoFactorAuth", function () {
$('.loginTwoFaForm #login_form_submit').click();
});
await page.waitForNetworkIdle();
- expect(await page.screenshotSelector('.loginSection')).to.matchImage('logme_not_verified_wrong_code');
+ const element = await page.$('.loginSection');
+ expect(await element.screenshot()).to.matchImage('logme_not_verified_wrong_code');
});
it('when logging in through logme and verifying screen it works to access ui', async function () {
@@ -105,6 +106,7 @@ describe("TwoFactorAuth", function () {
});
await page.waitForNetworkIdle();
await page.waitFor('.widget');
+ await page.waitForNetworkIdle();
expect(await page.screenshotSelector('.pageWrap')).to.matchImage('logme_verified');
});
@@ -193,7 +195,7 @@ describe("TwoFactorAuth", function () {
$('.setupConfirmAuthCodeForm .confirmAuthCode').click();
});
await page.waitForNetworkIdle();
- await page.waitFor('.widget', { visible: true });
+ await page.waitFor('#content', { visible: true });
await page.waitForNetworkIdle();
expect(await page.screenshotSelector('#content')).to.matchImage('twofa_setup_step4');
});
@@ -205,7 +207,7 @@ describe("TwoFactorAuth", function () {
});
it('should force user to setup 2fa when not set up yet but enforced step 2', async function () {
- await page.click('.setupTwoFactorAuthentication .backupRecoveryCode:first');
+ await (await page.jQuery('.setupTwoFactorAuthentication .backupRecoveryCode:first')).click();
await page.click('.setupTwoFactorAuthentication .goToStep2');
expect(await page.screenshotSelector('.loginSection,#content,#notificationContainer')).to.matchImage('twofa_forced_step2');
});
diff --git a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step4.png b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step4.png
index 77606d2ea7..a38b39f04e 100644
--- a/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step4.png
+++ b/plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_setup_step4.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:7b634a5d1dccc7dbdc9a2f172de66428ac52a2f6998546a921b758657dd0a75e
-size 34384
+oid sha256:9cb00ebb25b6dadc63793cd5a851652ef3c7edb58deed3709442a945510630d4
+size 31520