Refractoring Stage 6.6 Migrated productivity.js and shortcuts.js mail-state access and render/preferences hooks to the mail feature API.
This commit is contained in:
@@ -62,12 +62,18 @@ test('account and snooze UI consume the explicit mail API instead of selected le
|
||||
const snoozeUi = fs.readFileSync(path.join(root, 'snooze-ui.js'), 'utf8');
|
||||
const attachmentUi = fs.readFileSync(path.join(root, 'attachments.js'), 'utf8');
|
||||
const pgpMailUi = fs.readFileSync(path.join(root, 'pgp-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/);
|
||||
assert.match(snoozeUi, /window\.epMailFeatures\.mail/);
|
||||
assert.match(attachmentUi, /window\.epMailFeatures\.mail/);
|
||||
assert.match(pgpMailUi, /window\.epMailFeatures\.mail/);
|
||||
assert.match(shortcutsUi, /window\.epMailFeatures\.mail/);
|
||||
assert.match(shortcutsUi, /window\.epMailFeatures\.productivity/);
|
||||
assert.doesNotMatch(accountUi, /\bconnectedMailAccount\b|\bmailPageOffset\b|(?<!\.)\bsyncMailbox\s*\(/);
|
||||
assert.doesNotMatch(snoozeUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bselectedIds\b|(?<!\.)\bsyncMailbox\s*\(/);
|
||||
assert.doesNotMatch(attachmentUi, /\bconnectedMailAccount\b|(?<!\.)\bactiveFolder\b|(?<!\.)\bmessages\.find/);
|
||||
assert.doesNotMatch(pgpMailUi, /(?<!\.)\bmessages\.find|(?<!\.)\bactiveMessage\b|window\.pgpPrepareSend/);
|
||||
assert.match(productivityUi, /window\.epMailFeatures\.productivity/);
|
||||
assert.doesNotMatch(shortcutsUi, /(?<!\.)\bactiveMessage\b|(?<!\.)\bopenMessage\s*\(/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user