Skip to content
This repository has been archived by the owner on Nov 10, 2020. It is now read-only.

Commit

Permalink
all good to go
Browse files Browse the repository at this point in the history
  • Loading branch information
birkir committed Mar 8, 2019
1 parent 7f37c22 commit 1315eea
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 13 deletions.
3 changes: 2 additions & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ android {

dependencies {
implementation "com.facebook.react:react-native:+"
implementation 'com.android.support:design:27.1.1'

implementation fileTree(dir: "libs", include: ["*.jar"])

Expand All @@ -125,6 +124,8 @@ dependencies {
transitive = false
}

implementation 'com.android.support:design:27.1.1'

androidTestImplementation project(path: ":detox")
androidTestImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
Expand Down
22 changes: 15 additions & 7 deletions e2e/CounterScreen.test.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
function formatLabel(label) {
const platform = device.getPlatform();
if (platform === 'android') {
return label.toLocaleUpperCase();
}
return label;
}

describe('CounterScreen', () => {
beforeAll(async () => {
await device.relaunchApp();
});

it('should show counter screen', async () => {
await expect(element(by.id('HOME_SCREEN'))).toBeVisible();
await element(by.label('Counter Screen')).tap();
await element(by.text(formatLabel('Counter Screen'))).tap();
await expect(element(by.id('COUNTER_SCREEN'))).toBeVisible();
});

it('should increment counter', async () => {
await expect(element(by.label('Counter: 0'))).toBeVisible();
await element(by.label('Increment')).tap();
await expect(element(by.label('Counter: 1'))).toBeVisible();
await element(by.label('Decrement')).tap();
await element(by.label('Decrement')).tap();
await expect(element(by.label('Counter: -1'))).toBeVisible();
await expect(element(by.text('Counter: 0'))).toBeVisible();
await element(by.text(formatLabel('Increment'))).tap();
await expect(element(by.text('Counter: 1'))).toBeVisible();
await element(by.text(formatLabel('Decrement'))).tap();
await element(by.text(formatLabel('Decrement'))).tap();
await expect(element(by.text('Counter: -1'))).toBeVisible();
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
},
"dependencies": {
"@react-native-community/async-storage": "1.1.0",
"jsc-android": "236355.1.1",
"jsc-android": "241213.0.0",
"lodash": "4.17.11",
"mobx": "5.9.0",
"mobx-devtools-mst": "0.9.18",
Expand Down
34 changes: 34 additions & 0 deletions patches/detox+10.0.12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/node_modules/detox/android/detox/build.gradle b/node_modules/detox/android/detox/build.gradle
index 53ad2fa..350b065 100644
--- a/node_modules/detox/android/detox/build.gradle
+++ b/node_modules/detox/android/detox/build.gradle
@@ -22,10 +22,6 @@ android {

productFlavors {
flavorDimensions "minReactNative"
- minReactNative44 {
- dimension "minReactNative"
-
- }
minReactNative46 {
dimension "minReactNative"
}
@@ -69,9 +65,6 @@ android {
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$_kotlinVersion"

- minReactNative44Implementation 'com.squareup.okhttp3:okhttp:3.4.1'
- minReactNative44Implementation 'com.squareup.okhttp3:okhttp-ws:3.4.1'
-
minReactNative46Implementation 'com.squareup.okhttp3:okhttp:3.6.0'
minReactNative46Implementation 'com.squareup.okio:okio:1.13.0'

@@ -82,7 +75,7 @@ dependencies {
implementation 'com.android.support.test:rules:1.0.2'

// noinspection GradleDynamicVersion
- compileOnly "com.facebook.react:react-native:+"
+ api "com.facebook.react:react-native:+"

implementation 'org.apache.commons:commons-lang3:3.4'
implementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
17 changes: 17 additions & 0 deletions patches/react-native-navigation+2.13.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/node_modules/react-native-navigation/lib/android/app/build.gradle b/node_modules/react-native-navigation/lib/android/app/build.gradle
index 2e6c70a..39de2ce 100644
--- a/node_modules/react-native-navigation/lib/android/app/build.gradle
+++ b/node_modules/react-native-navigation/lib/android/app/build.gradle
@@ -83,9 +83,9 @@ allprojects { p ->

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
- implementation 'com.android.support:design:26.1.0'
- implementation 'com.android.support:appcompat-v7:26.1.0'
- implementation 'com.android.support:support-v4:26.1.0'
+ implementation 'com.android.support:design:27.1.1'
+ implementation 'com.android.support:appcompat-v7:27.1.1'
+ implementation 'com.android.support:support-v4:27.1.1'

implementation 'com.github.wix-playground:ahbottomnavigation:2.4.9'
implementation 'com.github.wix-playground:reflow-animator:1.0.4'
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5800,10 +5800,10 @@ jsbn@~0.1.0:
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=

jsc-android@236355.1.1:
version "236355.1.1"
resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-236355.1.1.tgz#43e153b722e3c60dd0595be4e7430baf65e67c9c"
integrity sha512-2py4f0McZIl/oH6AzPj1Ebutc58fyeLvwq6gyVYp1RsWr4qeLNHAPfW3kmfeVMz44oUBJMQ0lECZg9n4KBhHbQ==
jsc-android@241213.0.0:
version "241213.0.0"
resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-241213.0.0.tgz#e41dd68ca48ecf6cb8cd75d3ed14a79cde259a26"
integrity sha512-rqc+FUOfXT1XNFI59J+7ByCvdKqw+0QCLm7fOJifbCxRV+UYjkFUMDHMfvEMSLaJhKMlhOwNAy8k9gyT+o60dg==

jsdom@^11.5.1:
version "11.11.0"
Expand Down

0 comments on commit 1315eea

Please sign in to comment.