Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
changed method names
Browse files Browse the repository at this point in the history
  • Loading branch information
ggilchrist-ledger committed Apr 25, 2022
1 parent 5220b3a commit 17026e0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion e2e/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export async function verifyTextIsVisible(text) {
export function delay(ms) {
return new Promise(resolve => {
setTimeout(() => {
resolve();
resolve("delay complete");
}, ms);
});
}
Expand Down
12 changes: 6 additions & 6 deletions e2e/models/onboarding/onboardingSteps.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default class OnboardingSteps {
await testHelpers.waitForElement("Onboarding - Start");
}

static async getStarted() {
static async startOnboarding() {
await testHelpers.tap("Onboarding - Start");
}

Expand All @@ -19,11 +19,11 @@ export default class OnboardingSteps {
// await testHelpers.tap("Proceed");
// }

static async selectDevice(device) {
static async selectYourDevice(device) {
await testHelpers.tap(`Onboarding Device - Selection|${device}`);
}

static async connectYourNano() {
static async chooseToConnectYourNano() {
// scroll probably not needed now
// await testHelpers.scrollToElementById(
// `Onboarding - Connect|${device}`,
Expand All @@ -37,20 +37,20 @@ export default class OnboardingSteps {
await testHelpers.tap(`Onboarding - Connect`);
}

static async checkTheContentsOfThisBox() {
static async verifyContentsOfBoxAreChecked() {
// await testHelpers.delay(1000);
await testHelpers.tap("Onboarding - Seed warning");
}

static async letsPairMyNano() {
static async chooseToPairMyNano() {
await testHelpers.tap("Onboarding - Pair New Nano");
}

// static async addNewNano() {
// await testHelpers.tap("Proceed");
// }

static async pairWithBluetooth() {
static async selectPairWithBluetooth() {
await testHelpers.tap("Onboarding - Pair with Bluetooth");
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/models/portfolioPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export default class PortfolioPage {
}

static async emptyPortfolioIsVisible() {
await testHelpers.verifyTextIsVisible("Install an app on my device");
await testHelpers.verifyTextIsVisible("Add asset");
}
}
13 changes: 7 additions & 6 deletions e2e/specs/onboarding.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,19 @@ describe("Onboarding", () => {
it("should be able to connect a Nano X", async () => {
console.log("==============> STARTING ONBOARDING TEST");
await OnboardingSteps.waitForPageToBeVisible();
await OnboardingSteps.getStarted();
await OnboardingSteps.startOnboarding();
// await OnboardingSteps.acceptTerms();
await OnboardingSteps.chooseToSetupLedger();
await OnboardingSteps.selectDevice("nanoX");
await OnboardingSteps.connectYourNano();
await OnboardingSteps.checkTheContentsOfThisBox();
await OnboardingSteps.letsPairMyNano();
await OnboardingSteps.selectYourDevice("nanoX");
await OnboardingSteps.chooseToConnectYourNano();
await OnboardingSteps.verifyContentsOfBoxAreChecked();
await OnboardingSteps.chooseToPairMyNano();
// await OnboardingSteps.addNewNano();
await OnboardingSteps.pairWithBluetooth();
await OnboardingSteps.selectPairWithBluetooth();
await OnboardingSteps.addDeviceViaBluetooth();
await OnboardingSteps.openLedgerLive();

await PortfolioPage.waitForPageToBeVisible();
await PortfolioPage.emptyPortfolioIsVisible();

// const image = await device.takeScreenshot("nanoX-onboarding-snapshot");
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Portfolio/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function PortfolioHeader({
</Box>
)}
<Box>
<Touchable onPress={onSettingsButtonPress}>
<Touchable onPress={onSettingsButtonPress} testID="settings-icon">
<SettingsMedium size={24} color={"neutral.c100"} />
</Touchable>
</Box>
Expand Down

0 comments on commit 17026e0

Please sign in to comment.