-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from apptentive/develop
Release 5.5.1
- Loading branch information
Showing
29 changed files
with
398 additions
and
445 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
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,63 @@ | ||
addons: | ||
artifacts: | ||
paths: | ||
- ./sample61/android/captures/* | ||
|
||
jobs: | ||
include: | ||
- stage: e2e | ||
os: osx | ||
language: objective-c | ||
cache: | ||
bundler: true | ||
cocoapods: true | ||
npm: true | ||
pip: true | ||
osx_image: xcode11.2 | ||
before_install: | ||
- gem install cocoapods -v '0.32.1' | ||
install: | ||
- npm install | ||
- cd sample61 | ||
- npm install | ||
- cd ios | ||
- pod install | ||
- cd .. | ||
script: | ||
- npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios | ||
- xcodebuild -workspace ios/sample61.xcworkspace/ -scheme sample61 -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' clean build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
- stage: e2e | ||
os: linux | ||
language: android | ||
dist: trusty | ||
android: | ||
components: | ||
# Project | ||
- tools | ||
- platform-tools | ||
- build-tools-28.0.3 | ||
- android-28 | ||
- extra-google-google_play_services | ||
- extra-google-m2repository | ||
- extra-android-m2repository | ||
|
||
# Emulator | ||
- android-24 | ||
- sys-img-armeabi-v7a-android-24 | ||
licenses: ".+" | ||
before_install: | ||
- nvm install 12 | ||
install: skip | ||
before_script: | ||
- echo no | android create avd --force -n test -t android-24 --abi armeabi-v7a -c 100M | ||
- emulator -avd test -no-window & | ||
- android-wait-for-emulator | ||
- adb shell input keyevent 82 & | ||
script: | ||
- node --version | ||
- cd sample61 | ||
- npm install | ||
- mkdir -p android/app/src/main/assets | ||
- npx react-native bundle --entry-file index.js --platform android --dev false --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | ||
- cd android | ||
- ./gradlew assembleAndroidTest |
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
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="apptentive_distribution">React Native</string> | ||
<string name="apptentive_distribution_version">5.5.0</string> | ||
<string name="apptentive_distribution_version">5.5.1</string> | ||
</resources> |
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
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
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
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
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 |
---|---|---|
@@ -1,16 +1,16 @@ | ||
PODS: | ||
- apptentive-ios (5.2.7) | ||
- apptentive-ios (5.2.14) | ||
|
||
DEPENDENCIES: | ||
- apptentive-ios (= 5.2.7) | ||
- apptentive-ios (= 5.2.14) | ||
|
||
SPEC REPOS: | ||
https://github.com/CocoaPods/Specs.git: | ||
trunk: | ||
- apptentive-ios | ||
|
||
SPEC CHECKSUMS: | ||
apptentive-ios: fc0c29a9599737240b5fe93d10d2a90150fb6b7a | ||
apptentive-ios: 16951b1f9546bbae9165792679f865dc53bbe82f | ||
|
||
PODFILE CHECKSUM: 3b112418f2faa6ed3cde7a7ee73502794a46f47c | ||
PODFILE CHECKSUM: 6054e413be9c8c5ca4dd0d946a9d8e08124d4257 | ||
|
||
COCOAPODS: 1.8.4 | ||
COCOAPODS: 1.9.3 |
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
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,16 @@ | ||
# Sample Setup | ||
|
||
Ensure you have updated `App.js` with your key / signature. | ||
|
||
Generate the bundle: | ||
|
||
```shell | ||
npx react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios | ||
npx react-native bundle --entry-file index.js --platform android --dev false --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ | ||
``` | ||
|
||
Test the UI, adjust the destination name and OS to fit your needs: | ||
|
||
```shell | ||
xcodebuild -workspace ios/sample61.xcworkspace/ -scheme sample61 -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11,OS=13.2.2' clean build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | ||
``` |
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
90 changes: 90 additions & 0 deletions
90
sample61/android/app/src/androidTest/java/com/sample61/ChangeTextBehaviorTest.java
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,90 @@ | ||
package com.sample61; | ||
|
||
import android.view.View; | ||
import android.widget.TextView; | ||
|
||
import org.hamcrest.Matcher; | ||
import org.junit.Before; | ||
import org.junit.Rule; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import androidx.test.espresso.DataInteraction; | ||
import androidx.test.espresso.Root; | ||
import androidx.test.espresso.UiController; | ||
import androidx.test.espresso.ViewAction; | ||
import androidx.test.rule.ActivityTestRule; | ||
import androidx.test.ext.junit.runners.AndroidJUnit4; | ||
|
||
import static androidx.test.espresso.Espresso.onView; | ||
import static androidx.test.espresso.action.ViewActions.clearText; | ||
import static androidx.test.espresso.action.ViewActions.click; | ||
import static androidx.test.espresso.action.ViewActions.typeText; | ||
import static androidx.test.espresso.assertion.ViewAssertions.matches; | ||
import static androidx.test.espresso.matcher.RootMatchers.isDialog; | ||
import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom; | ||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; | ||
import static androidx.test.espresso.matcher.ViewMatchers.withContentDescription; | ||
import static androidx.test.espresso.matcher.ViewMatchers.withId; | ||
import static androidx.test.espresso.matcher.ViewMatchers.withText; | ||
import static org.hamcrest.CoreMatchers.containsString; | ||
import static org.hamcrest.CoreMatchers.endsWith; | ||
import static org.hamcrest.CoreMatchers.not; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class ChangeTextBehaviorTest { | ||
@Rule | ||
public ActivityTestRule<MainActivity> activityRule | ||
= new ActivityTestRule<>(MainActivity.class); | ||
|
||
@Before | ||
public void initValidString() { | ||
// TODO: Replace with idler | ||
try { | ||
Thread.sleep(30000); | ||
} catch (InterruptedException e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public String getText(final Matcher<View> matcher) { | ||
final String[] stringHolder = { null }; | ||
onView(matcher).perform(new ViewAction() { | ||
@Override | ||
public Matcher<View> getConstraints() { | ||
return isAssignableFrom(TextView.class); | ||
} | ||
|
||
@Override | ||
public String getDescription() { | ||
return "getting text from a TextView"; | ||
} | ||
|
||
@Override | ||
public void perform(UiController uiController, View view) { | ||
TextView tv = (TextView)view; | ||
stringHolder[0] = tv.getText().toString(); | ||
} | ||
}); | ||
return stringHolder[0]; | ||
} | ||
|
||
@Test | ||
public void canShowInteraction() { | ||
onView(withContentDescription("input-event-name")) | ||
.perform(clearText()) | ||
.perform(typeText("test")); | ||
|
||
// onView(withContentDescription("button-can-show-interaction")) | ||
// .check(matches(isDisplayed())) | ||
// .perform(click()); | ||
|
||
// onView(withId(android.R.id.message)) | ||
// .inRoot(isDialog()) | ||
// .check(matches(withText(endsWith("true")))); | ||
|
||
// onView(withId(android.R.id.button1)) | ||
// .inRoot(isDialog()) | ||
// .perform(click()); | ||
} | ||
} |
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
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
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
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,4 @@ | ||
{ | ||
"name": "sample61", | ||
"displayName": "sample61" | ||
} |
Oops, something went wrong.