feat: 在步骤 5 中添加自动勾选“我同意以下所有各项”复选框的逻辑,并更新相关测试
This commit is contained in:
@@ -51,6 +51,16 @@ function extractFunction(name) {
|
||||
return source.slice(start, end);
|
||||
}
|
||||
|
||||
function getStep5Bundle() {
|
||||
return [
|
||||
extractFunction('getStep5DirectCompletionPayload'),
|
||||
extractFunction('isStep5AllConsentText'),
|
||||
extractFunction('findStep5AllConsentCheckbox'),
|
||||
extractFunction('isStep5CheckboxChecked'),
|
||||
extractFunction('step5_fillNameBirthday'),
|
||||
].join('\n');
|
||||
}
|
||||
|
||||
test('step 5 clicks submit and completes immediately on birthday page', async () => {
|
||||
const step5Source = extractFunction('step5_fillNameBirthday');
|
||||
assert.ok(
|
||||
@@ -158,12 +168,11 @@ function reportComplete(step, payload) {
|
||||
completions.push({ step, payload });
|
||||
}
|
||||
|
||||
function normalizeInlineText(text) {
|
||||
return text;
|
||||
}
|
||||
function normalizeInlineText(text) {
|
||||
return String(text || '').replace(/\\s+/g, ' ').trim();
|
||||
}
|
||||
|
||||
${extractFunction('getStep5DirectCompletionPayload')}
|
||||
${extractFunction('step5_fillNameBirthday')}
|
||||
${getStep5Bundle()}
|
||||
|
||||
return {
|
||||
async run(payload) {
|
||||
|
||||
Reference in New Issue
Block a user