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
Showing
7 changed files
with
110 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class AddWallets { | ||
get addWalletButton(){ | ||
return driver.$('//android.view.ViewGroup[@resource-id="addWalletOnHaskellShelleyButton"]'); | ||
} | ||
|
||
get addWalletByronButton(){ | ||
return driver.$('//android.view.ViewGroup[@resource-id="addWalletOnByronButton"]'); | ||
} | ||
|
||
get addWalletTestnetButton(){ | ||
return driver.$('//android.view.ViewGroup[@resource-id=""]'); | ||
} | ||
|
||
get isDisplayed() { | ||
driver.setImplicitTimeout(400); | ||
return this.addWalletButton.isDisplayed(); | ||
} | ||
} | ||
|
||
module.exports = new AddWallets(); |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
class Alert { | ||
get title(){ | ||
return driver.$('//android.widget.TextView[@resource-id="android:id/alertTitle"]'); | ||
} | ||
|
||
get message() { | ||
return driver.$('//android.widget.TextView[@resource-id="android:id/message"]'); | ||
} | ||
|
||
get okButton() { | ||
return driver.$('//android.widget.Button[@resource-id="android:id/button1"]'); | ||
} | ||
} | ||
|
||
module.exports = new Alert(); |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { DEFAULT_TIMEOUT } = require('../constants'); | ||
|
||
class AppScreen { | ||
constructor (selector) { | ||
this.selector = selector; | ||
} | ||
|
||
/** | ||
* Wait for the login screen to be visible | ||
* | ||
* @param {boolean} isShown | ||
* @return {boolean} | ||
*/ | ||
waitForIsShown (isShown = true) { | ||
return $(this.selector).waitForDisplayed(DEFAULT_TIMEOUT, !isShown); | ||
} | ||
} | ||
|
||
module.exports = new AppScreen(); |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class ChooseLanguage { | ||
get chooseLanguageButton() { | ||
// return $('~chooseLangButton'); | ||
return driver.$('//android.view.ViewGroup[@resource-id="chooseLangButton"]'); | ||
}; | ||
} | ||
|
||
module.exports = new ChooseLanguage(); |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
class MyWallets { | ||
get pageTitle() { | ||
return driver.$('//android.widget.TextView[@text="My wallets"]'); | ||
} | ||
|
||
get addWalletButton() { | ||
return driver.$('//android.widget.TextView[@text="My wallets"]'); | ||
} | ||
|
||
get addWalletTestnetButton() { | ||
|
||
} | ||
|
||
get addWalletBayronEraButton(){ | ||
|
||
} | ||
|
||
get isDisplayed() { | ||
driver.setImplicitTimeout(500); | ||
return this.pageTitle.isDisplayed(); | ||
} | ||
} | ||
|
||
module.exports = new MyWallets(); |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class PinCode { | ||
getPinKey(pinNumber) { | ||
return driver.$(`//android.view.ViewGroup[@resource-id="pinKey${pinNumber}"]`); | ||
}; | ||
|
||
get backspaceButton() { | ||
return driver.$('//android.view.ViewGroup[@resource-id="pinKey⌫"]'); | ||
} | ||
} | ||
|
||
module.exports = new PinCode(); |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class ToS { | ||
get acceptToSCheckbox() { | ||
// return driver.$('~acceptTosCheckbox'); | ||
return driver.$('//android.view.ViewGroup[@resource-id="acceptTosCheckbox"]'); | ||
} | ||
|
||
get acceptToSButton() { | ||
// return driver.$('~acceptTosButton'); | ||
return driver.$('//android.view.ViewGroup[@resource-id="acceptTosButton"]'); | ||
} | ||
} | ||
|
||
module.exports = new ToS(); |