feat: add configurable operation delay

This commit is contained in:
root
2026-05-08 12:50:20 -04:00
parent 872f382815
commit c23461261b
44 changed files with 4770 additions and 193 deletions
+11
View File
@@ -954,16 +954,23 @@ const window = {
},
};
const operationDelayCalls = [];
async function sleep() {}
function simulateClick(node) {
node.click();
}
async function performOperationWithDelay(metadata, operation) {
operationDelayCalls.push({ label: metadata.label, kind: metadata.kind });
return await operation();
}
${bundle}
return {
rememberCheckbox,
agreementCheckbox,
operationDelayCalls,
ensureAgreementChecked,
};
`)();
@@ -973,4 +980,8 @@ return {
assert.equal(result, true);
assert.equal(api.rememberCheckbox.checked, true);
assert.equal(api.agreementCheckbox.checked, true);
assert.deepStrictEqual(api.operationDelayCalls, [
{ label: 'mail2925-agreement-checkbox', kind: 'click' },
{ label: 'mail2925-agreement-checkbox', kind: 'click' },
]);
});