renamed clickSentButton to clickSendButton, updated test after change…#1060
renamed clickSentButton to clickSendButton, updated test after change…#1060
Conversation
…s, added fixes for checkEmail in message
tomholub
left a comment
There was a problem hiding this comment.
Thank you - see comment.
|
|
||
| checkEmailAddress = async (email: string) => { | ||
| const selector = `~${email}`; | ||
| const selector = `-ios class chain:**/XCUIElementTypeStaticText[\`label == "${email}"\`]`; |
There was a problem hiding this comment.
Whenever you see yourself using this kind of complicated selector, please add accessibility identifier instead, and query by that.
| checkEmailAddress = async (email: string) => { | ||
| const selector = `-ios class chain:**/XCUIElementTypeStaticText[\`label == "${email}"\`]`; | ||
| const selector = `~${email}`; | ||
| await (await $(selector)).waitForDisplayed(); |
There was a problem hiding this comment.
What I meant is, an accessibility identifier should be added to the sender element on message screen in Swift. Then query here by that identifier.
There was a problem hiding this comment.
eg
Error: element ("~e2e.enterprise.test@flowcrypt.com") still not displayed after 15000ms
at async EmailScreen.checkEmailAddress (/Users/tom/git/flowcrypt-ios/appium/tests/screenobjects/email.screen.ts:56:5)
at async EmailScreen.checkOpenedEmail (/Users/tom/git/flowcrypt-ios/appium/tests/screenobjects/email.screen.ts:71:5)
at async UserContext.<anonymous> (/Users/tom/git/flowcrypt-ios/appium/tests/specs/composeEmail/SendEncryptedEmailAfterPassPhraseSessionEndedAndTrashIt.spec.ts:57:5)
When in fact I see it on screen. By using accessibility identifiers instead, we remove uncertainty.
There was a problem hiding this comment.
added senderEmail accessibilityId
|
@tomholub it is failed because we didn't push new accessibilityId in master |
| senderNode.accessibilityIdentifier = "date" | ||
|
|
There was a problem hiding this comment.
here you meant dateNode.
There was a problem hiding this comment.
no,
senderNode.accessibilityIdentifier = "senderEmail"
There was a problem hiding this comment.
Please carefully re-read the code I quoted.
There was a problem hiding this comment.
yes, sorry, fixed already,
will push
Can you be more specific - which PR needs to be merged for this to pass? |
|
@tomholub we need to merge this selector |
We don't. Appium tests are not testing master (hopefully!!), they are testing the code in this PR. If you just changed an accessibility identifier, it must be directly reflected in tests that run in this PR. |
…s, added fixes for checkEmail in message
This PR contains changes for checking sender email, renamed clickSentButton to clickSendButton
close #1049
Tests
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):