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
2 changes: 2 additions & 0 deletions FlowCryptUI/Cell Nodes/ThreadMessageSenderCellNode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ public final class ThreadMessageSenderCellNode: CellNode {
automaticallyManagesSubnodes = true

senderNode.attributedText = input.sender
senderNode.accessibilityIdentifier = "senderEmail"
dateNode.attributedText = input.date


setupReplyNode()
setupExpandNode()
}
Expand Down
11 changes: 8 additions & 3 deletions appium/tests/screenobjects/email.screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const SELECTORS = {
DOWNLOAD_ATTACHMENT_BUTTON: '~downloadButton',
REPLY_BUTTON: '~replyButton',
DELETE_BUTTON: '~Delete',
CONFIRM_DELETING: '~OK'
CONFIRM_DELETING: '~OK',
SENDER_EMAIL: '~senderEmail'
};


Expand Down Expand Up @@ -51,9 +52,13 @@ class EmailScreen extends BaseScreen {
return $(SELECTORS.CONFIRM_DELETING)
}

get senderEmail() {
return $(SELECTORS.SENDER_EMAIL);
}

checkEmailAddress = async (email: string) => {
const selector = `~${email}`;
await (await $(selector)).waitForDisplayed();
await (await this.senderEmail).waitForDisplayed();
await expect(await this.senderEmail).toHaveText(email);
}

checkEmailSubject = async (subject: string) => {
Expand Down
10 changes: 5 additions & 5 deletions appium/tests/screenobjects/new-message.screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const SELECTORS = {
'/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeStaticText', //it works only with this selector
RETURN_BUTTON: '~Return',
BACK_BUTTON: '~arrow left c',
SENT_BUTTON: '~android send',
SEND_BUTTON: '~android send',
ERROR_HEADER: '-ios class chain:**/XCUIElementTypeStaticText[`label == "Error"`]',
OK_BUTTON: '~OK'
};
Expand Down Expand Up @@ -41,8 +41,8 @@ class NewMessageScreen extends BaseScreen {
return $(SELECTORS.BACK_BUTTON);
}

get sentButton() {
return $(SELECTORS.SENT_BUTTON);
get sendButton() {
return $(SELECTORS.SEND_BUTTON);
}

get errorHeader() {
Expand Down Expand Up @@ -100,8 +100,8 @@ class NewMessageScreen extends BaseScreen {
await ElementHelper.waitAndClick(await this.backButton);
}

clickSentButton = async () => {
await ElementHelper.waitAndClick(await this.sentButton);
clickSendButton = async () => {
await ElementHelper.waitAndClick(await this.sendButton);
}

checkError = async (errorText: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('COMPOSE EMAIL: ', () => {
await InboxScreen.clickCreateEmail();
await NewMessageScreen.composeEmail(noPublicKeyRecipient, emailSubject, emailText);
await NewMessageScreen.checkFilledComposeEmailInfo(noPublicKeyRecipient, emailSubject, emailText);
await NewMessageScreen.clickSentButton();
await NewMessageScreen.clickSendButton();

await NewMessageScreen.checkError(noPublicKeyError);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ describe('COMPOSE EMAIL: ', () => {
await NewMessageScreen.composeEmail(contactEmail, emailSubject, emailText);
await NewMessageScreen.checkFilledComposeEmailInfo(contactEmail, emailSubject, emailText);
//Set wrong pass phrase and check error
await NewMessageScreen.clickSentButton();
await NewMessageScreen.clickSendButton();
await EmailScreen.enterPassPhrase(wrongPassPhrase);
await EmailScreen.clickOkButton();
await NewMessageScreen.checkError(wrongPassPhraseError);
await NewMessageScreen.clickOkButtonOnError();
//Set correct pass phrase
await NewMessageScreen.clickSentButton();
await NewMessageScreen.clickSendButton();
await EmailScreen.enterPassPhrase(passPhrase);
await EmailScreen.clickOkButton();
await InboxScreen.checkInboxScreen();
Expand Down