feat(mail): add governed JMAP mailbox sync and search
Module Package Release / publish-packages (push) Successful in 12s
Module Package Release / publish-packages (push) Successful in 12s
This commit is contained in:
@@ -47,6 +47,9 @@ assertEqual(mailProfileEditTargetPanelMode({ kind: "credentials", protocol: "ima
|
||||
assertEqual(mailProfileEditTargetPanelMode({ kind: "profile" }), null);
|
||||
assertDeepEqual(mailProfileEditTargetVisibleSections({ kind: "create" }), ["smtp", "imap"]);
|
||||
assertDeepEqual(mailProfileEditTargetVisibleSections({ kind: "credentials", protocol: "imap" }), ["imap"]);
|
||||
assertEqual(mailProfileEditTargetInitialSection({ kind: "server", protocol: "jmap" }), "imap");
|
||||
assertDeepEqual(mailProfileEditTargetVisibleSections({ kind: "server", protocol: "jmap" }), []);
|
||||
assertEqual(mailProfileEditTargetShowsSettingsPanel({ kind: "credentials", protocol: "jmap" }), false);
|
||||
assertEqual(mailProfileEditTargetShowsProfileFields({ kind: "profile" }), true);
|
||||
assertEqual(mailProfileEditTargetShowsProfileFields({ kind: "server", protocol: "smtp" }), false);
|
||||
assertEqual(mailProfileEditTargetShowsSettingsPanel({ kind: "profile" }), false);
|
||||
@@ -118,9 +121,11 @@ const updateParts = {
|
||||
profile: { name: "Renamed" },
|
||||
smtp: { host: "smtp.example.org" },
|
||||
imap: { host: "imap.example.org" },
|
||||
jmap: { session_url: "https://jmap.example.org/.well-known/jmap" },
|
||||
credentials: {
|
||||
smtp: { username: "smtp-user", password: "smtp-secret" },
|
||||
imap: { username: "imap-user", password: "imap-secret" }
|
||||
imap: { username: "imap-user", password: "imap-secret" },
|
||||
jmap: { password: "jmap-token" }
|
||||
},
|
||||
clearImap: false
|
||||
};
|
||||
@@ -139,6 +144,16 @@ assertDeepEqual(
|
||||
{ credentials: { imap: { username: "imap-user", password: "imap-secret" } } },
|
||||
"credential edits send only the selected protocol"
|
||||
);
|
||||
assertDeepEqual(
|
||||
mailProfileTargetedUpdatePayload({ kind: "server", protocol: "jmap" }, updateParts),
|
||||
{ jmap: { session_url: "https://jmap.example.org/.well-known/jmap" } },
|
||||
"JMAP server edits remain isolated from legacy profile transports"
|
||||
);
|
||||
assertDeepEqual(
|
||||
mailProfileTargetedUpdatePayload({ kind: "credentials", protocol: "jmap" }, updateParts),
|
||||
{ credentials: { jmap: { password: "jmap-token" } } },
|
||||
"JMAP credential edits retain only the selected credential"
|
||||
);
|
||||
assertEqual(
|
||||
mailProfileCreateCredentialsPayload({ username: null }, { password: "" }),
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user