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:
authorStefan Giehl <stefan@matomo.org>2022-06-24 18:03:50 +0300
committerGitHub <noreply@github.com>2022-06-24 18:03:50 +0300
commit57afc4fa1b7e30dcfd699e9cc9756163b8b89de2 (patch)
tree24a47132a56bbbf24545b7fb1cd2dcbc698a7f55 /plugins
parent81cdad0ec0bb596937c6be02e24a09f1d92eeff9 (diff)
Fix failing tests (#19396)
* fix PasswordResetter tests * Fixes some typos * updates expected UI files * Fix long failing SegmentSelectorEditor test * fix some more tests * Fix UsersManager UI tests * apply PSR12 code formatting
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png4
-rw-r--r--plugins/Login/lang/en.json12
-rw-r--r--plugins/Login/tests/Integration/PasswordResetterTest.php33
-rw-r--r--plugins/Login/tests/UI/Invite_spec.js3
-rw-r--r--plugins/Login/tests/UI/Login_spec.js4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Decline_default.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Invite_error.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedapi.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogin.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_blockedlogme.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_noentries.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_bruteforcelog_withentries.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_forgot_password.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_login_fail.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_login_form.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_login_form_logout.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_complete.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_confirm.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/Login_password_reset_error.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/NoAccess_login_noaccess.png4
-rw-r--r--plugins/Login/tests/UI/expected-screenshots/NoAccess_login_session_timeout.png4
-rw-r--r--plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js29
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png4
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png4
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png4
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png4
-rw-r--r--plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png4
-rw-r--r--plugins/UserCountryMap/Controller.php112
-rw-r--r--plugins/UsersManager/tests/Integration/UserInviteTest.php2
-rw-r--r--plugins/UsersManager/tests/UI/UsersManager_spec.js9
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png4
-rw-r--r--plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png4
40 files changed, 177 insertions, 155 deletions
diff --git a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png
index 28eb224427..9f645c3b11 100644
--- a/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png
+++ b/plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_invalid_token_auth.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:62fc2afd2afafb0c31effa327eff0050496ebe55af35f3b8b31aabe33b916922
-size 32321
+oid sha256:46544d21655c84211cdd35097aa24a2b4492a4b20cfff0390603e6976c5bf12d
+size 32369
diff --git a/plugins/Login/lang/en.json b/plugins/Login/lang/en.json
index 381f52dbb5..4e4a846295 100644
--- a/plugins/Login/lang/en.json
+++ b/plugins/Login/lang/en.json
@@ -15,8 +15,8 @@
"LogIn": "Sign in",
"LoginOrEmail": "Username or e-mail",
"HelpIpRange": "Enter one IP address or one IP range per line. You can use CIDR notation e.g: %1$s or you can use wildcards, e.g: %2$s or %3$s",
- "SettingBruteForceEnable": "Brute-force Detection",
- "SettingBruteForceEnableHelp": "Logs out users making too many password guesses within a timeframe for a while. This prevents anyone from testing testing all combinations. Getting a shared IP blocked also locks out its other users.",
+ "SettingBruteForceEnable": "Enable Brute-force Detection",
+ "SettingBruteForceEnableHelp": "Logs out users making too many password guesses within a timeframe for a while. This prevents anyone from testing all combinations. Getting a shared IP blocked also locks out its other users.",
"SettingBruteForceWhitelistIp": "Never block these IPs from logging in",
"SettingBruteForceBlacklistIp": "Always block these IPs from logging in",
"NotAllowListTakesPrecendence": "If an IP is on both the list of IPs to block and never block, it is blocked.",
@@ -39,9 +39,9 @@
"MailPasswordChangeBody2": "Hi %1$s,\n\nA request to reset the password was received from %2$s. Copy and paste the following link in your web browser within 24 hours to log in with your new username and password:\n\n%3$s\n\nThank you for using Matomo.",
"MailTopicPasswordChange": "Confirm changing the password",
"NewPassword": "New password",
- "NewPasswordRepeat": "New password (again)",
+ "NewPasswordRepeat": "New password (repeat)",
"PasswordChanged": "You can now use your new password to log in.",
- "PasswordRepeat": "Password (again)",
+ "PasswordRepeat": "Password (repeat)",
"PasswordsDoNotMatch": "Mismatching passwords.",
"PasswordResetAlreadySent": "You requested too many password resets recently. A new request can be made in one hour. Your administrator can help you if that doesn't work.",
"WrongPasswordEntered": "Please enter your password.",
@@ -55,8 +55,8 @@
"SuspiciousLoginAttemptsInLastHourEmail4": "Set up two-factor authentication so attackers need more than just your password to log in.",
"SuspiciousLoginAttemptsInLastHourEmail5": "Set up a list of IP addresses to never block if your Matomo has a limited set of users or IPs users access it from. %1$sRead the docs for more info.%2$s",
"LoginNotAllowedBecauseUserLoginBlocked": "Logging in has been turned off since a suspicious amount of failed attempts were made during the last hour.",
- "InvitationTitle": "Accept",
- "InvitationDeclineTitle": "Decline",
+ "InvitationTitle": "Accept invitation",
+ "InvitationDeclineTitle": "Decline invitation",
"InvitationDeclineBody": "Decline this invitation?",
"InvitationHints": "(you can leave the page to cancel this action)",
"Accept": "Accept",
diff --git a/plugins/Login/tests/Integration/PasswordResetterTest.php b/plugins/Login/tests/Integration/PasswordResetterTest.php
index 632f5b7618..250676eb49 100644
--- a/plugins/Login/tests/Integration/PasswordResetterTest.php
+++ b/plugins/Login/tests/Integration/PasswordResetterTest.php
@@ -1,4 +1,5 @@
<?php
+
/**
* Matomo - free/libre analytics platform
*
@@ -8,7 +9,6 @@
namespace Piwik\Plugins\Login\tests\Integration;
-
use PHPMailer\PHPMailer\PHPMailer;
use Piwik\Access;
use Piwik\Auth;
@@ -17,7 +17,6 @@ use Piwik\Option;
use Piwik\Plugin\Manager;
use Piwik\Tests\Framework\TestCase\IntegrationTestCase;
use Piwik\Plugins\Login\PasswordResetter;
-use Piwik\Plugins\UsersManager\Model;
use Piwik\Tests\Framework\Fixture;
/**
@@ -28,11 +27,6 @@ class PasswordResetterTest extends IntegrationTestCase
const NEWPASSWORD = 'newpassword';
/**
- * @var Model
- */
- private $userModel;
-
- /**
* @var string
*/
private $capturedToken;
@@ -46,20 +40,19 @@ class PasswordResetterTest extends IntegrationTestCase
{
parent::setUp();
$this->passwordResetter = new PasswordResetter();
- $this->userModel = new Model();
$this->capturedToken = null;
Manager::getInstance()->loadPluginTranslations();
}
- public function test_passwordReset_processWorksAsExpected()
+ public function testPasswordResetProcessWorksAsExpected()
{
$this->passwordResetter->setHashedPasswordForLogin('superUserLogin', $this->capturedToken);
$this->checkPasswordIs(self::NEWPASSWORD);
}
- public function tests_passwordReset_worksUpToThreeTimesInAnHour()
+ public function testsPasswordResetWorksUpToThreeTimesInAnHour()
{
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
@@ -74,10 +67,10 @@ class PasswordResetterTest extends IntegrationTestCase
$this->assertNotEquals($token, $this->capturedToken);
}
- public function test_passwordReset_notAllowedMoreThanThreeTimesInAnHour()
+ public function testPasswordResetNotAllowedMoreThanThreeTimesInAnHour()
{
$this->expectException(\Exception::class);
- $this->expectExceptionMessage('You have requested too many password resets recently. A new request can be made in one hour. If you have problems resetting your password, please contact your administrator for help.');
+ $this->expectExceptionMessage('You requested too many password resets recently. A new request can be made in one hour. Your administrator can help you if that doesn\'t work.');
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
@@ -94,14 +87,14 @@ class PasswordResetterTest extends IntegrationTestCase
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
}
- public function test_passwordReset_newRequestAllowedAfterAnHour()
+ public function testPasswordResetNewRequestAllowedAfterAnHour()
{
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$optionName = $this->passwordResetter->getPasswordResetInfoOptionName('superUserLogin');
$data = json_decode(Option::get($optionName), true);
- $data['timestamp'] = time()-3601;
+ $data['timestamp'] = time() - 3601;
$data['requests'] = 3;
Option::set($optionName, json_encode($data));
@@ -117,10 +110,10 @@ class PasswordResetterTest extends IntegrationTestCase
$this->assertEquals(1, $data['requests']);
}
- public function test_passwordReset_shouldNotAllowTokenToBeUsedMoreThanOnce()
+ public function testPasswordResetShouldNotAllowTokenToBeUsedMoreThanOnce()
{
$this->expectException(\Exception::class);
- $this->expectExceptionMessage('Token is invalid or has expired');
+ $this->expectExceptionMessage('The token is invalid or has expired.');
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$this->assertNotEmpty($this->capturedToken);
@@ -137,7 +130,7 @@ class PasswordResetterTest extends IntegrationTestCase
$this->passwordResetter->checkValidConfirmPasswordToken('superUserLogin', $oldCapturedToken);
}
- public function test_passwordReset_shouldNeverGenerateTheSameToken()
+ public function testPasswordResetShouldNeverGenerateTheSameToken()
{
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$this->assertNotEmpty($this->capturedToken);
@@ -149,10 +142,10 @@ class PasswordResetterTest extends IntegrationTestCase
$this->assertNotEquals($oldCapturedToken, $this->capturedToken);
}
- public function test_passwordReset_shouldNotAllowOldTokenToBeUsedAfterAnotherResetRequest()
+ public function testPasswordResetShouldNotAllowOldTokenToBeUsedAfterAnotherResetRequest()
{
$this->expectException(\Exception::class);
- $this->expectExceptionMessage('Token is invalid or has expired');
+ $this->expectExceptionMessage('The token is invalid or has expired.');
$this->passwordResetter->initiatePasswordResetProcess('superUserLogin', self::NEWPASSWORD);
$this->assertNotEmpty($this->capturedToken);
@@ -205,4 +198,4 @@ class PasswordResetterTest extends IntegrationTestCase
]),
];
}
-} \ No newline at end of file
+}
diff --git a/plugins/Login/tests/UI/Invite_spec.js b/plugins/Login/tests/UI/Invite_spec.js
index d937f2c891..7eb791b337 100644
--- a/plugins/Login/tests/UI/Invite_spec.js
+++ b/plugins/Login/tests/UI/Invite_spec.js
@@ -31,8 +31,9 @@ describe('Invite', function () {
await page.evaluate(function(){
$('#login_form_submit').click();
});
+ await page.waitForNetworkIdle();
expect(await page.screenshot({ fullPage: true })).to.matchImage('wrong_password');
});
-}); \ No newline at end of file
+});
diff --git a/plugins/Login/tests/UI/Login_spec.js b/plugins/Login/tests/UI/Login_spec.js
index dbbb4f326a..93ed3e3115 100644
--- a/plugins/Login/tests/UI/Login_spec.js
+++ b/plugins/Login/tests/UI/Login_spec.js
@@ -156,12 +156,12 @@ describe("Login", function () {
var expectedMailOutputFile = PIWIK_INCLUDE_PATH + '/tmp/Login.resetPassword.mail.json',
fileContents = require("fs").readFileSync(expectedMailOutputFile),
mailSent = JSON.parse(fileContents),
- resetUrl = mailSent.contents.match(/http:\/\/[^\s]+resetToken[^\s]+<\/p>/);
+ resetUrl = mailSent.contents.match(/http:\/\/[^"]+resetToken[^"]+"/);
if (!resetUrl || !resetUrl[0]) {
throw new Error(`Could not find reset URL in email, captured mail info: ${fileContents}`)
}
- resetUrl = resetUrl[0].replace(/<\/p>$/, '');
+ resetUrl = resetUrl[0].replace(/\"$/, '');
resetUrl = await page.evaluate((resetUrl) => {
return piwikHelper.htmlDecode(resetUrl);
}, resetUrl);
diff --git a/plugins/Login/tests/UI/expected-screenshots/Decline_default.png b/plugins/Login/tests/UI/expected-screenshots/Decline_default.png
index fa9acf274f..9a4fe458f1 100644
--- a/plugins/Login/tests/UI/expected-screenshots/Decline_default.png
+++ b/plugins/Login/tests/UI/expected-screenshots/Decline_default.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:b4f71261c0c6e74cae66aba9d6749eb2e0852acb802349e573d35f38ad6a7861
-size 24210
+oid sha256:42adaabe0ae20e43f798ea9329da9fdf42f7fa4580c211217322829a82edd8cd
+size 21548
diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_error.png b/plugins/Login/tests/UI/expected-screenshots/Invite_error.png
index 5d5cc8fcd4..311289f3c7 100644
--- a/plugins/Login/tests/UI/expected-screenshots/Invite_error.png
+++ b/plugins/Login/tests/UI/expected-screenshots/Invite_error.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:c273f68c05b5c8398aa2248a92633bc83b5209188b859d173d76be5a3d96f630
-size 40102
+oid sha256:35af886df3b8305375a45659de2f14af79fec9903a81642e18e193853ed52f28
+size 40378
diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png b/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png
index 4979ed5066..fe50344e56 100644
--- a/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png
+++ b/plugins/Login/tests/UI/expected-screenshots/Invite_set_password.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d59911d79ef8cf203efa7a7d64024fe66c9c655dcf6ec32900954be7d9e7b494
-size 27166
+oid sha256:fab1147e5e81c984bb699b6ba3e50800c868c24498d0a6e5e2a5e21a643e534b
+size 27319
diff --git a/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png b/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png
index ac1265c02a..84f56b0b3c 100644
--- a/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png
+++ b/plugins/Login/tests/UI/expected-screenshots/Invite_wrong_password.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:9a8c371e544e1964269b1d6200e933a719a47a6b3dcba01549588dc67bb2f3ea
-size 32681
+oid sha256:e52c0b45c5834cab0cb921a6d07cda995f0cfce71c2540832a977e7d01b84e75
+size 32893
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 7d1919e08f..2e6fc6190a 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:96d146d0451779db1b91b233b8e65a36406a096339ad3138ac3b6d693968f785
-size 13253
+oid sha256:eb616d5e970ca099978cdbe65bd2b35087c49c1beef846e9a890af094f7c1de2
+size 12385
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 9a42cde0a9..5e8296fdd2 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:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517
-size 48163
+oid sha256:77893976b0db582a288fe8e1e0f1f87e23f3b1c76885227c0a3c662dad12a5e0
+size 43148
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 9a42cde0a9..5e8296fdd2 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:bf87c9ad23692ec0ffe133b3cd75aa2aafc729ccbb094e8628d6b99d0f802517
-size 48163
+oid sha256:77893976b0db582a288fe8e1e0f1f87e23f3b1c76885227c0a3c662dad12a5e0
+size 43148
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 1f0b84b090..73fe1d8e3a 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:47b698f988ed27aa73e26ccc1036a2e19b12d21ef491c052be52944745c84279
-size 50753
+oid sha256:873eb18f0f551f70504cdfa0b3f7e2eb05b564f3fd809fe5f880f06a1599099f
+size 48843
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 175f65bf48..3dd901097d 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:0f63bd20d066b619e26f486525bf565cb03a263432f864179d71cb249521d5a5
-size 68011
+oid sha256:d63af0574b2fd491127a6daadeb92165436f65916517059a513e754698a4c908
+size 61832
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 2525c91025..64ab28507f 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:d3ace83bcac411282ada8a81a209c30e70d3ea70f0db03ff6c06b889d6c60d58
-size 29973
+oid sha256:87d82e89940d56e08a67944a5c5cb484cbff393619d4aa5d0949d3a57fbcd4be
+size 30014
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 435afa8475..606d062e4d 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:79c147975d2d9560ba63653449e0f2f0aabe58557bb4cd1dedaa9bcf376d6fd4
-size 32041
+oid sha256:6bc910d3325eaffa8fa7043037510e0d5362ffc64fce1481f5cca9a6c021ba97
+size 30851
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 0e8689e442..7e64ae2ca3 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:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc
-size 24653
+oid sha256:5125795ee575cb102187586db5797559240b09d3978df194d7e6dadde6e1d6b7
+size 24720
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 0e8689e442..7e64ae2ca3 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:a5bad4d68be89fb9986d704e6a09cebfbd2536674f4ba780e1e656eacb13dadc
-size 24653
+oid sha256:5125795ee575cb102187586db5797559240b09d3978df194d7e6dadde6e1d6b7
+size 24720
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 02ff47119b..334c20cda0 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:a746bb9a3c3ce0d903932b0b9f02e5c023ce0eabd0ca4630dfa4f73681d8386e
-size 35075
+oid sha256:201f7f23022bfb14f7474396dc33d613078d4e4915efd0050d493cf36fecc66a
+size 29560
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 444c34ef1c..06fd0ec25d 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:75c01e8424d84fcffd001bdc461150ddc599f1442b509c8279443289296f8d8f
-size 29322
+oid sha256:858980e823577ccdad8e1cea514a39a872bacba86e6b0e8f66710a273ef13536
+size 30290
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 a8d316b14b..76295dc9c4 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:e1dc84be8b6ff77a388fb1f32ab9264a2f3b55f103117b2f697dd9fd6d4f00e3
-size 34453
+oid sha256:bde70cb6b9bca8218f971e119f7296134d4fadb46168ff861293f9d5d6f6afa6
+size 32022
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 5518708478..22bad72450 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:e06a70d46e00b5b3ee12f67c404302873240d432d704d8ece727c495b8d1591f
-size 38921
+oid sha256:a90a83ff3dba45d0787c1436af0a251f77afb19497374273b58665ce303a4d07
+size 38980
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 1f36d7d639..c91bc90680 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:8cad0d53718fdf9e776a22b2f0a1c9ced6b710585e085789e697f7a4f725f2af
-size 31950
+oid sha256:af33441214d2a2991128f71af2195ddb1289a18440490534a7bc4d976f1c547c
+size 31992
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 84a2b2ae4b..ddba3053e9 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:c943113aa506b42f3055fd2735fefd42adeebdc53941039f4525d968d69bbc2e
-size 34156
+oid sha256:94a563127cc9f1d4c33cd89772dfc3302040cb4f6be2d49780fcae88d81d8d05
+size 34207
diff --git a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
index 738868ae90..2381953340 100644
--- a/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
+++ b/plugins/SegmentEditor/tests/UI/SegmentSelectorEditor_spec.js
@@ -17,12 +17,8 @@ describe("SegmentSelectorEditorTest", function () {
async function selectFieldValue(fieldName, textToSelect)
{
- await page.webpage.evaluate((fieldName) => {
- $(fieldName + ' input.select-dropdown').click();
- }, fieldName);
- await page.webpage.evaluate((fieldName, textToSelect) => {
- $(fieldName + ' .dropdown-content.active li:contains("' + textToSelect + '"):first').click();
- }, fieldName, textToSelect);
+ await (await page.jQuery(fieldName + ' input.select-dropdown', { waitFor: true })).click();
+ await (await page.jQuery(fieldName + ' .dropdown-content li:contains("' + textToSelect + '"):first', { waitFor: true })).click();
await page.mouse.move(-10, -10);
}
@@ -162,10 +158,10 @@ describe("SegmentSelectorEditorTest", function () {
await selectFieldValue('.segmentRow1 .segment-row .metricMatchBlock', 'Is not');
for (let i = 0; i < 3; i += 1) {
+ await page.waitForTimeout(200);
await page.evaluate(function (i) {
$(`.metricValueBlock input:eq(${i})`).val('new value ' + i).change();
}, i);
- await page.waitForTimeout(200);
}
await page.waitForTimeout(200);
@@ -267,10 +263,9 @@ describe("SegmentSelectorEditorTest", function () {
await selectDimension('.segmentRow0', 'Visitors', 'Browser');
await selectFieldValue('.segmentRow0 .segment-row:eq(0) .metricMatchBlock', 'Is not');
- await page.evaluate(function () {
- var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3';
- $('.segmentRow0 .segment-row:first .metricValueBlock input').val(complexValue).change();
- });
+ var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3';
+ await (await page.jQuery('.segmentRow0 .segment-row:first .metricValueBlock input')).type(complexValue);
+ await page.waitForTimeout(200);
await page.click('.segment-add-or');
await page.waitForFunction(() => !! $('.segmentRow0 .segment-row:eq(1)').length);
@@ -279,10 +274,8 @@ describe("SegmentSelectorEditorTest", function () {
await selectDimension('.segmentRow0 .segment-row:eq(1)', 'Visitors', 'Browser');
await selectFieldValue('.segmentRow0 .segment-row:eq(1) .metricMatchBlock', 'Is');
- await page.evaluate(function () {
- var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3';
- $('.segmentRow0 .segment-row:eq(1) .metricValueBlock input').val(complexValue).change();
- });
+ await (await page.jQuery('.segmentRow0 .segment-row:eq(1) .metricValueBlock input')).type(complexValue);
+ await page.waitForTimeout(200);
await page.click('.segment-add-row');
await page.waitForSelector('.segmentRow1 .segment-row');
@@ -291,11 +284,7 @@ describe("SegmentSelectorEditorTest", function () {
await selectDimension('.segmentRow1', 'Visitors', 'Browser');
await selectFieldValue('.segmentRow1 .segment-row:first .metricMatchBlock', 'Is not');
- await page.evaluate(function () {
- var complexValue = 's#2&#--_*+?# #5"\'&<>.22,3';
- $('.segmentRow1 .metricValueBlock input').val(complexValue).change();
- });
-
+ await (await page.jQuery('.segmentRow1 .metricValueBlock input')).type(complexValue);
await page.waitForTimeout(200);
await page.evaluate(function () {
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png
index 0e42dbae7a..397bbf35a7 100644
--- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_capitalized.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:122a96abbcf8ad5dcbb60eb1b793f4ea6c4321b88233e0bf8679d2678c722e80
-size 56014
+oid sha256:294d8d610e72b60fab652a3acd9f5764ab365830df14392f985b15a6278db825
+size 57046
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png
index 1fb9c1df76..22051f3c69 100644
--- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_lowercase.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ed597e24f40b81b1da1ce325d23f84762405bc3fb65e24745222bddc27db8f0a
-size 56017
+oid sha256:cdeb85f25ddeda230b4b86d320e2c56a07a95721f84b33cd27112af5912e7329
+size 57055
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png
index b5cd2d4488..89ea6b70ca 100644
--- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_autocomplete_uppercase.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:847033562428cd07b98c94149f906b135de40d06d1ba1b55ca15ef61a285811c
-size 56063
+oid sha256:0c5a186ca3cf0b7dcc4f3adfa3846473d0552c9763616fd41898ae1882b5fdd9
+size 57090
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png
index d6263760f6..aa881f3d8c 100644
--- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:5f0b13892d997be58e77ca6b15e094a4a96d6d846f7becc7008742e4cc9e9efc
-size 143342
+oid sha256:8a2cce7ab9021235d9476a998dc65afdfb92969c06b14a2a2a338f4046ad0878
+size 378375
diff --git a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
index 735be8b61a..655518a99b 100644
--- a/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
+++ b/plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_updated_details.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e90fa5acc4d469a699ec1aa315e5f5d1970403829a6640ae9538935226bb827a
-size 50141
+oid sha256:dc5ce79d442c1a6e44f2914d74596571523fa3737e5d18e35d6de666f164efbb
+size 51104
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php
index 8bfdabbe04..1c642e76f7 100644
--- a/plugins/UserCountryMap/Controller.php
+++ b/plugins/UserCountryMap/Controller.php
@@ -1,4 +1,5 @@
<?php
+
/**
* Matomo - free/libre analytics platform
*
@@ -6,6 +7,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
+
namespace Piwik\Plugins\UserCountryMap;
use Exception;
@@ -27,7 +29,7 @@ class Controller extends \Piwik\Plugin\Controller
{
// By default plot up to the last 3 days of visitors on the map, for low traffic sites
const REAL_TIME_WINDOW = 'last3';
-
+
/**
* @var Translator
*/
@@ -58,7 +60,7 @@ class Controller extends \Piwik\Plugin\Controller
$segment = '';
}
}
-
+
$token_auth = Piwik::getCurrentUserTokenAuth();
$view = new View('@UserCountryMap/visitorMap');
@@ -73,21 +75,53 @@ class Controller extends \Piwik\Plugin\Controller
. '&token_auth=' . $token_auth
. '&filter_limit=-1'
);
- $config = array();
+ $config = [];
$config['visitsSummary'] = json_decode($request->process(), true);
- $config['countryDataUrl'] = $this->_report('UserCountry', 'getCountry',
- $this->idSite, $period, $date, $token_auth, false, $segment);
- $config['regionDataUrl'] = $this->_report('UserCountry', 'getRegion',
- $this->idSite, $period, $date, $token_auth, true, $segment);
- $config['cityDataUrl'] = $this->_report('UserCountry', 'getCity',
- $this->idSite, $period, $date, $token_auth, true, $segment);
- $config['countrySummaryUrl'] = $this->getApiRequestUrl('VisitsSummary', 'get',
- $this->idSite, $period, $date, $token_auth, true, $segment);
+ $config['countryDataUrl'] = $this->_report(
+ 'UserCountry',
+ 'getCountry',
+ $this->idSite,
+ $period,
+ $date,
+ $token_auth,
+ false,
+ $segment
+ );
+ $config['regionDataUrl'] = $this->_report(
+ 'UserCountry',
+ 'getRegion',
+ $this->idSite,
+ $period,
+ $date,
+ $token_auth,
+ true,
+ $segment
+ );
+ $config['cityDataUrl'] = $this->_report(
+ 'UserCountry',
+ 'getCity',
+ $this->idSite,
+ $period,
+ $date,
+ $token_auth,
+ true,
+ $segment
+ );
+ $config['countrySummaryUrl'] = $this->getApiRequestUrl(
+ 'VisitsSummary',
+ 'get',
+ $this->idSite,
+ $period,
+ $date,
+ $token_auth,
+ true,
+ $segment
+ );
$view->defaultMetric = array_key_exists('nb_uniq_visitors', $config['visitsSummary']) ? 'nb_uniq_visitors' : 'nb_visits';
$noVisitTranslation = $this->translator->translate('UserCountryMap_NoVisit');
// some translations containing metric number
- $translations = array(
+ $translations = [
'nb_visits' => $this->translator->translate('General_NVisits'),
'no_visit' => $noVisitTranslation,
'nb_actions' => $this->translator->translate('VisitsSummary_NbActionsDescription'),
@@ -97,11 +131,13 @@ class Controller extends \Piwik\Plugin\Controller
'and_n_others' => $this->translator->translate('UserCountryMap_AndNOthers'),
'nb_uniq_visitors' => $this->translator->translate('General_NUniqueVisitors'),
'nb_users' => $this->translator->translate('VisitsSummary_NbUsers'),
- );
+ ];
foreach ($translations as &$translation) {
- if (false === strpos($translation, '%s')
- && $translation !== $noVisitTranslation) {
+ if (
+ false === strpos($translation, '%s')
+ && $translation !== $noVisitTranslation
+ ) {
$translation = '%s ' . $translation;
}
}
@@ -111,7 +147,7 @@ class Controller extends \Piwik\Plugin\Controller
$view->localeJSON = json_encode($translations);
- $view->reqParamsJSON = $this->getEnrichedRequest($params = array(
+ $view->reqParamsJSON = $this->getEnrichedRequest($params = [
'period' => $period,
'idSite' => $this->idSite,
'date' => $date,
@@ -119,7 +155,7 @@ class Controller extends \Piwik\Plugin\Controller
'token_auth' => $token_auth,
'enable_filter_excludelowpop' => 1,
'filter_excludelowpop_value' => -1
- ));
+ ]);
$view->metrics = $config['metrics'] = $this->getMetrics($this->idSite, $period, $date, $token_auth);
$config['svgBasePath'] = 'plugins/UserCountryMap/svg/';
@@ -127,24 +163,24 @@ class Controller extends \Piwik\Plugin\Controller
$view->config = json_encode($config);
$view->noData = empty($config['visitsSummary']['nb_visits']);
- $countriesByIso = array();
+ $countriesByIso = [];
$regionDataProvider = StaticContainer::get('Piwik\Intl\Data\Provider\RegionDataProvider');
$countries = array_keys($regionDataProvider->getCountryList());
- foreach ($countries AS $country) {
- $countriesByIso[strtoupper($country)] = Piwik::translate('Intl_Country_'.strtoupper($country));
+ foreach ($countries as $country) {
+ $countriesByIso[strtoupper($country)] = Piwik::translate('Intl_Country_' . strtoupper($country));
}
$view->countriesByIso = $countriesByIso;
- $view->continents = array(
+ $view->continents = [
'AF' => \Piwik\Plugins\UserCountry\continentTranslate('afr'),
'AS' => \Piwik\Plugins\UserCountry\continentTranslate('asi'),
'EU' => \Piwik\Plugins\UserCountry\continentTranslate('eur'),
'NA' => \Piwik\Plugins\UserCountry\continentTranslate('amn'),
'OC' => \Piwik\Plugins\UserCountry\continentTranslate('oce'),
'SA' => \Piwik\Plugins\UserCountry\continentTranslate('ams')
- );
+ ];
return $view->render();
}
@@ -188,7 +224,7 @@ class Controller extends \Piwik\Plugin\Controller
$maxVisits = Common::getRequestVar('filter_limit', 100, 'int');
// some translations
- $locale = array(
+ $locale = [
'nb_actions' => $this->translator->translate('VisitsSummary_NbActionsDescription'),
'local_time' => $this->translator->translate('VisitTime_ColumnLocalTime'),
'from' => $this->translator->translate('General_FromReferrer'),
@@ -202,15 +238,15 @@ class Controller extends \Piwik\Plugin\Controller
'actions' => $this->translator->translate('Transitions_NumPageviews'),
'searches' => $this->translator->translate('UserCountryMap_Searches'),
'goal_conversions' => $this->translator->translate('UserCountryMap_GoalConversions'),
- );
+ ];
$segment = $segmentOverride ? : Request::getRawSegmentFromRequest() ? : '';
- $params = array(
+ $params = [
'period' => 'range',
'idSite' => $this->idSite,
'segment' => $segment,
'token_auth' => $token_auth,
- );
+ ];
$realtimeWindow = Common::getRequestVar('realtimeWindow', self::REAL_TIME_WINDOW, 'string');
if ($realtimeWindow != 'false') { // handle special value
@@ -219,8 +255,8 @@ class Controller extends \Piwik\Plugin\Controller
$reqParams = $this->getEnrichedRequest($params, $encode = false);
- $view->config = array(
- 'metrics' => array(),
+ $view->config = [
+ 'metrics' => [],
'svgBasePath' => 'plugins/UserCountryMap/svg/',
'liveRefreshAfterMs' => $liveRefreshAfterMs,
'_' => $locale,
@@ -234,7 +270,7 @@ class Controller extends \Piwik\Plugin\Controller
'doNotRefreshVisits' => Common::getRequestVar('doNotRefreshVisits', false, 'int'),
'enableAnimation' => Common::getRequestVar('enableAnimation', true, 'int'),
'forceNowValue' => Common::getRequestVar('forceNowValue', false, 'int')
- );
+ ];
return $view->render();
}
@@ -281,15 +317,15 @@ class Controller extends \Piwik\Plugin\Controller
);
$metaData = json_decode($request->process(), true);
- $metrics = array();
+ $metrics = [];
if (!empty($metaData[0]['metrics']) && is_array($metaData[0]['metrics'])) {
foreach ($metaData[0]['metrics'] as $id => $val) {
- $metrics[] = array($id, $val);
+ $metrics[] = [$id, $val];
}
}
if (!empty($metaData[0]['processedMetrics']) && is_array($metaData[0]['processedMetrics'])) {
foreach ($metaData[0]['processedMetrics'] as $id => $val) {
- $metrics[] = array($id, $val);
+ $metrics[] = [$id, $val];
}
}
return $metrics;
@@ -321,7 +357,15 @@ class Controller extends \Piwik\Plugin\Controller
private function _report($module, $action, $idSite, $period, $date, $token_auth, $filter_by_country = false, $segmentOverride = false)
{
- return $this->getApiRequestUrl('API', 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action,
- $idSite, $period, $date, $token_auth, $filter_by_country, $segmentOverride);
+ return $this->getApiRequestUrl(
+ 'API',
+ 'getProcessedReport&apiModule=' . $module . '&apiAction=' . $action,
+ $idSite,
+ $period,
+ $date,
+ $token_auth,
+ $filter_by_country,
+ $segmentOverride
+ );
}
}
diff --git a/plugins/UsersManager/tests/Integration/UserInviteTest.php b/plugins/UsersManager/tests/Integration/UserInviteTest.php
index 098089d33e..321f037d3c 100644
--- a/plugins/UsersManager/tests/Integration/UserInviteTest.php
+++ b/plugins/UsersManager/tests/Integration/UserInviteTest.php
@@ -60,7 +60,7 @@ class UserInviteTest extends IntegrationTestCase
$response = Http::sendHttpRequest(Fixture::getRootUrl() . 'tests/PHPUnit/proxy/index.php?module=Login&action=acceptInvitation&token=' . $this->token,
10);
- $this->assertStringContainsString('Accept Invitation', $response, 'error on accept invitation');
+ $this->assertStringContainsString('Accept invitation', $response, 'error on accept invitation');
}
}
diff --git a/plugins/UsersManager/tests/UI/UsersManager_spec.js b/plugins/UsersManager/tests/UI/UsersManager_spec.js
index 9feb4e0fb8..e4e4b58e64 100644
--- a/plugins/UsersManager/tests/UI/UsersManager_spec.js
+++ b/plugins/UsersManager/tests/UI/UsersManager_spec.js
@@ -172,12 +172,6 @@ describe("UsersManager", function () {
});
it('should delete a single user when the modal is confirmed is clicked', async function () {
-
- await page.evaluate(function () {
- $('select[name=access-level-filter]').val('string:view').change();
- $('#user-text-filter').val('ight').change();
- });
-
await (await page.jQuery('.deleteuser:eq(0)')).click();
await (await page.jQuery('.delete-user-confirm-modal .modal-close:not(.modal-no):visible')).click();
await page.waitForNetworkIdle();
@@ -440,6 +434,7 @@ describe("UsersManager", function () {
it('should display the superuser access tab when the superuser tab is clicked', async function () {
await page.click('.userEditForm .menuSuperuser');
await page.mouse.move(0, 0);
+ await page.waitForTimeout(100);
expect(await page.screenshotSelector('.usersManager')).to.matchImage('superuser_tab');
});
@@ -490,7 +485,7 @@ describe("UsersManager", function () {
});
it('should show the edit user form when the edit icon in a row is clicked', async function () {
- await (await page.jQuery('button.edituser:eq(1)', { waitFor: true })).click();
+ await (await page.jQuery('button.edituser:eq(2)', { waitFor: true })).click();
await page.waitForTimeout(250);
await page.waitForNetworkIdle();
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png
index ed6d558535..3ce45b448c 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_admin_view_admin_load.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:3f7a1c8ede3bb61b869dbab37be56d784879f3d7be5c4e80bb86e7f275487374
-size 136964
+oid sha256:d900ab4e0295bbe056d943cf62f2c7b9bfa4de96bb2269612d0063dde7434e20
+size 136766
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png
index dca72af936..3aee339185 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_bulk_access.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:92168d09555061bed7c9744f3b5252fc5328a24c51f80df7cb56331b398c04be
-size 26969
+oid sha256:92825d9f4fb5080afd23dbabf519d2be4d4964a6623c3da11f4820f1517115a6
+size 169385
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png
index fc91101f8b..ca7bf2eacc 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_delete_single.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:7f4cb4fcec0ec3eebad0063bddbfd1d7e0c8410a64ee8569d5ef78f8df3302a5
-size 170348
+oid sha256:6ae36fbee0d0eceb6b320808da446b9f7538e12c926bd55271b9909b4bef191d
+size 170695
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png
index 7854904373..e44dd90328 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_asks_confirmation.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:86f5888587a18b98c0118ad5709d6d3d98486ac8f3f5f5f6c82a5936d72eafed
-size 21978
+oid sha256:3b47b430f67f92811615b9b10dafc3137923b849580f50256598bc33e92d3bc5
+size 21831
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png
index c5325fd782..c3a3455aaf 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_basic_confirmed_wrong_password.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:052ed4ad65093f9967ddf7366847fc53fae99260bdbfced20f7bf11f9e33d3f2
-size 31099
+oid sha256:319f8ab21d7da64f61896b14966b3a290682a294b25e5372d22bd8ed8efb999d
+size 30872
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png
index 107d81d036..3e090100ff 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_edit_user_form.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:37d8b53b65dbe7e0b696f83e5ab4b8a2e4787ad5a524eb6dd619f1d3f5f56d82
-size 24864
+oid sha256:6808d97c5c13d69a0a622c925bd77000d8ec9807d5adc574f4961c88632863d1
+size 24258
diff --git a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png
index 953c45f5cb..9dbfe8223d 100644
--- a/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png
+++ b/plugins/UsersManager/tests/UI/expected-screenshots/UsersManager_manage_users_back.png
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:d15a7db15186c51b0103b34a6c842a10175a9993cc8c16a273c1f4bfb6bcafea
-size 167125
+oid sha256:5575d62aec7479771521771d917833f917118ed81d0a26a09c5bfa340c956842
+size 180151