Skip to content
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

Merged
merged 11 commits into from
Nov 23, 2019
Merged

Detox: Fix Android e2e Tests #1215

merged 11 commits into from
Nov 23, 2019

Conversation

ibrahimtaveras00
Copy link
Contributor

@ibrahimtaveras00 ibrahimtaveras00 commented Nov 19, 2019

This PR fixes e2e tests to work on Android

Screen Shot 2019-11-22 at 6 59 14 PM

Android now has 100% parity in test coverage compared to iOS

Screen Shot 2019-11-22 at 6 57 35 PM

(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

@ibrahimtaveras00 ibrahimtaveras00 added android Android specific issue detox labels Nov 19, 2019
@ibrahimtaveras00 ibrahimtaveras00 added this to the v1 milestone Nov 19, 2019
@ibrahimtaveras00 ibrahimtaveras00 self-assigned this Nov 19, 2019
@ibrahimtaveras00 ibrahimtaveras00 changed the title [WIP] Detox: Fix Android e2e Tests Detox: Fix Android e2e Tests Nov 23, 2019
Copy link
Contributor

@brunobar79 brunobar79 left a 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'}>
Copy link
Contributor

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'}>
Copy link
Contributor

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'}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂

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';
Copy link
Contributor

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) {
Copy link
Contributor

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') {
Copy link
Contributor

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') {
Copy link
Contributor

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') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@ibrahimtaveras00 ibrahimtaveras00 merged commit ba14985 into develop Nov 23, 2019
@ibrahimtaveras00 ibrahimtaveras00 deleted the fix-android-e2e branch November 23, 2019 06:55
rickycodes pushed a commit that referenced this pull request Jan 31, 2022
* 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android Android specific issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants