Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[...] add original watchkit app/extension test coverage #1

Closed
wants to merge 1 commit into from

Conversation

brody4hire
Copy link
Owner

test cases by @l3ender for WatchKit2 in apache#56, adapted to test the original WatchKit support instead

with some changes marked "ORIGINAL" and "TBD ???" to indicate what was changed for WatchKit vs WatchKit2

I think we should add these test cases to apache/cordova-node-xcode before we add WatchKit2 support.

When I tried mutation testing with Stryker, as proposed in apache#61, these test cases seemed to kill a few more possible mutants and increase the code coverage a little more. For comparison:

TEST TODO:

1:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..e9015aa 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1563,7 +1563,7 @@ function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName) {
         frameworks: 'frameworks',
         static_library: 'products_directory',
         unit_test_bundle: 'wrapper',
-        watch_app: 'wrapper',
+        watch_app: '',
         watch_extension: 'plugins'
     }
     var SUBFOLDERSPEC_BY_DESTINATION = {

2:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..9b654e5 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1564,7 +1564,7 @@ function pbxCopyFilesBuildPhaseObj(obj, folderType, subfolderPath, phaseName) {
         static_library: 'products_directory',
         unit_test_bundle: 'wrapper',
         watch_app: 'wrapper',
-        watch_extension: 'plugins'
+        watch_extension: ''
     }
     var SUBFOLDERSPEC_BY_DESTINATION = {
         absolute_path: 0,

3:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..e092548 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1714,7 +1714,6 @@ function filetypeForProducttype (productType) {
             'com.apple.product-type.framework': '"wrapper.framework"',
             'com.apple.product-type.library.static': '"archive.ar"',
             'com.apple.product-type.bundle.unit-test': '"wrapper.cfbundle"',
-            'com.apple.product-type.application.watchapp': '"wrapper.application"',
             'com.apple.product-type.watchkit-extension': '"wrapper.app-extension"'
         };
 

4:

diff --git a/lib/pbxProject.js b/lib/pbxProject.js
index 0e0f8f9..83ab90c 100644
--- a/lib/pbxProject.js
+++ b/lib/pbxProject.js
@@ -1715,7 +1715,6 @@ function filetypeForProducttype (productType) {
             'com.apple.product-type.library.static': '"archive.ar"',
             'com.apple.product-type.bundle.unit-test': '"wrapper.cfbundle"',
             'com.apple.product-type.application.watchapp': '"wrapper.application"',
-            'com.apple.product-type.watchkit-extension': '"wrapper.app-extension"'
         };
 
     return FILETYPE_BY_PRODUCTTYPE[productType]

Co-authored-by: Ross Bender <[email protected]>
Co-authored-by: Christopher J. Brody <[email protected]>
@brody4hire brody4hire closed this Oct 18, 2019
@brody4hire brody4hire deleted the add-original-watchkit-test-coverage branch October 18, 2019 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant