diff --git a/FlowCrypt/Controllers/Compose/ComposeViewController.swift b/FlowCrypt/Controllers/Compose/ComposeViewController.swift index 766f1c00b..3f164cfef 100644 --- a/FlowCrypt/Controllers/Compose/ComposeViewController.swift +++ b/FlowCrypt/Controllers/Compose/ComposeViewController.swift @@ -1034,6 +1034,12 @@ extension ComposeViewController { }() guard let recipientIndex = index else { return } + + let recipient = contextToSend.recipients[recipientIndex] + let needsReload = recipient.state != state || recipient.keyState != keyState + + guard needsReload else { return } + contextToSend.recipients[recipientIndex].state = state contextToSend.recipients[recipientIndex].keyState = keyState diff --git a/FlowCrypt/Controllers/Threads/ThreadDetailsViewController.swift b/FlowCrypt/Controllers/Threads/ThreadDetailsViewController.swift index d896dc291..014b08266 100644 --- a/FlowCrypt/Controllers/Threads/ThreadDetailsViewController.swift +++ b/FlowCrypt/Controllers/Threads/ThreadDetailsViewController.swift @@ -156,23 +156,28 @@ extension ThreadDetailsViewController { message: nil, preferredStyle: .actionSheet ) + if let view = node.nodeForRow(at: indexPath) as? ThreadMessageInfoCellNode { alert.popoverPresentation(style: .sourceView(view.menuNode.view)) } else { alert.popoverPresentation(style: .centred(view)) } - alert.addAction( - UIAlertAction( - title: "forward".localized, - style: .default) { [weak self] _ in - self?.composeNewMessage(at: indexPath, quoteType: .forward) - } - ) + alert.addAction(createComposeNewMessageAlertAction(at: indexPath, type: .replyAll)) + alert.addAction(createComposeNewMessageAlertAction(at: indexPath, type: .forward)) alert.addAction(UIAlertAction(title: "cancel".localized, style: .cancel)) + present(alert, animated: true, completion: nil) } + private func createComposeNewMessageAlertAction(at indexPath: IndexPath, type: MessageQuoteType) -> UIAlertAction { + UIAlertAction( + title: type.actionLabel, + style: .default) { [weak self] _ in + self?.composeNewMessage(at: indexPath, quoteType: type) + } + } + private func handleAttachmentTap(at indexPath: IndexPath) { Task { do { @@ -211,16 +216,27 @@ extension ThreadDetailsViewController { let processedMessage = input.processedMessage else { return } - let recipients = quoteType == .reply - ? [input.rawMessage.sender].compactMap({ $0 }) - : [] + let sender = [input.rawMessage.sender].compactMap { $0 } + let recipients: [String] = { + switch quoteType { + case .reply: + return sender + case .replyAll: + let recipientEmails = input.rawMessage.recipients.map(\.email) + let allRecipients = (recipientEmails + sender).unique() + let filteredRecipients = allRecipients.filter { $0 != appContext.user.email } + return filteredRecipients.isEmpty ? sender : filteredRecipients + case .forward: + return [] + } + }() let attachments = quoteType == .forward ? input.processedMessage?.attachments ?? [] : [] let subject = input.rawMessage.subject ?? "(no subject)" - let threadId = quoteType == .reply ? input.rawMessage.threadId : nil + let threadId = quoteType == .forward ? nil : input.rawMessage.threadId let replyInfo = ComposeMessageInput.MessageQuoteInfo( recipients: recipients, @@ -233,13 +249,15 @@ extension ThreadDetailsViewController { attachments: attachments ) - let composeType: ComposeMessageInput.InputType - switch quoteType { - case .reply: - composeType = .reply(replyInfo) - case .forward: - composeType = .forward(replyInfo) - } + let composeType: ComposeMessageInput.InputType = { + switch quoteType { + case .reply, .replyAll: + return .reply(replyInfo) + case .forward: + return .forward(replyInfo) + } + }() + let composeInput = ComposeMessageInput(type: composeType) navigationController?.pushViewController( ComposeViewController(appContext: appContext, input: composeInput), diff --git a/FlowCrypt/Functionality/Mail Provider/MessagesList Provider/Model/MessageQuoteType.swift b/FlowCrypt/Functionality/Mail Provider/MessagesList Provider/Model/MessageQuoteType.swift index 7a91fc4b8..09ea38df7 100644 --- a/FlowCrypt/Functionality/Mail Provider/MessagesList Provider/Model/MessageQuoteType.swift +++ b/FlowCrypt/Functionality/Mail Provider/MessagesList Provider/Model/MessageQuoteType.swift @@ -9,16 +9,27 @@ import Foundation enum MessageQuoteType { - case reply, forward + case reply, replyAll, forward } extension MessageQuoteType { var subjectPrefix: String { switch self { - case .reply: + case .reply, .replyAll: return "Re: " case .forward: return "Fwd: " } } + + var actionLabel: String { + switch self { + case .reply: + return "" + case .replyAll: + return "message_reply_all".localized + case .forward: + return "forward".localized + } + } } diff --git a/FlowCrypt/Resources/en.lproj/Localizable.strings b/FlowCrypt/Resources/en.lproj/Localizable.strings index d4d9b4842..20cc5ffa8 100644 --- a/FlowCrypt/Resources/en.lproj/Localizable.strings +++ b/FlowCrypt/Resources/en.lproj/Localizable.strings @@ -53,6 +53,7 @@ "message_signature_fail_reason" = "Failed to verify signature due to: %@"; "message_decrypt_error" = "decrypt error"; "message_mark_read_error" = "Could not mark message as read: %@"; +"message_reply_all" = "Reply all"; // ERROR "error_fetch_folders" = "Could not fetch folders"; diff --git a/FlowCryptUI/Cell Nodes/RecipientEmailNode.swift b/FlowCryptUI/Cell Nodes/RecipientEmailNode.swift index d322cb871..13f4b35f8 100644 --- a/FlowCryptUI/Cell Nodes/RecipientEmailNode.swift +++ b/FlowCryptUI/Cell Nodes/RecipientEmailNode.swift @@ -34,12 +34,14 @@ final class RecipientEmailNode: CellNode { init(input: Input, index: Int) { self.input = input super.init() + + if let stateAccessibilityIdentifier = input.recipient.state.accessibilityIdentifier { + accessibilityIdentifier = "aid-to-\(index)-\(stateAccessibilityIdentifier)" + } + titleNode.attributedText = " ".attributed() + input.recipient.email + " ".attributed() titleNode.backgroundColor = input.recipient.state.backgroundColor - if let accessibilityIdentifier = input.recipient.state.accessibilityIdentifier { - titleNode.accessibilityIdentifier = "aid-to-\(index)-\(accessibilityIdentifier)" - } - titleNode.isAccessibilityElement = true + titleNode.accessibilityIdentifier = "aid-to-\(index)-label" titleNode.cornerRadius = 8 titleNode.clipsToBounds = true diff --git a/FlowCryptUI/Cell Nodes/RecipientEmailsCellNode.swift b/FlowCryptUI/Cell Nodes/RecipientEmailsCellNode.swift index 8ba4f766b..ad52f08bb 100644 --- a/FlowCryptUI/Cell Nodes/RecipientEmailsCellNode.swift +++ b/FlowCryptUI/Cell Nodes/RecipientEmailsCellNode.swift @@ -35,7 +35,7 @@ final public class RecipientEmailsCellNode: CellNode { public lazy var collectionNode: ASCollectionNode = { let node = ASCollectionNode(collectionViewLayout: layout) - node.accessibilityIdentifier = "recipientsList" + node.accessibilityIdentifier = "aid-recipients-list" node.backgroundColor = .clear return node }() diff --git a/FlowCryptUI/Cell Nodes/RecipientEmailsCellNodeInput.swift b/FlowCryptUI/Cell Nodes/RecipientEmailsCellNodeInput.swift index be8b0a795..660e9b084 100644 --- a/FlowCryptUI/Cell Nodes/RecipientEmailsCellNodeInput.swift +++ b/FlowCryptUI/Cell Nodes/RecipientEmailsCellNodeInput.swift @@ -11,7 +11,7 @@ import UIKit // MARK: Input extension RecipientEmailsCellNode { public struct Input { - public struct StateContext { + public struct StateContext: Equatable { let backgroundColor, borderColor, textColor: UIColor let image: UIImage? let accessibilityIdentifier: String? @@ -31,7 +31,7 @@ extension RecipientEmailsCellNode { } } - public enum State: CustomStringConvertible { + public enum State: CustomStringConvertible, Equatable { case idle(StateContext) case selected(StateContext) case keyFound(StateContext) diff --git a/Gemfile.lock b/Gemfile.lock index 1ed9f6c46..eefccac39 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,7 +18,7 @@ GEM atomos (0.1.3) aws-eventstream (1.2.0) aws-partitions (1.551.0) - aws-sdk-core (3.125.5) + aws-sdk-core (3.125.6) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.525.0) aws-sigv4 (~> 1.1) @@ -116,7 +116,7 @@ GEM faraday_middleware (1.2.0) faraday (~> 1.0) fastimage (2.2.6) - fastlane (2.203.0) + fastlane (2.204.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) diff --git a/appium/tests/data/index.ts b/appium/tests/data/index.ts index ddeeaa05f..faec23766 100644 --- a/appium/tests/data/index.ts +++ b/appium/tests/data/index.ts @@ -47,6 +47,14 @@ export const CommonData = { attachmentName: 'image.png', encryptedAttachmentName: 'image.png.pgp' }, + emailWithMultipleRecipients: { + sender: 'flowcrypt.compatibility@gmail.com', + recipient: 'robot@flowcrypt.com', + subject: 'Message with multiple recipients and attachment', + message: 'This email has multiple recipients and attachment', + attachmentName: 'image.png', + encryptedAttachmentName: 'image.png.pgp', + }, simpleEmail: { subject: 'Test 1', message: 'Test email', diff --git a/appium/tests/helpers/DataHelper.ts b/appium/tests/helpers/DataHelper.ts index e046f78fd..b72c8a2a3 100644 --- a/appium/tests/helpers/DataHelper.ts +++ b/appium/tests/helpers/DataHelper.ts @@ -4,8 +4,8 @@ class DataHelper { static uniqueValue() { return Math.random().toString(36).substring(2); } - static convertDateToMSec = async (date: string ) => { - return await Date.parse(moment(date.replace('at', '')).toISOString()) + static convertDateToMSec = (date: string ) => { + return Date.parse(moment(date.replace('at', '')).toISOString()) } } diff --git a/appium/tests/screenobjects/email.screen.ts b/appium/tests/screenobjects/email.screen.ts index 171037093..69cacdc8a 100644 --- a/appium/tests/screenobjects/email.screen.ts +++ b/appium/tests/screenobjects/email.screen.ts @@ -16,6 +16,7 @@ const SELECTORS = { RECIPIENTS_BCC_LABEL: '~bccLabel0', MENU_BUTTON: '~aid-message-menu-button', FORWARD_BUTTON: '~Forward', + REPLY_ALL_BUTTON: '~Reply all', DELETE_BUTTON: '~Delete', DOWNLOAD_BUTTON: '~Download', CANCEL_BUTTON: '~Cancel', @@ -84,6 +85,10 @@ class EmailScreen extends BaseScreen { return $(SELECTORS.FORWARD_BUTTON); } + get replyAllButton() { + return $(SELECTORS.REPLY_ALL_BUTTON); + } + get deleteButton() { return $(SELECTORS.DELETE_BUTTON) } @@ -181,6 +186,10 @@ class EmailScreen extends BaseScreen { await ElementHelper.waitAndClick(await this.forwardButton); } + clickReplyAllButton = async () => { + await ElementHelper.waitAndClick(await this.replyAllButton); + } + clickDeleteButton = async () => { await ElementHelper.waitAndClick(await this.deleteButton); } diff --git a/appium/tests/screenobjects/new-message.screen.ts b/appium/tests/screenobjects/new-message.screen.ts index 5c5fdea20..f0f07d6f0 100644 --- a/appium/tests/screenobjects/new-message.screen.ts +++ b/appium/tests/screenobjects/new-message.screen.ts @@ -5,11 +5,7 @@ const SELECTORS = { ADD_RECIPIENT_FIELD: '~aid-recipient-text-field', SUBJECT_FIELD: '~subjectTextField', COMPOSE_SECURITY_MESSAGE: '~messageTextView', - RECIPIENTS_LIST: '~recipientsList', - ADDED_RECIPIENT: '-ios class chain:**/XCUIElementTypeWindow[1]/XCUIElementTypeOther/XCUIElementTypeOther' + - '/XCUIElementTypeOther/XCUIElementTypeOther[1]/XCUIElementTypeOther/XCUIElementTypeTable' + - '/XCUIElementTypeCell[1]/XCUIElementTypeOther/XCUIElementTypeCollectionView/XCUIElementTypeCell' + - '/XCUIElementTypeOther/XCUIElementTypeOther/XCUIElementTypeStaticText', //it works only with this selector + RECIPIENTS_LIST: '~aid-recipients-list', PASSWORD_CELL: '~aid-message-password-cell', ATTACHMENT_CELL: '~aid-attachment-cell-0', ATTACHMENT_NAME_LABEL: '~aid-attachment-title-label-0', @@ -45,10 +41,6 @@ class NewMessageScreen extends BaseScreen { return $(SELECTORS.RECIPIENTS_LIST); } - get addedRecipientEmail() { - return $(SELECTORS.ADDED_RECIPIENT); - } - get attachmentCell() { return $(SELECTORS.ATTACHMENT_CELL); } @@ -126,17 +118,13 @@ class NewMessageScreen extends BaseScreen { await ElementHelper.waitAndClick(await $(`~${email}`)); }; - checkFilledComposeEmailInfo = async (recipient: string, subject: string, message: string, attachmentName?: string) => { + checkFilledComposeEmailInfo = async (recipients: string[], subject: string, message: string, attachmentName?: string) => { expect(this.composeSecurityMessage).toHaveTextContaining(message); const element = await this.filledSubject(subject); await element.waitForDisplayed(); - if (recipient.length === 0) { - await this.checkEmptyRecipientsList(); - } else { - await this.checkAddedRecipient(recipient); - } + await this.checkRecipientsList(recipients); if (attachmentName !== undefined) { await this.checkAddedAttachment(attachmentName); @@ -147,26 +135,30 @@ class NewMessageScreen extends BaseScreen { await ElementHelper.waitElementInvisible(await this.addRecipientField); } - checkEmptyRecipientsList = async () => { - const list = await this.recipientsList; - const listText = await list.getText(); - expect(listText.length).toEqual(0); + checkRecipientsList = async(recipients: string[]) => { + if (recipients.length === 0) { + await ElementHelper.waitElementInvisible(await $(`~aid-to-0-label`)); + } else { + for (const [index, recipient] of recipients.entries()) { + await this.checkAddedRecipient(recipient, index); + } + } } - checkAddedRecipient = async (recipient: string) => { - const addedRecipientEl = await this.addedRecipientEmail; - const value = await addedRecipientEl.getValue(); - expect(value).toEqual(` ${recipient} `); + checkAddedRecipient = async (recipient: string, order = 0) => { + const recipientCell = await $(`~aid-to-${order}-label`); + const name = await recipientCell.getValue(); + expect(name).toEqual(` ${recipient} `); } checkAddedRecipientColor = async (recipient: string, order: number, color: string) => { const addedRecipientEl = await $(`~aid-to-${order}-${color}`); - const name = await addedRecipientEl.getValue(); - expect(name).toEqual(` ${recipient} `); + await ElementHelper.waitElementVisible(addedRecipientEl); + await this.checkAddedRecipient(recipient, order); } - deleteAddedRecipient = async (order: number, color: string) => { - const addedRecipientEl = await $(`~aid-to-${order}-${color}`); + deleteAddedRecipient = async (order: number) => { + const addedRecipientEl = await $(`~aid-to-${order}-label`); await ElementHelper.waitAndClick(addedRecipientEl); await driver.sendKeys(['\b']); // backspace } diff --git a/appium/tests/specs/live/composeEmail/CheckComposeEmailAfterReopening.spec.ts b/appium/tests/specs/live/composeEmail/CheckComposeEmailAfterReopening.spec.ts index 5ea5b72bc..c1c67ffaf 100644 --- a/appium/tests/specs/live/composeEmail/CheckComposeEmailAfterReopening.spec.ts +++ b/appium/tests/specs/live/composeEmail/CheckComposeEmailAfterReopening.spec.ts @@ -28,10 +28,10 @@ describe('COMPOSE EMAIL: ', () => { await MailFolderScreen.checkInboxScreen(); await MailFolderScreen.clickCreateEmail(); await NewMessageScreen.composeEmail(recipientEmail, emailSubject, emailText); - await NewMessageScreen.checkFilledComposeEmailInfo(recipientEmail, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([recipientEmail], emailSubject, emailText); await driver.background(3); - await NewMessageScreen.checkFilledComposeEmailInfo(recipientEmail, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([recipientEmail], emailSubject, emailText); }); }); diff --git a/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithExpiredAndRevokedPublicKeys.spec.ts b/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithExpiredAndRevokedPublicKeys.spec.ts index d1a869753..6e074f793 100644 --- a/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithExpiredAndRevokedPublicKeys.spec.ts +++ b/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithExpiredAndRevokedPublicKeys.spec.ts @@ -26,7 +26,7 @@ describe('COMPOSE EMAIL: ', () => { await MailFolderScreen.clickCreateEmail(); await NewMessageScreen.composeEmail(expiredPublicKey, emailSubject, emailText); - await NewMessageScreen.checkFilledComposeEmailInfo(expiredPublicKey, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([expiredPublicKey], emailSubject, emailText); await NewMessageScreen.clickSendButton(); await BaseScreen.checkModalMessage(expiredPublicKeyError); @@ -37,7 +37,7 @@ describe('COMPOSE EMAIL: ', () => { await MailFolderScreen.clickCreateEmail(); await NewMessageScreen.composeEmail(revokedpublicKey, emailSubject, emailText); - await NewMessageScreen.checkFilledComposeEmailInfo(revokedpublicKey, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([revokedpublicKey], emailSubject, emailText); await NewMessageScreen.clickSendButton(); await BaseScreen.checkModalMessage(revokedPublicKeyError); diff --git a/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithoutPublicKey.spec.ts b/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithoutPublicKey.spec.ts index cff6052bb..a8d61572e 100644 --- a/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithoutPublicKey.spec.ts +++ b/appium/tests/specs/live/composeEmail/SendEmailToRecipientWithoutPublicKey.spec.ts @@ -29,13 +29,13 @@ describe('COMPOSE EMAIL: ', () => { await MailFolderScreen.clickCreateEmail(); await NewMessageScreen.composeEmail(recipient, emailSubject, emailText); - await NewMessageScreen.checkFilledComposeEmailInfo(recipient, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([recipient], emailSubject, emailText); await NewMessageScreen.clickSendButton(); await BaseScreen.checkModalMessage(passwordModalMessage); await NewMessageScreen.clickCancelButton(); await NewMessageScreen.checkPasswordCell(emptyPasswordMessage); - await NewMessageScreen.deleteAddedRecipient(0, 'gray'); + await NewMessageScreen.deleteAddedRecipient(0); await NewMessageScreen.setAddRecipient(recipient); await NewMessageScreen.clickSendButton(); diff --git a/appium/tests/specs/live/composeEmail/SendEncryptedEmailAfterPassPhraseSessionEndedAndTrashIt.spec.ts b/appium/tests/specs/live/composeEmail/SendEncryptedEmailAfterPassPhraseSessionEndedAndTrashIt.spec.ts index eda7bd8a6..711ac69a6 100644 --- a/appium/tests/specs/live/composeEmail/SendEncryptedEmailAfterPassPhraseSessionEndedAndTrashIt.spec.ts +++ b/appium/tests/specs/live/composeEmail/SendEncryptedEmailAfterPassPhraseSessionEndedAndTrashIt.spec.ts @@ -35,7 +35,7 @@ describe('COMPOSE EMAIL: ', () => { await MailFolderScreen.checkInboxScreen(); await MailFolderScreen.clickCreateEmail(); await NewMessageScreen.composeEmail(contactEmail, emailSubject, emailText); - await NewMessageScreen.checkFilledComposeEmailInfo(contactEmail, emailSubject, emailText); + await NewMessageScreen.checkFilledComposeEmailInfo([contactEmail], emailSubject, emailText); //Set wrong pass phrase and check error await NewMessageScreen.clickSendButton(); await EmailScreen.enterPassPhrase(wrongPassPhrase); diff --git a/appium/tests/specs/live/inbox/CheckReplyAndForwardForEncryptedEmail.spec.ts b/appium/tests/specs/live/inbox/CheckReplyAndForwardForEncryptedEmail.spec.ts index 47db15a79..7ce1bdaac 100644 --- a/appium/tests/specs/live/inbox/CheckReplyAndForwardForEncryptedEmail.spec.ts +++ b/appium/tests/specs/live/inbox/CheckReplyAndForwardForEncryptedEmail.spec.ts @@ -13,10 +13,11 @@ describe('INBOX: ', () => { it('user is able to reply or forward email and check info from composed email', async () => { - const senderEmail = CommonData.sender.email; - const emailSubject = CommonData.encryptedEmailWithAttachment.subject; - const emailText = CommonData.encryptedEmailWithAttachment.message; - const encryptedAttachmentName = CommonData.encryptedEmailWithAttachment.encryptedAttachmentName; + const senderEmail = CommonData.emailWithMultipleRecipients.sender; + const recipientEmail = CommonData.emailWithMultipleRecipients.recipient; + const emailSubject = CommonData.emailWithMultipleRecipients.subject; + const emailText = CommonData.emailWithMultipleRecipients.message; + const encryptedAttachmentName = CommonData.emailWithMultipleRecipients.encryptedAttachmentName; const replySubject = `Re: ${emailSubject}`; const forwardSubject = `Fwd: ${emailSubject}`; @@ -30,13 +31,21 @@ describe('INBOX: ', () => { await SearchScreen.searchAndClickEmailBySubject(emailSubject); await EmailScreen.checkOpenedEmail(senderEmail, emailSubject, emailText); + // check reply message await EmailScreen.clickReplyButton(); - await NewMessageScreen.checkFilledComposeEmailInfo(senderEmail, replySubject, quoteText); + await NewMessageScreen.checkFilledComposeEmailInfo([senderEmail], replySubject, quoteText); + await NewMessageScreen.clickBackButton(); + // check reply all message + await EmailScreen.clickMenuButton(); + await EmailScreen.clickReplyAllButton(); + await NewMessageScreen.checkFilledComposeEmailInfo([recipientEmail, senderEmail], replySubject, quoteText); await NewMessageScreen.clickBackButton(); + + // check forwarded message await EmailScreen.clickMenuButton(); await EmailScreen.clickForwardButton(); - await NewMessageScreen.checkFilledComposeEmailInfo("", forwardSubject, quoteText, encryptedAttachmentName); + await NewMessageScreen.checkFilledComposeEmailInfo([], forwardSubject, quoteText, encryptedAttachmentName); await NewMessageScreen.deleteAttachment(); }); }); diff --git a/appium/tests/specs/mock/setup/UpdateOlderPubKeyToNewer.spec.ts b/appium/tests/specs/mock/setup/UpdateOlderPubKeyToNewer.spec.ts index a788a19af..49c50e580 100644 --- a/appium/tests/specs/mock/setup/UpdateOlderPubKeyToNewer.spec.ts +++ b/appium/tests/specs/mock/setup/UpdateOlderPubKeyToNewer.spec.ts @@ -45,7 +45,7 @@ describe('SETUP: ', () => { await SetupKeyScreen.setPassPhrase(); await PublicKeyHelper.loadRecipientInComposeThenCheckSignatureAndFingerprints(userEmail, oldSignatureDate, oldFingerprintsValue); - firstFetchedDate = await DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); + firstFetchedDate = DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); await PublicKeyDetailsScreen.clickBackButton(); await ContactPublicKeyScreen.checkPgpUserId(userEmail); @@ -65,9 +65,9 @@ describe('SETUP: ', () => { }; await PublicKeyHelper.loadRecipientInComposeThenCheckSignatureAndFingerprints(userEmail, newSignatureDate, newFingerprintsValue); - secondFetchedDate = await DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); + secondFetchedDate = DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); - await expect(firstFetchedDate).toBeLessThan(secondFetchedDate); + expect(firstFetchedDate).toBeLessThan(secondFetchedDate); await PublicKeyDetailsScreen.clickBackButton(); await ContactPublicKeyScreen.checkPgpUserId(userEmail); @@ -87,8 +87,8 @@ describe('SETUP: ', () => { }; await PublicKeyHelper.loadRecipientInComposeThenCheckSignatureAndFingerprints(userEmail, newSignatureDate, newFingerprintsValue); - thirdFetchedDate = await DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); - await expect(secondFetchedDate).toBeLessThan(thirdFetchedDate); + thirdFetchedDate = DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); + expect(secondFetchedDate).toBeLessThan(thirdFetchedDate); //stage 4 await PublicKeyDetailsScreen.clickBackButton(); await ContactPublicKeyScreen.checkPgpUserId(userEmail); @@ -104,9 +104,9 @@ describe('SETUP: ', () => { await PublicKeyHelper.loadRecipientInComposeThenCheckSignatureAndFingerprints(userEmail, oldSignatureDate, oldFingerprintsValue); - fourthFetchedDate = await DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); + fourthFetchedDate = DataHelper.convertDateToMSec(await PublicKeyDetailsScreen.getLastFetchedDateValue()); - await expect(thirdFetchedDate).toBeLessThan(fourthFetchedDate); + expect(thirdFetchedDate).toBeLessThan(fourthFetchedDate); }); }); });