Skip to content

Commit

Permalink
fix: use TestNativeScriptActivity and TestNativeScriptApplication whe…
Browse files Browse the repository at this point in the history
…re necessary
  • Loading branch information
vmutafov committed Jan 7, 2024
1 parent 74beb80 commit 869f046
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@ thumbs.db
android-runtime.iml
test-app/build-tools/*.log
test-app/analytics/build-statistics.json
package-lock.json
package-lock.json
test-app/build-tools/jsparser/tests/cases/*/internal/livesync.js
test-app/build-tools/*.jar
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ task copyFilesToProjectTemeplate {
copy {
from "$TEST_APP_PATH/app/src/main/java/com/tns/"
include "*.java"
exclude "NativeScriptApplication.java"
exclude "NativeScriptActivity.java"
exclude "TestNativeScriptApplication.java"
exclude "TestNativeScriptActivity.java"
into "$DIST_FRAMEWORK_PATH/app/src/main/java/com/tns"
}
copy {
Expand Down
2 changes: 0 additions & 2 deletions test-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ app/app.iml
treeNodeStream.dat
treeStringsStream.dat
treeValueStream.dat
NativeScriptActivity.java
NativeScriptApplication.java
**/com/tns/gen
2 changes: 1 addition & 1 deletion test-app/app/src/main/assets/app/MyActivity.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
}
@JavaProxy("com.tns.NativeScriptActivity")
@JavaProxy("com.tns.TestNativeScriptActivity")
class MyActivity extends android.app.Activity
{
onCreate(bundle: android.os.Bundle)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void testParseNamedExtend() throws IOException {
Assert.assertEquals(row.getColumn(), "");
Assert.assertEquals(row.getNewClassName(), "");
Assert.assertEquals(row.getMethods()[0], "toString");
Assert.assertEquals(row.getFilename(), "com.tns.NativeScriptActivity");
Assert.assertEquals(row.getFilename(), "com.tns.TestNativeScriptActivity");
Assert.assertEquals(row.getJsFilename(), "MyActivity.js");
Assert.assertEquals(row.getInterfaces()[0], "");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
java.lang.Object*****toString*com.tns.NativeScriptActivity*MyActivity.js*
java.lang.Object*****toString*com.tns.TestNativeScriptActivity*MyActivity.js*
4 changes: 2 additions & 2 deletions test-app/runtests.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ task startInstalledApk(type: Exec) {
println "Starting test application"

if (isWinOs) {
commandLine "cmd", "/c", "adb", runOnDeviceOrEmulator, "-e", "shell", "am", "start", "-n", "com.tns.testapplication/com.tns.NativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
commandLine "cmd", "/c", "adb", runOnDeviceOrEmulator, "-e", "shell", "am", "start", "-n", "com.tns.testapplication/com.tns.TestNativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
} else {
commandLine "adb", runOnDeviceOrEmulator, "-e", "shell", "am", "start", "-n", "com.tns.testapplication/com.tns.NativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
commandLine "adb", runOnDeviceOrEmulator, "-e", "shell", "am", "start", "-n", "com.tns.testapplication/com.tns.TestNativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
}
}
}
Expand Down

0 comments on commit 869f046

Please sign in to comment.