From 869f046f2b24cbed883b66af4921de53c2e439f0 Mon Sep 17 00:00:00 2001 From: Vladimir Mutafov Date: Sun, 7 Jan 2024 18:46:38 +0200 Subject: [PATCH] fix: use TestNativeScriptActivity and TestNativeScriptApplication where necessary --- .gitignore | 4 +++- build.gradle | 4 ++-- test-app/.gitignore | 2 -- test-app/app/src/main/assets/app/MyActivity.js | 2 +- .../nativescript/staticbindinggenerator/test/DataRowTest.java | 2 +- .../staticbindinggenerator/test/datarow-named-extend.txt | 2 +- test-app/runtests.gradle | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 58cff5e30..cc779f988 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,6 @@ thumbs.db android-runtime.iml test-app/build-tools/*.log test-app/analytics/build-statistics.json -package-lock.json \ No newline at end of file +package-lock.json +test-app/build-tools/jsparser/tests/cases/*/internal/livesync.js +test-app/build-tools/*.jar diff --git a/build.gradle b/build.gradle index 4772a5f34..a71cbe7d4 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { diff --git a/test-app/.gitignore b/test-app/.gitignore index e94ad2aa9..8af3c8451 100644 --- a/test-app/.gitignore +++ b/test-app/.gitignore @@ -21,6 +21,4 @@ app/app.iml treeNodeStream.dat treeStringsStream.dat treeValueStream.dat -NativeScriptActivity.java -NativeScriptApplication.java **/com/tns/gen \ No newline at end of file diff --git a/test-app/app/src/main/assets/app/MyActivity.js b/test-app/app/src/main/assets/app/MyActivity.js index 4acac9fde..cb15d6d32 100644 --- a/test-app/app/src/main/assets/app/MyActivity.js +++ b/test-app/app/src/main/assets/app/MyActivity.js @@ -12,7 +12,7 @@ } } - @JavaProxy("com.tns.NativeScriptActivity") + @JavaProxy("com.tns.TestNativeScriptActivity") class MyActivity extends android.app.Activity { onCreate(bundle: android.os.Bundle) diff --git a/test-app/build-tools/static-binding-generator/src/test/java/org/nativescript/staticbindinggenerator/test/DataRowTest.java b/test-app/build-tools/static-binding-generator/src/test/java/org/nativescript/staticbindinggenerator/test/DataRowTest.java index 5935b95fd..67c7d1f37 100644 --- a/test-app/build-tools/static-binding-generator/src/test/java/org/nativescript/staticbindinggenerator/test/DataRowTest.java +++ b/test-app/build-tools/static-binding-generator/src/test/java/org/nativescript/staticbindinggenerator/test/DataRowTest.java @@ -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], ""); } diff --git a/test-app/build-tools/static-binding-generator/src/test/resources/org/nativescript/staticbindinggenerator/test/datarow-named-extend.txt b/test-app/build-tools/static-binding-generator/src/test/resources/org/nativescript/staticbindinggenerator/test/datarow-named-extend.txt index c784b0c43..84c9b6526 100644 --- a/test-app/build-tools/static-binding-generator/src/test/resources/org/nativescript/staticbindinggenerator/test/datarow-named-extend.txt +++ b/test-app/build-tools/static-binding-generator/src/test/resources/org/nativescript/staticbindinggenerator/test/datarow-named-extend.txt @@ -1 +1 @@ -java.lang.Object*****toString*com.tns.NativeScriptActivity*MyActivity.js* \ No newline at end of file +java.lang.Object*****toString*com.tns.TestNativeScriptActivity*MyActivity.js* \ No newline at end of file diff --git a/test-app/runtests.gradle b/test-app/runtests.gradle index 6af55d065..254e58896 100644 --- a/test-app/runtests.gradle +++ b/test-app/runtests.gradle @@ -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" } } }