Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

fix: inject app.css file from unit-test-runner on test command #949

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Jun 26, 2019

Currently the app.css file from unit-test-runner is not included in bundle/vendor files on test command so the application remains without app.css file. The tns-core-modules shows an error in this situation in their latest next versions:

JS: Error: Could not load CSS from ./app.css: Error: com.tns.NativeScriptException: Failed to find module: "./app.css", relative to: app//
JS:     com.tns.Module.resolvePathHelper(Module.java:146)
JS:     com.tns.Module.resolvePath(Module.java:55)
JS:     com.tns.Runtime.callJSMethodNative(Native Method)
JS:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1212)
JS:     com.tns.Runtime.callJSMethodImpl(Runtime.java:1092)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1079)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1059)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1051)
JS:     com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
JS:     android.app.Activity.performCreate(Activity.java:7136)
JS:     android.app.Activity.performCreate(Activity.java:7127)
JS:     android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
JS:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
JS:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
JS:     android.app.servertransac...

So we need to inject app.css in order to prevent this error :)

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

Currently the app.css file from unit-test-runner is not included in bundle/vendor files on test command so the application remains without app.css file.  The `tns-core-modules` shows an error in this situation with the in their latest next versions:
```
JS: Error: Could not load CSS from ./app.css: Error: com.tns.NativeScriptException: Failed to find module: "./app.css", relative to: app//
JS:     com.tns.Module.resolvePathHelper(Module.java:146)
JS:     com.tns.Module.resolvePath(Module.java:55)
JS:     com.tns.Runtime.callJSMethodNative(Native Method)
JS:     com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1212)
JS:     com.tns.Runtime.callJSMethodImpl(Runtime.java:1092)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1079)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1059)
JS:     com.tns.Runtime.callJSMethod(Runtime.java:1051)
JS:     com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19)
JS:     android.app.Activity.performCreate(Activity.java:7136)
JS:     android.app.Activity.performCreate(Activity.java:7127)
JS:     android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
JS:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
JS:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
JS:     android.app.servertransac...
```

So we need to inject app.css in order to prevent this error :)
@cla-bot cla-bot bot added the cla: yes label Jun 26, 2019
@rosen-vladimirov rosen-vladimirov merged commit a216ed3 into master Jun 26, 2019
@rosen-vladimirov rosen-vladimirov deleted the fatme/fix-css-file-on-test-command branch June 26, 2019 08:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants