mirror of
https://github.com/phpbb/phpbb.git
synced 2025-01-17 14:18:24 +01:00
[ticket/15769] Fix JS and avatar functional tests
PHPBB3-15769
This commit is contained in:
parent
b3308245c3
commit
27c5f61e30
@ -46,7 +46,7 @@
|
||||
|
||||
// Ensure we have an img for the cropping
|
||||
if (this.$box.children('img').length === 0) {
|
||||
const $avatarImg = $('<img/>');
|
||||
const $avatarImg = $('<img src="" alt="">');
|
||||
$avatarImg.addClass('avatar');
|
||||
this.image = $avatarImg;
|
||||
this.$box.prepend($avatarImg);
|
||||
@ -181,15 +181,16 @@
|
||||
}
|
||||
|
||||
// Handle errors while deleting file
|
||||
if (typeof response.error !== 'undefined') {
|
||||
phpbb.alert(response.error.title, response.error.messages.join('<br>'));
|
||||
} else {
|
||||
alert = phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
|
||||
if (typeof response.error === 'undefined') {
|
||||
const alert = phpbb.alert(response.MESSAGE_TITLE, response.MESSAGE_TEXT);
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(() => {
|
||||
window.location = response.REFRESH_DATA.url.replace('&', '&');
|
||||
alert.hide();
|
||||
}, response.REFRESH_DATA.time * 1000);
|
||||
phpbb.avatars.destroy();
|
||||
} else {
|
||||
phpbb.alert(response.error.title, response.error.messages.join('<br>'));
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -38,12 +38,12 @@ class phpbb_functional_avatar_acp_groups_test extends phpbb_functional_common_av
|
||||
),
|
||||
// Gravatar with incorrect size
|
||||
array(
|
||||
'The submitted avatar is 120 wide and 120 high. Avatars must be at least 20 wide and 20 high, but no larger than 90 wide and 90 high.',
|
||||
'The submitted avatar is 140 wide and 140 high. Avatars must be at least 40 wide and 40 high, but no larger than 120 wide and 120 high.',
|
||||
'avatar_driver_gravatar',
|
||||
array(
|
||||
'avatar_gravatar_email' => 'test@example.com',
|
||||
'avatar_gravatar_width' => 120,
|
||||
'avatar_gravatar_height' => 120,
|
||||
'avatar_gravatar_width' => 140,
|
||||
'avatar_gravatar_height' => 140,
|
||||
),
|
||||
),
|
||||
// Delete avatar image to reset group settings
|
||||
|
Loading…
x
Reference in New Issue
Block a user