Skip to content

Commit

Permalink
#1221 update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sosnovsky committed Dec 22, 2021
1 parent 2d2d5ca commit a1878ac
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion FlowCrypt/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"compose_password_placeholder" = "Tap to add password for recipients who don't have encryption set up.";
"compose_password_set_message" = "Web portal password added";
"compose_password_modal_title" = "Set web portal password";
"compose_password_modal_message" = "The recipients will receive a link to read your message on a web portal, where they will need to enter this password";
"compose_password_modal_message" = "The recipients will receive a link to read your message on a web portal, where they will need to enter this password.\n\nYou are responsible for sharing this password with recipients (use other medium to share the password - not email)";
"compose_error" = "Could not compose message";
"compose_reply_successful" = "Reply successfully sent";
"compose_quote_from" = "On %@ at %@ %@ wrote:"; // Date, time, sender
Expand Down
2 changes: 1 addition & 1 deletion FlowCryptUI/Cell Nodes/MessagePasswordCellNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ public final class MessagePasswordCellNode: CellNode {
super.init()

automaticallyManagesSubnodes = true
accessibilityIdentifier = "aid-message-password-cell"

setupButtonNode()
}
Expand All @@ -48,6 +47,7 @@ public final class MessagePasswordCellNode: CellNode {
buttonNode.borderWidth = 1
buttonNode.cornerRadius = 6
buttonNode.contentHorizontalAlignment = .left
buttonNode.accessibilityIdentifier = "aid-message-password-cell"

buttonNode.setAttributedTitle(input.text, for: .normal)
buttonNode.setImage(input.image, for: .normal)
Expand Down
5 changes: 3 additions & 2 deletions appium/tests/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ export const CommonData = {
recipientWithoutPublicKey: {
email: '[email protected]',
password: '123456',
modalMessage: `Set web portal password\nThe recipients will receive a link to read your message on a web portal, where they will need to enter this password`,
passwordAddedMessage: 'Web portal password added',
modalMessage: `Set web portal password\nThe recipients will receive a link to read your message on a web portal, where they will need to enter this password.\n\nYou are responsible for sharing this password with recipients (use other medium to share the password - not email)`,
emptyPasswordMessage: 'Tap to add password for recipients who don\'t have encryption set up.',
addedPasswordMessage: 'Web portal password added',
},
recipientWithExpiredPublicKey: {
email: '[email protected]'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ describe('COMPOSE EMAIL: ', () => {
const emailText = CommonData.simpleEmail.message;
const emailPassword = CommonData.recipientWithoutPublicKey.password;
const modalMessage = CommonData.recipientWithoutPublicKey.modalMessage;
const emptyPasswordMessage = CommonData.recipientWithoutPublicKey.emptyPasswordMessage;
const addedPasswordMessage = CommonData.recipientWithoutPublicKey.addedPasswordMessage;

await SplashScreen.login();
await SetupKeyScreen.setPassPhrase();
Expand All @@ -28,10 +30,10 @@ describe('COMPOSE EMAIL: ', () => {

await NewMessageScreen.checkModalText(modalMessage);
await NewMessageScreen.clickCancelButton();
await NewMessageScreen.checkPasswordCell("Tap to add password for recipients who don't have encryption set up.");
await NewMessageScreen.checkPasswordCell(emptyPasswordMessage);

await NewMessageScreen.clickPasswordCell();
await NewMessageScreen.setMessagePassword(emailPassword);
await NewMessageScreen.checkPasswordCell("Web portal password added");
await NewMessageScreen.checkPasswordCell(addedPasswordMessage);
});
});

0 comments on commit a1878ac

Please sign in to comment.