Skip to content

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

Closed
brody2consult wants to merge 1 commit intomasterfrom
add-original-watchkit-test-coverage
Closed

[...] add original watchkit app/extension test coverage#1
brody2consult wants to merge 1 commit intomasterfrom
add-original-watchkit-test-coverage

Conversation

@brody2consult
Copy link
Copy Markdown
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 <rbender@rbfcu.org>
Co-authored-by: Christopher J. Brody <chris@brody.consulting>
@brody2consult brody2consult 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