-
-
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.
- Loading branch information
1 parent
c3642ca
commit 63aab3f
Showing
2 changed files
with
40 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,36 @@ | ||
import TestHelpers from '../helpers'; | ||
import Gestures from '../utils/Gestures'; | ||
import Matchers from '../utils/Matchers'; | ||
|
||
import { | ||
ENABLE_DEVICE_NOTIFICATIONS_CONTAINER_ID, | ||
ENABLE_DEVICE_NOTIFICATIONS_NO_THANKS_BUTTON_ID, | ||
ENABLE_DEVICE_NOTIFICATIONS_YES_BUTTON_ID | ||
} from '../../wdio/screen-objects/testIDs/Screens/EnableDeviceNotificationsChecksAlert.testIds'; | ||
|
||
export default class EnableDeviceNotificationsAlert { | ||
static async tapNoThanks() { | ||
await TestHelpers.waitAndTapByLabel( | ||
ENABLE_DEVICE_NOTIFICATIONS_NO_THANKS_BUTTON_ID | ||
); | ||
class EnableDeviceNotificationsAlert { | ||
get stepOneContainer() { | ||
return Matchers.getSystemElementByText(ENABLE_DEVICE_NOTIFICATIONS_CONTAINER_ID); | ||
} | ||
|
||
static async tapYes() { | ||
await TestHelpers.waitAndTapByLabel( | ||
get getEnableDeviceNotificationsButton() { | ||
return Matchers.getSystemElementByText( | ||
ENABLE_DEVICE_NOTIFICATIONS_YES_BUTTON_ID, | ||
); | ||
} | ||
|
||
static async isVisible() { | ||
await TestHelpers.checkIfElementWithTextIsVisible( | ||
ENABLE_DEVICE_NOTIFICATIONS_CONTAINER_ID, | ||
get getNotEnableDeviceNotificationsButton() { | ||
return Matchers.getSystemElementByText( | ||
ENABLE_DEVICE_NOTIFICATIONS_NO_THANKS_BUTTON_ID, | ||
); | ||
} | ||
|
||
async tapOnEnableDeviceNotificationsButton() { | ||
await Gestures.waitAndTap(this.getEnableDeviceNotificationsButton); | ||
} | ||
|
||
async tapOnNotEnableDeviceNotificationsButton() { | ||
await Gestures.waitAndTap(this.getNotEnableDeviceNotificationsButton); | ||
} | ||
} | ||
|
||
export default new EnableDeviceNotificationsAlert(); |
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