You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/10/07 03:38:56 UTC

cordova-lib git commit: CB-11776 Add test case for different edit-config targets

Repository: cordova-lib
Updated Branches:
  refs/heads/master 121fdc3f8 -> c921bc077


CB-11776 Add test case for different edit-config targets

 This closes #491


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/c921bc07
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/c921bc07
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/c921bc07

Branch: refs/heads/master
Commit: c921bc07764ede2218c55eb8399ae335ff5bb1fc
Parents: 121fdc3
Author: ktop <kt...@gmail.com>
Authored: Mon Sep 19 13:53:51 2016 -0400
Committer: Steve Gill <st...@gmail.com>
Committed: Thu Oct 6 20:23:28 2016 -0700

----------------------------------------------------------------------
 cordova-common/spec/ConfigChanges/ConfigChanges.spec.js           | 3 ++-
 .../spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml  | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c921bc07/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js
----------------------------------------------------------------------
diff --git a/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js b/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js
index 1daaa4b..f1c7e6d 100644
--- a/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js
+++ b/cordova-common/spec/ConfigChanges/ConfigChanges.spec.js
@@ -298,9 +298,10 @@ describe('config-changes module', function() {
 
                     var munger = new configChanges.PlatformMunger('android', temp, platformJson, pluginInfoProvider);
                     munger.process(plugins_dir);
-                    expect(spy.calls.length).toEqual(2);
+                    expect(spy.calls.length).toEqual(3);
                     expect(spy.argsForCall[0][2]).toEqual('/manifest/application/activity[@android:name=\'org.test.DroidGap\']');
                     expect(spy.argsForCall[1][2]).toEqual('/manifest/application/activity[@android:name=\'org.test.DroidGap\']');
+                    expect(spy.argsForCall[2][2]).toEqual('/manifest/uses-sdk');
                 });
                 it('should call graftXMLOverwrite for every new config munge with mode \'overwrite\' it introduces', function() {
                     shell.cp('-rf', editconfigplugin, plugins_dir);

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/c921bc07/cordova-common/spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-common/spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml b/cordova-common/spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml
index 5a64034..9c9e24b 100644
--- a/cordova-common/spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml
+++ b/cordova-common/spec/fixtures/plugins/org.test.editconfigtest_two/plugin.xml
@@ -33,5 +33,8 @@
         <edit-config file="AndroidManifest.xml" target="/manifest/application/activity[@android:name='ChildApp']" mode="overwrite">
             <activity android:name="ChildApp" android:label="@string/app_name" android:enabled="false" />
         </edit-config>
+        <edit-config file="AndroidManifest.xml" target="/manifest/uses-sdk" mode="merge">
+            <activity android:maxSdkVersion="23" />
+        </edit-config>
     </platform>
 </plugin>


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org