Skip to content

Commit

Permalink
issue #1138 added new scenarios for sending email to accounts with ex…
Browse files Browse the repository at this point in the history
…pired/revoked public key (#1141)

* added new scenarios for sending email for accounts with expired/revoked public key

* merged 2 scenarios into one, updated tests

Co-authored-by: Dmitry Sotnikov <[email protected]>
  • Loading branch information
fcvakintos and acladima authored Dec 2, 2021
1 parent 4162138 commit bd498cd
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
12 changes: 11 additions & 1 deletion appium/tests/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,19 @@ export const CommonData = {
recipientWithoutPublicKey: {
email: '[email protected]'
},
recipientWithExpiredPublicKey: {
email: '[email protected]'
},
recipientWithRevokedPublicKey: {
email: '[email protected]'
},
errors: {
noPublicKey: 'Could not compose message One or more of your recipients are missing a public key (marked in gray). ' +
'Please ask them to share it with you, or ask them to also set up FlowCrypt.',
wrongPassPhrase: 'Could not compose message This pass phrase did not match your signing private key'
wrongPassPhrase: 'Could not compose message This pass phrase did not match your signing private key',
expiredPublicKey: 'Could not compose message One or more of your recipients have expired public keys (marked in orange).' +
' Please ask them to send you updated public key. If this is an enterprise installation, please ask your systems admin.',
revokedPublicKey: 'Could not compose message One or more of your recipients have revoked public keys (marked in red).' +
' Please ask them to send you a new public key. If this is an enterprise installation, please ask your systems admin.'
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import {
SplashScreen,
SetupKeyScreen,
MailFolderScreen,
NewMessageScreen
} from '../../screenobjects/all-screens';

import { CommonData } from '../../data';

describe('COMPOSE EMAIL: ', () => {

it('sending message to user with expired/revoked public key produces modal', async () => {

const expiredPublicKey = CommonData.recipientWithExpiredPublicKey.email;
const revokedpublicKey = CommonData.recipientWithRevokedPublicKey.email;
const emailSubject = CommonData.simpleEmail.subject;
const emailText = CommonData.simpleEmail.message;
const expiredPublicKeyError = CommonData.errors.expiredPublicKey;
const revokedPublicKeyError = CommonData.errors.revokedPublicKey;


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

await MailFolderScreen.clickCreateEmail();
await NewMessageScreen.composeEmail(expiredPublicKey, emailSubject, emailText);
await NewMessageScreen.checkFilledComposeEmailInfo(expiredPublicKey, emailSubject, emailText);
await NewMessageScreen.clickSendButton();

await NewMessageScreen.checkError(expiredPublicKeyError);

await NewMessageScreen.clickOkButtonOnError();
await NewMessageScreen.clickBackButton();
await MailFolderScreen.checkInboxScreen();

await MailFolderScreen.clickCreateEmail();
await NewMessageScreen.composeEmail(revokedpublicKey, emailSubject, emailText);
await NewMessageScreen.checkFilledComposeEmailInfo(revokedpublicKey, emailSubject, emailText);
await NewMessageScreen.clickSendButton();

await NewMessageScreen.checkError(revokedPublicKeyError);
});
});

0 comments on commit bd498cd

Please sign in to comment.