Refractoring Stage 6.10 Completed the next renderer modularization slice. mail-ui.js now uses an explicit epMailShell API for core UI helpers and renderer hooks, and the OpenPGP key UI uses feature APIs instead of legacy globals.
This commit is contained in:
@@ -63,6 +63,8 @@ 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 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');
|
||||
const productivityUi = fs.readFileSync(path.join(root, 'productivity.js'), 'utf8');
|
||||
assert.match(accountUi, /window\.epMailFeatures\.mail/);
|
||||
@@ -70,6 +72,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(appShell, /window\.epMailShell = Object\.freeze/);
|
||||
assert.match(mailUi, /appShell\.wrapOpenMessage/);
|
||||
assert.match(mailUi, /appShell\.wrapShowCompose/);
|
||||
assert.doesNotMatch(mailUi, /(?<!\.)\bopenPreferences\s*\(|(?<!\.)\bquery\s*=/);
|
||||
assert.match(shortcutsUi, /window\.epMailFeatures\.mail/);
|
||||
assert.match(shortcutsUi, /window\.epMailFeatures\.productivity/);
|
||||
assert.doesNotMatch(accountUi, /\bconnectedMailAccount\b|\bmailPageOffset\b|(?<!\.)\bsyncMailbox\s*\(/);
|
||||
|
||||
Reference in New Issue
Block a user