-
Notifications
You must be signed in to change notification settings - Fork 11
added fixes for check attachment spec #1217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,9 @@ import BaseScreen from './base.screen'; | |
| import ElementHelper from "../helpers/ElementHelper"; | ||
|
|
||
| const SELECTORS = { | ||
| BACK_BTN: '~arrow left c' | ||
| BACK_BTN: '~arrow left c', | ||
| SAVE_BTN: '-ios class chain:**/XCUIElementTypeButton[`label == "Save"`]', | ||
| CANCEL_BTN: '~Cancel', | ||
| }; | ||
|
|
||
| class AttachmentScreen extends BaseScreen { | ||
|
|
@@ -14,15 +16,38 @@ class AttachmentScreen extends BaseScreen { | |
| return $(SELECTORS.BACK_BTN); | ||
| } | ||
|
|
||
| get saveButton() { | ||
| return $(SELECTORS.SAVE_BTN); | ||
| } | ||
|
|
||
| get cancelButton() { | ||
| return $(SELECTORS.CANCEL_BTN) | ||
| } | ||
|
|
||
| checkDownloadPopUp = async (name: string) => { | ||
| await (await this.backButton).waitForDisplayed(); | ||
| await (await this.cancelButton).waitForDisplayed(); | ||
| const attachment = `-ios class chain:**/XCUIElementTypeNavigationBar[\`name == "com_apple_DocumentManager_Service.DOCServiceTargetSelectionBrowserView"\`]/XCUIElementTypeButton/XCUIElementTypeStaticText`;//it works only with this selector | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need accessibility id |
||
| expect(await $(attachment)).toHaveAttribute('value', `${name}`); | ||
| } | ||
|
|
||
| clickBackButton = async () => { | ||
| await ElementHelper.waitAndClick(await this.backButton); | ||
| } | ||
|
|
||
| clickCancelButton = async () => { | ||
| await ElementHelper.waitAndClick(await this.cancelButton); | ||
| } | ||
|
|
||
| checkAttachment = async (name: string) => { | ||
| await (await this.backButton).waitForDisplayed(); | ||
| const attachmentHeader = `-ios class chain:**/XCUIElementTypeNavigationBar[\`name == "${name}"\`]`; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| expect(await $(attachmentHeader)).toBeDisplayed(); | ||
| await (await this.saveButton).waitForDisplayed(); | ||
| } | ||
|
|
||
| clickSaveButton = async () => { | ||
| await ElementHelper.waitAndClick(await this.saveButton); | ||
| } | ||
| } | ||
|
|
||
| export default new AttachmentScreen(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ const SELECTORS = { | |
| OK_BUTTON: '~Ok', | ||
| WRONG_PASS_PHRASE_MESSAGE: '-ios class chain:**/XCUIElementTypeStaticText[`label == "Wrong pass phrase, please try again"`]', | ||
| ATTACHMENT_CELL: '~attachmentCell0', | ||
| ATTACHMENT_TITLE: 'attachmentTitleLabel0', | ||
| ATTACHMENT_TITLE: '~attachmentTitleLabel0', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. aid-attachment-title-label-0 |
||
| REPLY_BUTTON: '~replyButton', | ||
| RECIPIENTS_BUTTON: '~messageRecipientButton', | ||
|
Comment on lines
12
to
13
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| RECIPIENTS_TO_LABEL: '~toLabel0', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll file issue to add accessibility ids to these three,
aid-back-icon,aid-save-attachment-to-deviceandaid-cancel-saving-attachment