等待后端更新接口
This commit is contained in:
@@ -100,6 +100,26 @@ test('registration page exposes the documented SMS and confirmation inputs', ()
|
||||
assert.match(source, /name="confirmPassword"/);
|
||||
});
|
||||
|
||||
test('认证表单提供可见标签、统一状态容器和提交中反馈,且不暗示邀请码流程', () => {
|
||||
const login = fs.readFileSync(path.join(__dirname, '..', 'login.html'), 'utf8');
|
||||
const register = fs.readFileSync(path.join(__dirname, '..', 'register.html'), 'utf8');
|
||||
const reset = fs.readFileSync(path.join(__dirname, '..', 'forgot-password.html'), 'utf8');
|
||||
const script = fs.readFileSync(path.join(__dirname, '..', 'public/js/auth-pages.js'), 'utf8');
|
||||
|
||||
[login, register, reset].forEach((source) => {
|
||||
assert.match(source, /class="auth-field"/);
|
||||
assert.match(source, /role="status" aria-live="polite" data-auth-form-status/);
|
||||
assert.match(source, /public\/js\/profile-common\.js/);
|
||||
assert.match(source, /novalidate/);
|
||||
});
|
||||
assert.doesNotMatch(register, /邀请码/);
|
||||
assert.match(script, /root\.ProfileUI && root\.ProfileUI\.setApiState/);
|
||||
assert.match(script, /setSubmitPending\(/);
|
||||
assert.match(script, /正在登录…/);
|
||||
assert.match(script, /正在注册…/);
|
||||
assert.match(script, /正在重设…/);
|
||||
});
|
||||
|
||||
test('password login page retains a verification token field for the PC captcha strategy', () => {
|
||||
const source = fs.readFileSync(path.join(__dirname, '..', 'login.html'), 'utf8');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user