test(profile): cover account modal styling
This commit is contained in:
@@ -23,12 +23,20 @@ test('account dialogs expose configured email steps, phone steps, and reference
|
|||||||
assert.match(template, /if \(\$account_phone !== ''\)[\s\S]*?else : \?>[\s\S]*?aksrt-settings-modal__pane/);
|
assert.match(template, /if \(\$account_phone !== ''\)[\s\S]*?else : \?>[\s\S]*?aksrt-settings-modal__pane/);
|
||||||
assert.match(template, /data-aksrt-sms-scene="verify_old_phone"/);
|
assert.match(template, /data-aksrt-sms-scene="verify_old_phone"/);
|
||||||
assert.match(template, /data-aksrt-sms-scene="bind_new_phone"/);
|
assert.match(template, /data-aksrt-sms-scene="bind_new_phone"/);
|
||||||
|
assert.match(template, /\$account_close_icon = function_exists\('aksrt_icon_markup'\)/);
|
||||||
|
assert.match(template, /<i class="fa far fa-envelope"/);
|
||||||
|
assert.match(template, /aksrt_render_captcha\('change_email'\)[\s\S]*?id="email-code"/);
|
||||||
|
assert.match(template, /aksrt_render_captcha\('bind_phone'\)[\s\S]*?id="bind-phone-code"/);
|
||||||
assert.match(template, /if \(!\$account_oauth_new\)[\s\S]*?name="passwordold"/);
|
assert.match(template, /if \(!\$account_oauth_new\)[\s\S]*?name="passwordold"/);
|
||||||
assert.match(template, /if \(!\$account_oauth_new && \$can_recover_password\)/);
|
assert.match(template, /if \(!\$account_oauth_new && \$can_recover_password\)/);
|
||||||
assert.match(template, /data-account-password-pane="recovery"/);
|
assert.match(template, /data-account-password-pane="recovery"/);
|
||||||
assert.match(javascript, /\/auth\/code/);
|
assert.match(javascript, /\/auth\/code/);
|
||||||
assert.match(javascript, /\/auth\/reset-password/);
|
assert.match(javascript, /\/auth\/reset-password/);
|
||||||
|
assert.match(javascript, /className: 'aksrt-user-settings-modal modal-mini full-sm'/);
|
||||||
assert.doesNotMatch(template + javascript + css, /pwd-strength|pwd-send-code|email-send-code/);
|
assert.doesNotMatch(template + javascript + css, /pwd-strength|pwd-send-code|email-send-code/);
|
||||||
|
assert.match(css, /\.aksrt-modal-runtime\.aksrt-user-settings-modal\.aksrt-modal-runtime--bottom \.aksrt-modal-runtime__dialog \{[\s\S]*?width: 400px/);
|
||||||
|
assert.match(css, /@media \(max-width: 640px\)[\s\S]*?width: 100%/);
|
||||||
|
assert.doesNotMatch(css, /\.code-send-btn \{ min-width:/);
|
||||||
|
|
||||||
const emailConditionStart = template.indexOf('<?php if ($email_verify_required) : ?>');
|
const emailConditionStart = template.indexOf('<?php if ($email_verify_required) : ?>');
|
||||||
const emailElse = template.indexOf('<?php else : ?>', emailConditionStart);
|
const emailElse = template.indexOf('<?php else : ?>', emailConditionStart);
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ test('profile routes load versioned leaf styles and settings dialogs use the sha
|
|||||||
assert.match(settingsBindings, /aksrt-account-list--social/);
|
assert.match(settingsBindings, /aksrt-account-list--social/);
|
||||||
assert.match(settingsBindings, /binding-unbind-btn/);
|
assert.match(settingsBindings, /binding-unbind-btn/);
|
||||||
assert.match(userCenterJs, /runtime\.open\(\{/);
|
assert.match(userCenterJs, /runtime\.open\(\{/);
|
||||||
assert.match(userCenterJs, /className: 'aksrt-user-settings-modal modal-mini'/);
|
assert.match(userCenterJs, /className: 'aksrt-user-settings-modal modal-mini full-sm'/);
|
||||||
assert.match(userCenterJs, /mobileBottom: true/);
|
assert.match(userCenterJs, /mobileBottom: true/);
|
||||||
assert.match(userCenterJs, /onContent: function \(_, session\)/);
|
assert.match(userCenterJs, /onContent: function \(_, session\)/);
|
||||||
assert.match(userCenterJs, /aksrt:modal:close[\s\S]*?resetSettingsModal\(event\.detail && event\.detail\.shell\)/);
|
assert.match(userCenterJs, /aksrt:modal:close[\s\S]*?resetSettingsModal\(event\.detail && event\.detail\.shell\)/);
|
||||||
|
|||||||
Reference in New Issue
Block a user