Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion appium/config/wdio.live.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ config.suites = {
login: [
'./tests/specs/live/login/*.spec.ts'
],
update: ['./tests/specs/live/update/*.spec.ts']
update: [
'./tests/specs/live/update/*.spec.ts'
]
};

config.capabilities = [
Expand Down
12 changes: 9 additions & 3 deletions appium/tests/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,16 @@ export const CommonData = {
},
notIntegrityProtected: {
subject: 'not integrity protected - should show a warning and not decrypt automatically',
message: '',
message: 'Message is missing integrity checks (MDC). The sender should update their outdated software and resend.',
senderEmail: 'flowcrypt.compatibility@gmail.com',
encryptionBadgeText: 'not encrypted',
signatureBadgeText: 'not signed'
},
keyMismatch: {
subject: 'key mismatch unexpectedly produces a modal',
message: 'Here are the images for testing compatibility.',
senderEmail: 'sunitnandi834@gmail.com',
encryptedBadgeText: 'encrypted',
signatureBadgeText: 'not signed',
firstAttachmentName: 'Screenshot_20180422_125217.png.asc'
},
recipientWithoutPublicKey: {
email: 'no.publickey@flowcrypt.com'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,22 @@ describe('INBOX: ', () => {
const wrongChecksumEmail = CommonData.wrongChecksumEmail.senderEmail;
const wrongChecksumText = CommonData.wrongChecksumEmail.message;

// Const for not integrity protected message BUG:https://github.com/FlowCrypt/flowcrypt-ios/issues/1144
// const notIntegrityProtectedSubject = CommonData.notIntegrityProtected.subject;
// // const notIntegrityProtectedEmail = CommonData.notIntegrityProtected.senderEmail;
// // const notIntegrityProtectedText = CommonData.notIntegrityProtected.message;
// const notIntegrityProtectedEncryptionBadge = CommonData.notIntegrityProtected.encryptionBadgeText;
// const notIntegrityProtectedSignatureBadge = CommonData.notIntegrityProtected.signatureBadgeText;
const notIntegrityProtectedSubject = CommonData.notIntegrityProtected.subject;
const notIntegrityProtectedEmail = CommonData.notIntegrityProtected.senderEmail;
const notIntegrityProtectedText = CommonData.notIntegrityProtected.message;

const keyMismatchSubject = CommonData.keyMismatch.subject;
const keyMismatchEmail = CommonData.keyMismatch.senderEmail;
const keyMismatchText = CommonData.keyMismatch.message;
const keyMismatchEncryptedBadge = CommonData.keyMismatch.encryptedBadgeText;
const keyMismatchSignatureBadge= CommonData.keyMismatch.signatureBadgeText;
const firstAttachmentName = CommonData.keyMismatch.firstAttachmentName;

await SplashScreen.login();
await SetupKeyScreen.setPassPhrase();
await MailFolderScreen.checkInboxScreen();

// Checking MDC hash mismatch message
// Checking error for MDC hash mismatch message
await MailFolderScreen.clickSearchButton();
await SearchScreen.searchAndClickEmailBySubject(encryptedMDCSubject);
await EmailScreen.checkOpenedEmail(encryptedMDCEmail, encryptedMDCSubject, encryptedMDCText);
Expand All @@ -50,7 +54,7 @@ describe('INBOX: ', () => {
await SearchScreen.clickBackButton();
await MailFolderScreen.checkInboxScreen();

// Checking message encrypted for another public key
// Checking error message encrypted for another public key
await MailFolderScreen.clickSearchButton();
await SearchScreen.searchAndClickEmailBySubject(encryptedForAnotherPublicKeySubject);
await EmailScreen.checkOpenedEmail(encryptedForAnotherPublicKeyEmail, encryptedForAnotherPublicKeySubject, encryptedForAnotherPublicKeyText);
Expand All @@ -60,22 +64,34 @@ describe('INBOX: ', () => {
await SearchScreen.clickBackButton();
await MailFolderScreen.checkInboxScreen();

// Checking wrong checksum message
// Checking error for wrong checksum message
await MailFolderScreen.clickSearchButton();
await SearchScreen.searchAndClickEmailBySubject(wrongChecksumSubject);
await EmailScreen.checkOpenedEmail(wrongChecksumEmail, wrongChecksumSubject, wrongChecksumText);
await EmailScreen.checkEncryptionBadge(decryptErrorBadgeText);

// Checking integrity protected message BUG:https://github.com/FlowCrypt/flowcrypt-ios/issues/1144
// Checking error for integrity protected message
await EmailScreen.clickBackButton();
await SearchScreen.clickBackButton();
await MailFolderScreen.checkInboxScreen();
await MailFolderScreen.clickSearchButton();

// await EmailScreen.clickBackButton();
// await SearchScreen.clickBackButton();
// await MailFolderScreen.checkInboxScreen();
await SearchScreen.searchAndClickEmailBySubject(notIntegrityProtectedSubject);
await MailFolderScreen.clickOnEmailBySubject(notIntegrityProtectedSubject);
await EmailScreen.checkOpenedEmail(notIntegrityProtectedEmail, notIntegrityProtectedSubject, notIntegrityProtectedText);
await EmailScreen.checkEncryptionBadge(decryptErrorBadgeText);

// Checking if message body is rendered with key mismatch
await EmailScreen.clickBackButton();
await SearchScreen.clickBackButton();
await MailFolderScreen.checkInboxScreen();
await MailFolderScreen.clickSearchButton();

// await MailFolderScreen.searchEmailBySubject(notIntegrityProtectedSubject);
// await MailFolderScreen.clickOnEmailBySubject(notIntegrityProtectedSubject);
// // await EmailScreen.checkOpenedEmail(notIntegrityProtectedEmail, notIntegrityProtectedSubject, notIntegrityProtectedText);
// await EmailScreen.checkEncryptionBadge(notIntegrityProtectedEncryptionBadge);
// await EmailScreen.checkSignatureBadge(notIntegrityProtectedSignatureBadge);
await SearchScreen.searchAndClickEmailBySubject(keyMismatchSubject);
await MailFolderScreen.clickOnEmailBySubject(keyMismatchSubject);
await EmailScreen.checkOpenedEmail(keyMismatchEmail, keyMismatchSubject, keyMismatchText);
await EmailScreen.checkEncryptionBadge(keyMismatchEncryptedBadge);
await EmailScreen.checkSignatureBadge(keyMismatchSignatureBadge);
await EmailScreen.checkAttachment(firstAttachmentName);
});
});