-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor sendlinkviewjs and tokenoverviewjs page objects
- Loading branch information
1 parent
9f72156
commit e660c12
Showing
16 changed files
with
166 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,42 @@ | ||
import TestHelpers from '../helpers'; | ||
import Matchers from '../utils/Matchers'; | ||
import Gestures from '../utils/Gestures'; | ||
import { SendLinkViewSelectorsIDs } from '../selectors/SendLinkView.selectors'; | ||
|
||
export default class SendLinkView { | ||
static async tapQRCodeButton() { | ||
if (device.getPlatform() === 'android') { | ||
await TestHelpers.waitAndTapByLabel( | ||
SendLinkViewSelectorsIDs.QR_CODE_BUTTON, | ||
); | ||
} else { | ||
await TestHelpers.tap(SendLinkViewSelectorsIDs.QR_CODE_BUTTON); | ||
} | ||
class SendLinkView { | ||
get container() { | ||
return Matchers.getElementByID(SendLinkViewSelectorsIDs.CONTAINER_ID); | ||
} | ||
|
||
static async isVisible() { | ||
await TestHelpers.checkIfVisible(SendLinkViewSelectorsIDs.CONTAINER_ID); | ||
get qrModal() { | ||
return Matchers.getElementByID(SendLinkViewSelectorsIDs.QR_MODAL); | ||
} | ||
|
||
static async isNotVisible() { | ||
await TestHelpers.checkIfNotVisible(SendLinkViewSelectorsIDs.CONTAINER_ID); | ||
get qrCloseButton() { | ||
return Matchers.getElementByID(SendLinkViewSelectorsIDs.CLOSE_QR_MODAL_BUTTON); | ||
} | ||
static async tapCloseSendLinkButton() { | ||
await TestHelpers.tap(SendLinkViewSelectorsIDs.CLOSE_SEND_LINK_VIEW_BUTTON); | ||
|
||
get closeSendLinkButton() { | ||
return Matchers.getElementByID(SendLinkViewSelectorsIDs.CLOSE_SEND_LINK_VIEW_BUTTON); | ||
} | ||
|
||
// QR Modal | ||
static async tapQRCodeCloseButton() { | ||
await TestHelpers.tap(SendLinkViewSelectorsIDs.CLOSE_QR_MODAL_BUTTON); | ||
get qrCodeButton() { | ||
return device.getPlatform() === 'android' | ||
? Matchers.getElementByLabel(SendLinkViewSelectorsIDs.QR_CODE_BUTTON) | ||
: Matchers.getElementByID(SendLinkViewSelectorsIDs.QR_CODE_BUTTON); | ||
} | ||
|
||
async tapQRCodeButton() { | ||
await Gestures.waitAndTap(this.qrCodeButton); | ||
} | ||
|
||
static async isQRModalVisible() { | ||
await TestHelpers.checkIfVisible(SendLinkViewSelectorsIDs.QR_MODAL); | ||
async tapCloseSendLinkButton() { | ||
await Gestures.waitAndTap(this.closeSendLinkButton); | ||
} | ||
|
||
// QR Modal | ||
async tapQRCodeCloseButton() { | ||
await Gestures.waitAndTap(this.qrCloseButton); | ||
} | ||
} | ||
|
||
export default new SendLinkView(); |
Oops, something went wrong.