Refractoring Stage 6.11 The account manager now uses explicit mail and DAV feature APIs, is scoped locally instead of exposing a global helper, and loads after the DAV feature registers its API. Root and www/ assets are synchronized.

This commit is contained in:
2026-10-16 22:11:52 +03:00
parent 3013e489ed
commit e80f285e8c
11 changed files with 45 additions and 18 deletions
+5
View File
@@ -63,6 +63,7 @@ test('account and snooze UI consume the explicit mail API instead of selected le
const attachmentUi = fs.readFileSync(path.join(root, 'attachments.js'), 'utf8');
const pgpMailUi = fs.readFileSync(path.join(root, 'pgp-mail-ui.js'), 'utf8');
const pgpUi = fs.readFileSync(path.join(root, 'pgp-ui.js'), 'utf8');
const davUi = fs.readFileSync(path.join(root, 'dav-ui.js'), 'utf8');
const appShell = fs.readFileSync(path.join(root, 'app.js'), 'utf8');
const mailUi = fs.readFileSync(path.join(root, 'mail-ui.js'), 'utf8');
const shortcutsUi = fs.readFileSync(path.join(root, 'shortcuts.js'), 'utf8');
@@ -72,6 +73,10 @@ test('account and snooze UI consume the explicit mail API instead of selected le
assert.match(attachmentUi, /window\.epMailFeatures\.mail/);
assert.match(pgpMailUi, /window\.epMailFeatures\.mail/);
assert.match(pgpUi, /window\.epMailFeatures\.mail\.connectedAccount/);
assert.match(accountUi, /const accountDavUi = window\.epMailFeatures\.dav/);
assert.match(accountUi, /accountDavUi\.openManager/);
assert.doesNotMatch(accountUi, /(?<!\.)\b(?:esc|toast)\s*\(|(?<!\.)\$\(/);
assert.match(davUi, /window\.epMailFeatures\.dav = Object\.freeze/);
assert.match(appShell, /window\.epMailShell = Object\.freeze/);
assert.match(mailUi, /appShell\.wrapOpenMessage/);
assert.match(mailUi, /appShell\.wrapShowCompose/);