-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Detox: Fix Android e2e Tests #1215
Conversation
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.
This is amazing. Good stuff dude.
Added some minor comments but 🔥 🔥 🔥
@@ -594,7 +594,7 @@ export function getWalletNavbarOptions(title, navigation) { | |||
return { | |||
headerTitle: <NavbarTitle title={title} />, | |||
headerLeft: ( | |||
<TouchableOpacity onPress={openDrawer} style={styles.backButton}> | |||
<TouchableOpacity onPress={openDrawer} style={styles.backButton} testID={'hamburger-menu-button-wallet'}> |
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.
break it down
@@ -348,7 +348,7 @@ export function getBrowserViewNavbarOptions(navigation) { | |||
|
|||
return { | |||
headerLeft: ( | |||
<TouchableOpacity onPress={onPress} style={styles.backButton}> | |||
<TouchableOpacity onPress={onPress} style={styles.backButton} testID={'hamburger-menu-button-browser'}> |
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.
break it down
<TouchableWithoutFeedback | ||
style={styles.hamburger} | ||
onPress={this.onNext} | ||
testID={'hamburger-menu-button-wallet-fake-af'} |
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.
😂
e2e/dapp-initiated-txn.spec.js
Outdated
const Correct_Seed_Words = 'fold media south add since false relax immense pause cloth just raven'; | ||
const Correct_Password = `12345678`; | ||
const CORRECT_SEED_WORDS = 'fold media south add since false relax immense pause cloth just raven'; | ||
const CORRECT_PASSWORD = `12345678`; | ||
const Ropsten = 'Ropsten Test Network'; |
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.
Since you fixed the other two, make all these const uppercase
e2e/helpers.js
Outdated
.tap(); | ||
} | ||
|
||
static tapAtPoint(elementId, point) { | ||
return element(by.id(elementId)).tapAtPoint(point); | ||
} | ||
|
||
static tapFirstItem(elementID, index) { |
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.
You should rename this function to tapItemAtIndex
e2e/helpers.js
Outdated
} else { | ||
await TestHelpers.tap(elementId); | ||
} | ||
// if (device.getPlatform() === 'android') { |
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.
remove the comments
e2e/helpers.js
Outdated
if (device.getPlatform() === 'android') { | ||
return TestHelpers.typeText(elementId, text); | ||
} | ||
// if (device.getPlatform() === 'android') { |
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.
same
e2e/helpers.js
Outdated
} | ||
await TestHelpers.typeText(elementId, text + '\n'); | ||
// if (device.getPlatform() === 'android') { |
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.
same
* import wallet flow working * fix start exploring * making android great again * fixed wallet tests to work on android * fix warning on iOS sim that causes test to fail * made dapp-initiated-txn file work on droid * Android is great again * code review updates and added dapp contract deployment and approve tests
This PR fixes e2e tests to work on Android
Android now has 100% parity in test coverage compared to iOS
(Android on left... iOS on right)
I also added a test for the Dapp contract deployment & approve transactions (seen here = http://recordit.co/YCuLV8UjrZ) as an addition to the dapp-initiated-txn.spec.js file