cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [23/50] [abbrv] cordova-common git commit: fixjasmine : CB-12018 : fixed jasmine tests to work with uninstallPlugin and removed waitsFor/runs, updated promise syntax, calls.reset, and labled tests
Date Tue, 06 Jun 2017 04:59:51 GMT
http://git-wip-us.apache.org/repos/asf/cordova-common/blob/160c1bbb/spec/PluginInfo/PluginInfoProvider.spec.js
----------------------------------------------------------------------
diff --git a/spec/PluginInfo/PluginInfoProvider.spec.js b/spec/PluginInfo/PluginInfoProvider.spec.js
index 40ec6bb..9c86501 100644
--- a/spec/PluginInfo/PluginInfoProvider.spec.js
+++ b/spec/PluginInfo/PluginInfoProvider.spec.js
@@ -24,7 +24,7 @@ var pluginsDir = path.join(__dirname, '../fixtures/plugins');
 
 describe('PluginInfoProvider', function () {
     describe('getAllWithinSearchPath', function () {
-        it('should load all plugins in a dir', function () {
+        it('Test 001 : should load all plugins in a dir', function () {
             var pluginInfoProvider = new PluginInfoProvider();
             var plugins = pluginInfoProvider.getAllWithinSearchPath(pluginsDir);
             expect(plugins.length).not.toBe(0);

http://git-wip-us.apache.org/repos/asf/cordova-common/blob/160c1bbb/spec/PluginManager.spec.js
----------------------------------------------------------------------
diff --git a/spec/PluginManager.spec.js b/spec/PluginManager.spec.js
index cba7c79..7f6d7e8 100644
--- a/spec/PluginManager.spec.js
+++ b/spec/PluginManager.spec.js
@@ -17,7 +17,8 @@
     under the License.
 */
 
-require ('promise-matchers');
+// Promise-matchers do not work with jasmine 2.0.
+//require('promise-matchers');
 
 var Q = require('q');
 var fs = require('fs');
@@ -44,11 +45,11 @@ describe('PluginManager class', function() {
         spyOn(shell, 'mkdir');
     });
 
-    it('should be constructable', function () {
+    it('Test 001 : should be constructable', function () {
         expect(new PluginManager(FAKE_PLATFORM, FAKE_LOCATIONS)).toEqual(jasmine.any(PluginManager));
     });
 
-    it('should return new instance for every PluginManager.get call', function () {
+    it('Test 002 : should return new instance for every PluginManager.get call', function
() {
         expect(PluginManager.get(FAKE_PLATFORM, FAKE_LOCATIONS)).toEqual(jasmine.any(PluginManager));
         expect(PluginManager.get(FAKE_PLATFORM, FAKE_LOCATIONS))
             .not.toBe(PluginManager.get(FAKE_PLATFORM, FAKE_LOCATIONS));
@@ -64,7 +65,7 @@ describe('PluginManager class', function() {
             FAKE_PROJECT = jasmine.createSpyObj('project', ['getInstaller', 'getUninstaller',
'write']);
             manager = new PluginManager('windows', FAKE_LOCATIONS, FAKE_PROJECT);
             actions = jasmine.createSpyObj('actions', ['createAction', 'push', 'process']);
-            actions.process.andReturn(Q.resolve());
+            actions.process.and.returnValue(Q.resolve());
             PluginManager.__set__('ActionStack', function () { return actions; });
         });
 
@@ -76,20 +77,20 @@ describe('PluginManager class', function() {
             it('should return a promise', function () {
                 expect(Q.isPromise(manager.addPlugin(null, {}))).toBe(true);
             });
-
-            it('should reject if "plugin" parameter is not specified or not a PluginInfo
instance', function () {
-                expect(manager.addPlugin(null, {})).toHaveBeenRejected();
-                expect(manager.addPlugin({}, {})).toHaveBeenRejected();
-                expect(manager.addPlugin(new PluginInfo(DUMMY_PLUGIN), {})).not.toHaveBeenRejected();
+            // Promise-matchers do not work with jasmine 2.0.
+            xit('Test 003 : should reject if "plugin" parameter is not specified or not a
PluginInfo instance', function (done) {
+                expect(manager.addPlugin(null, {})).toHaveBeenRejected(done);
+                expect(manager.addPlugin({}, {})).toHaveBeenRejected(done);
+                expect(manager.addPlugin(new PluginInfo(DUMMY_PLUGIN), {})).not.toHaveBeenRejected(done);
             });
 
-            it('should iterate through all plugin\'s files and frameworks', function (done)
{
+            it('Test 004 : should iterate through all plugin\'s files and frameworks', function
(done) {
                 manager.addPlugin(new PluginInfo(DUMMY_PLUGIN), {})
                 .then(function () {
-                    expect(FAKE_PROJECT.getInstaller.calls.length).toBe(16);
-                    expect(FAKE_PROJECT.getUninstaller.calls.length).toBe(16);
+                    expect(FAKE_PROJECT.getInstaller.calls.count()).toBe(16);
+                    expect(FAKE_PROJECT.getUninstaller.calls.count()).toBe(16);
 
-                    expect(actions.push.calls.length).toBe(16);
+                    expect(actions.push.calls.count()).toBe(16);
                     expect(actions.process).toHaveBeenCalled();
                     expect(FAKE_PROJECT.write).toHaveBeenCalled();
                 })
@@ -100,7 +101,7 @@ describe('PluginManager class', function() {
                 });
             });
 
-            it('should save plugin metadata to www directory', function (done) {
+            it('Test 005 : should save plugin metadata to www directory', function (done)
{
                 var metadataPath = path.join(manager.locations.www, 'cordova_plugins.js');
                 var platformWwwMetadataPath = path.join(manager.locations.platformWww, 'cordova_plugins.js');
 
@@ -116,7 +117,7 @@ describe('PluginManager class', function() {
                 });
             });
 
-            it('should save plugin metadata to both www ans platform_www directories when
options.usePlatformWww is specified', function (done) {
+            it('Test 006 : should save plugin metadata to both www ans platform_www directories
when options.usePlatformWww is specified', function (done) {
                 var metadataPath = path.join(manager.locations.www, 'cordova_plugins.js');
                 var platformWwwMetadataPath = path.join(manager.locations.platformWww, 'cordova_plugins.js');
 

http://git-wip-us.apache.org/repos/asf/cordova-common/blob/160c1bbb/spec/events.spec.js
----------------------------------------------------------------------
diff --git a/spec/events.spec.js b/spec/events.spec.js
index a9e7f43..863664c 100644
--- a/spec/events.spec.js
+++ b/spec/events.spec.js
@@ -23,13 +23,13 @@ describe('forwardEventsTo method', function () {
     afterEach(function() {
         events.forwardEventsTo(null);
     });
-    it('should not go to infinite loop when trying to forward to self', function () {
+    it('Test 001 : should not go to infinite loop when trying to forward to self', function
() {
         expect(function() {
             events.forwardEventsTo(events);
             events.emit('log', 'test message');
         }).not.toThrow();
     });
-    it('should reset forwarding after trying to forward to self', function () {
+    it('Test 002 : should reset forwarding after trying to forward to self', function ()
{
         var EventEmitter = require('events').EventEmitter;
         var anotherEventEmitter = new EventEmitter();
         var logSpy = jasmine.createSpy('logSpy');
@@ -39,7 +39,7 @@ describe('forwardEventsTo method', function () {
         events.emit('log', 'test message #1');
         expect(logSpy).toHaveBeenCalled();
 
-        logSpy.reset();
+        logSpy.calls.reset();
 
         events.forwardEventsTo(events);
         events.emit('log', 'test message #2');

http://git-wip-us.apache.org/repos/asf/cordova-common/blob/160c1bbb/spec/superspawn.spec.js
----------------------------------------------------------------------
diff --git a/spec/superspawn.spec.js b/spec/superspawn.spec.js
index 2539199..73a85d9 100644
--- a/spec/superspawn.spec.js
+++ b/spec/superspawn.spec.js
@@ -30,12 +30,12 @@ describe('spawn method', function() {
         failSpy = jasmine.createSpy('fail');
     });
 
-    it('should return a promise', function () {
+    it('Test 001 : should return a promise', function () {
         expect(Q.isPromise(superspawn.spawn(LS))).toBe(true);
         expect(Q.isPromise(superspawn.spawn('invalid_command'))).toBe(true);
     });
 
-    it('should notify about stdout "data" events', function (done) {
+    it('Test 002 : should notify about stdout "data" events', function (done) {
         superspawn.spawn(LS, [], {stdio: 'pipe'})
         .progress(progressSpy)
         .fin(function () {
@@ -44,7 +44,7 @@ describe('spawn method', function() {
         });
     });
 
-    it('should notify about stderr "data" events', function (done) {
+    it('Test 003 : should notify about stderr "data" events', function (done) {
         superspawn.spawn(LS, ['doesnt-exist'], {stdio: 'pipe'})
         .progress(progressSpy)
         .fin(function () {

http://git-wip-us.apache.org/repos/asf/cordova-common/blob/160c1bbb/spec/util/xml-helpers.spec.js
----------------------------------------------------------------------
diff --git a/spec/util/xml-helpers.spec.js b/spec/util/xml-helpers.spec.js
index 0becf72..916e9af 100644
--- a/spec/util/xml-helpers.spec.js
+++ b/spec/util/xml-helpers.spec.js
@@ -54,7 +54,7 @@ var TEST_XML = '<?xml version="1.0" encoding="UTF-8"?>\n' +
 
 describe('xml-helpers', function(){
     describe('parseElementtreeSync', function() {
-        it('should parse xml with a byte order mark', function() {
+        it('Test 001 : should parse xml with a byte order mark', function() {
             var xml_path = path.join(__dirname, '../fixtures/projects/windows/bom_test.xml');
             expect(function() {
                 xml_helpers.parseElementtreeSync(xml_path);
@@ -62,35 +62,35 @@ describe('xml-helpers', function(){
         });
     });
     describe('equalNodes', function() {
-        it('should return false for different tags', function(){
+        it('Test 002 : should return false for different tags', function(){
             expect(xml_helpers.equalNodes(usesNetworkOne, title)).toBe(false);
         });
 
-        it('should return true for identical tags', function(){
+        it('Test 003 : should return true for identical tags', function(){
             expect(xml_helpers.equalNodes(usesNetworkOne, usesNetworkTwo)).toBe(true);
         });
 
-        it('should return false for different attributes', function(){
+        it('Test 004 : should return false for different attributes', function(){
             expect(xml_helpers.equalNodes(usesNetworkOne, usesReceive)).toBe(false);
         });
 
-        it('should distinguish between text', function(){
+        it('Test 005 : should distinguish between text', function(){
             expect(xml_helpers.equalNodes(helloTagOne, goodbyeTag)).toBe(false);
         });
 
-        it('should ignore whitespace in text', function(){
+        it('Test 006 : should ignore whitespace in text', function(){
             expect(xml_helpers.equalNodes(helloTagOne, helloTagTwo)).toBe(true);
         });
 
         describe('should compare children', function(){
-            it('by child quantity', function(){
+            it('Test 007: by child quantity', function(){
                 var one = et.XML('<i><b>o</b></i>'),
                     two = et.XML('<i><b>o</b><u></u></i>');
 
                 expect(xml_helpers.equalNodes(one, two)).toBe(false);
             });
 
-            it('by child equality', function(){
+            it('Test 008 : by child equality', function(){
                 var one = et.XML('<i><b>o</b></i>'),
                     two = et.XML('<i><u></u></i>'),
                     uno = et.XML('<i>\n<b>o</b>\n</i>');
@@ -107,22 +107,22 @@ describe('xml-helpers', function(){
             config_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '../fixtures/projects/android/res/xml/config.xml'));
         });
 
-        it('should remove any children that match the specified selector', function() {
+        it('Test 009 : should remove any children that match the specified selector', function()
{
             var children = config_xml.findall('plugins/plugin');
             xml_helpers.pruneXML(config_xml, children, 'plugins');
             expect(config_xml.find('plugins').getchildren().length).toEqual(0);
         });
-        it('should do nothing if the children cannot be found', function() {
+        it('Test 010 : should do nothing if the children cannot be found', function() {
             var children = [title];
             xml_helpers.pruneXML(config_xml, children, 'plugins');
             expect(config_xml.find('plugins').getchildren().length).toEqual(17);
         });
-        it('should be able to handle absolute selectors', function() {
+        it('Test 011 : should be able to handle absolute selectors', function() {
             var children = config_xml.findall('plugins/plugin');
             xml_helpers.pruneXML(config_xml, children, '/cordova/plugins');
             expect(config_xml.find('plugins').getchildren().length).toEqual(0);
         });
-        it('should be able to handle absolute selectors with wildcards', function() {
+        it('Test 012 : should be able to handle absolute selectors with wildcards', function()
{
             var children = config_xml.findall('plugins/plugin');
             xml_helpers.pruneXML(config_xml, children, '/*/plugins');
             expect(config_xml.find('plugins').getchildren().length).toEqual(0);
@@ -135,7 +135,7 @@ describe('xml-helpers', function(){
         beforeEach(function() {
             android_manifest_xml = xml_helpers.parseElementtreeSync(path.join(__dirname,
'../fixtures/projects/android/AndroidManifest.xml'));
         });
-        it('should restore attributes at the specified selector', function() {
+        it('Test 013 : should restore attributes at the specified selector', function() {
             var xml = {
                 oldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name',
'android:debuggable': 'false'}
             };
@@ -144,7 +144,7 @@ describe('xml-helpers', function(){
             expect(Object.keys(applicationAttr).length).toEqual(3);
             expect(applicationAttr['android:debuggable']).toEqual('false');
         });
-        it('should do nothing if the old attributes cannot be found', function() {
+        it('Test 014 : should do nothing if the old attributes cannot be found', function()
{
             var xml = {
                 notOldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name',
'android:debuggable': 'false'}
             };
@@ -153,7 +153,7 @@ describe('xml-helpers', function(){
             expect(Object.keys(applicationAttr).length).toEqual(3);
             expect(applicationAttr['android:debuggable']).toEqual('true');
         });
-        it('should be able to handle absolute selectors', function() {
+        it('Test 015 : should be able to handle absolute selectors', function() {
             var xml = {
                 oldAttrib: {'android:icon': '@drawable/icon', 'android:label': '@string/app_name',
'android:debuggable': 'false'}
             };
@@ -162,7 +162,7 @@ describe('xml-helpers', function(){
             expect(Object.keys(applicationAttr).length).toEqual(3);
             expect(applicationAttr['android:debuggable']).toEqual('false');
         });
-        it('should be able to handle absolute selectors with wildcards', function() {
+        it('Test 016 : should be able to handle absolute selectors with wildcards', function()
{
             var xml = {
                 oldAttrib: {'android:name': 'ChildApp', 'android:label': '@string/app_name',
'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true'}
             };
@@ -171,7 +171,7 @@ describe('xml-helpers', function(){
             expect(Object.keys(activityAttr).length).toEqual(4);
             expect(activityAttr['android:enabled']).toEqual('true');
         });
-        it('should be able to handle xpath selectors', function() {
+        it('Test 017 : should be able to handle xpath selectors', function() {
             var xml = {
                 oldAttrib: {'android:name': 'com.phonegap.DroidGap', 'android:label': '@string/app_name',
'android:configChanges': 'orientation|keyboardHidden', 'android:enabled': 'true'}
             };
@@ -190,17 +190,17 @@ describe('xml-helpers', function(){
             plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '../fixtures/plugins/ChildBrowser/plugin.xml'));
         });
 
-        it('should add children to the specified selector', function() {
+        it('Test 018 : should add children to the specified selector', function() {
             var children = plugin_xml.find('config-file').getchildren();
             xml_helpers.graftXML(config_xml, children, 'plugins');
             expect(config_xml.find('plugins').getchildren().length).toEqual(19);
         });
-        it('should be able to handle absolute selectors', function() {
+        it('Test 019 : should be able to handle absolute selectors', function() {
             var children = plugin_xml.find('config-file').getchildren();
             xml_helpers.graftXML(config_xml, children, '/cordova');
             expect(config_xml.findall('access').length).toEqual(3);
         });
-        it('should be able to handle absolute selectors with wildcards', function() {
+        it('Test 020 : should be able to handle absolute selectors with wildcards', function()
{
             var children = plugin_xml.find('config-file').getchildren();
             xml_helpers.graftXML(config_xml, children, '/*');
             expect(config_xml.findall('access').length).toEqual(3);
@@ -214,7 +214,7 @@ describe('xml-helpers', function(){
             plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '../fixtures/plugins/org.test.editconfigtest/plugin.xml'));
             android_manifest_xml = xml_helpers.parseElementtreeSync(path.join(__dirname,
'../fixtures/projects/android/AndroidManifest.xml'));
         });
-        it ('should merge attributes at specified selector', function() {
+        it ('Test 021 : should merge attributes at specified selector', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"merge\"]').getchildren();
             xml_helpers.graftXMLMerge(android_manifest_xml, children, 'application/activity[@android:name=\"com.phonegap.DroidGap\"]',
{});
             var activityAttr = android_manifest_xml.find('application/activity[@android:name=\"com.phonegap.DroidGap\"]').attrib;
@@ -222,7 +222,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).toEqual('keyboardHidden');
         });
-        it ('should be able to handle absolute selectors', function() {
+        it ('Test 022 : should be able to handle absolute selectors', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"merge\"]').getchildren();
             xml_helpers.graftXMLMerge(android_manifest_xml, children, '/manifest/application/activity[@android:name=\"com.phonegap.DroidGap\"]',
{});
             var activityAttr = android_manifest_xml.find('application/activity[@android:name=\"com.phonegap.DroidGap\"]').attrib;
@@ -230,7 +230,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).toEqual('keyboardHidden');
         });
-        it ('should be able to handle absolute selectors with wildcards', function() {
+        it ('Test 023 : should be able to handle absolute selectors with wildcards', function()
{
             var children = plugin_xml.find('platform/edit-config[@mode=\"merge\"]').getchildren();
             xml_helpers.graftXMLMerge(android_manifest_xml, children, '/*/*/activity[@android:name=\"com.phonegap.DroidGap\"]',
{});
             var activityAttr = android_manifest_xml.find('application/activity[@android:name=\"com.phonegap.DroidGap\"]').attrib;
@@ -238,7 +238,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).toEqual('keyboardHidden');
         });
-        it ('should be able to handle xpath selectors', function() {
+        it ('Test 024 : should be able to handle xpath selectors', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"merge\"]').getchildren();
             xml_helpers.graftXMLMerge(android_manifest_xml, children, 'application/activity[@android:name=\"com.phonegap.DroidGap\"]',
{});
             var activityAttr = android_manifest_xml.find('application/activity[@android:name=\"com.phonegap.DroidGap\"]').attrib;
@@ -255,7 +255,7 @@ describe('xml-helpers', function(){
             plugin_xml = xml_helpers.parseElementtreeSync(path.join(__dirname, '../fixtures/plugins/org.test.editconfigtest/plugin.xml'));
             android_manifest_xml = xml_helpers.parseElementtreeSync(path.join(__dirname,
'../fixtures/projects/android/AndroidManifest.xml'));
         });
-        it ('should overwrite attributes at specified selector', function() {
+        it ('Test 025 : should overwrite attributes at specified selector', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"overwrite\"]').getchildren();
             xml_helpers.graftXMLOverwrite(android_manifest_xml, children, 'application/activity',
{});
             var activityAttr = android_manifest_xml.find('application/activity').attrib;
@@ -263,7 +263,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).not.toBeDefined();
         });
-        it ('should be able to handle absolute selectors', function() {
+        it ('Test 026 : should be able to handle absolute selectors', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"overwrite\"]').getchildren();
             xml_helpers.graftXMLOverwrite(android_manifest_xml, children, '/manifest/application/activity',
{});
             var activityAttr = android_manifest_xml.find('application/activity').attrib;
@@ -271,7 +271,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).not.toBeDefined();
         });
-        it ('should be able to handle absolute selectors with wildcards', function() {
+        it ('Test 027 : should be able to handle absolute selectors with wildcards', function()
{
             var children = plugin_xml.find('platform/edit-config[@mode=\"overwrite\"]').getchildren();
             xml_helpers.graftXMLOverwrite(android_manifest_xml, children, '/*/*/activity',
{});
             var activityAttr = android_manifest_xml.find('application/activity').attrib;
@@ -279,7 +279,7 @@ describe('xml-helpers', function(){
             expect(activityAttr['android:enabled']).toEqual('true');
             expect(activityAttr['android:configChanges']).not.toBeDefined();
         });
-        it ('should be able to handle xpath selectors', function() {
+        it ('Test 028 : should be able to handle xpath selectors', function() {
             var children = plugin_xml.find('platform/edit-config[@mode=\"overwrite\"]').getchildren();
             xml_helpers.graftXMLOverwrite(android_manifest_xml, children, 'application/activity[@android:name=\"ChildApp\"]',
{});
             var activityAttr = android_manifest_xml.find('application/activity').attrib;
@@ -295,7 +295,7 @@ describe('xml-helpers', function(){
             dstXml = et.XML(TEST_XML);
         });
 
-        it('should merge attributes and text of the root element without clobbering', function
() {
+        it('Test 029 : should merge attributes and text of the root element without clobbering',
function () {
             var testXml = et.XML('<widget foo="bar" id="NOTANID">TEXT</widget>');
             xml_helpers.mergeXml(testXml, dstXml);
             expect(dstXml.attrib.foo).toEqual('bar');
@@ -303,7 +303,7 @@ describe('xml-helpers', function(){
             expect(dstXml.text).not.toEqual('TEXT');
         });
 
-        it('should merge attributes and text of the root element with clobbering', function
() {
+        it('Test 030 : should merge attributes and text of the root element with clobbering',
function () {
             var testXml = et.XML('<widget foo="bar" id="NOTANID">TEXT</widget>');
             xml_helpers.mergeXml(testXml, dstXml, 'foo', true);
             expect(dstXml.attrib.foo).toEqual('bar');
@@ -311,7 +311,7 @@ describe('xml-helpers', function(){
             expect(dstXml.text).toEqual('TEXT');
         });
 
-        it('should handle attributes values with quotes correctly', function () {
+        it('Test 031 : should handle attributes values with quotes correctly', function ()
{
             var testXml = et.XML('<widget><quote foo="some \'quoted\' string" bar="another
&quot;quoted&quot; string" baz="&quot;mixed&quot; \'quotes\'" /></widget>');
             xml_helpers.mergeXml(testXml, dstXml);
             expect(dstXml.find('quote')).toBeDefined();
@@ -320,7 +320,7 @@ describe('xml-helpers', function(){
             expect(dstXml.find('quote').attrib.baz).toEqual('"mixed" \'quotes\'');
         });
 
-        it('should not merge platform tags with the wrong platform', function () {
+        it('Test 032 : should not merge platform tags with the wrong platform', function
() {
             var testXml = et.XML('<widget><platform name="bar"><testElement
testAttrib="value">testTEXT</testElement></platform></widget>'),
                 origCfg = et.tostring(dstXml);
 
@@ -328,7 +328,7 @@ describe('xml-helpers', function(){
             expect(et.tostring(dstXml)).toEqual(origCfg);
         });
 
-        it('should merge platform tags with the correct platform', function () {
+        it('Test 033 : should merge platform tags with the correct platform', function ()
{
             var testXml = et.XML('<widget><platform name="bar"><testElement
testAttrib="value">testTEXT</testElement></platform></widget>'),
                 origCfg = et.tostring(dstXml);
 
@@ -340,7 +340,7 @@ describe('xml-helpers', function(){
             expect(testElement.text).toEqual('testTEXT');
         });
 
-        it('should merge singleton children without clobber', function () {
+        it('Test 034 : should merge singleton children without clobber', function () {
             var testXml = et.XML('<widget><author testAttrib="value" href="http://www.nowhere.com">SUPER_AUTHOR</author></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml);
@@ -353,7 +353,7 @@ describe('xml-helpers', function(){
             expect(testElements[0].text).toContain('Apache Cordova Team');
         });
 
-        it('should merge singleton name without clobber', function () {
+        it('Test 035 : should merge singleton name without clobber', function () {
             var testXml = et.XML('<widget><name>SUPER_NAME</name></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml);
@@ -363,7 +363,7 @@ describe('xml-helpers', function(){
             expect(testElements[0].text).toContain('Hello Cordova');
         });
 
-        it('should clobber singleton children with clobber', function () {
+        it('Test 036 : should clobber singleton children with clobber', function () {
             var testXml = et.XML('<widget><author testAttrib="value" href="http://www.nowhere.com">SUPER_AUTHOR</author></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml, '', true);
@@ -376,7 +376,7 @@ describe('xml-helpers', function(){
             expect(testElements[0].text).toEqual('SUPER_AUTHOR');
         });
 
-        it('should merge singleton name with clobber', function () {
+        it('Test 037 : should merge singleton name with clobber', function () {
             var testXml = et.XML('<widget><name>SUPER_NAME</name></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml, '', true);
@@ -386,7 +386,7 @@ describe('xml-helpers', function(){
             expect(testElements[0].text).toContain('SUPER_NAME');
         });
 
-        it('should append non singelton children', function () {
+        it('Test 038 : should append non singelton children', function () {
             var testXml = et.XML('<widget><preference num="1"/> <preference
num="2"/></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml, '', true);
@@ -394,7 +394,7 @@ describe('xml-helpers', function(){
             expect(testElements.length).toEqual(4);
         });
 
-        it('should handle namespaced elements', function () {
+        it('Test 039 : should handle namespaced elements', function () {
             var testXml = et.XML('<widget><foo:bar testAttrib="value">testText</foo:bar></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml, 'foo', true);
@@ -404,7 +404,7 @@ describe('xml-helpers', function(){
             expect(testElement.text).toEqual('testText');
         });
 
-        it('should not append duplicate non singelton children', function () {
+        it('Test 040 : should not append duplicate non singelton children', function () {
             var testXml = et.XML('<widget><preference name="fullscreen" value="true"/></widget>');
 
             xml_helpers.mergeXml(testXml, dstXml, '', true);
@@ -412,7 +412,7 @@ describe('xml-helpers', function(){
             expect(testElements.length).toEqual(2);
         });
 
-        it('should not skip partial duplicate non singelton children', function () {
+        it('Test 041 : should not skip partial duplicate non singelton children', function
() {
             //remove access tags from dstXML
             var testElements = dstXml.findall('access');
             for(var i = 0; i < testElements.length; i++) {
@@ -433,7 +433,7 @@ describe('xml-helpers', function(){
 
         });
 
-        it('should remove duplicate preferences (by name attribute value)', function () {
+        it('Test 042 : should remove duplicate preferences (by name attribute value)', function
() {
             var testXml = et.XML(
                 '<?xml version="1.0" encoding="UTF-8"?>\n' +
                 '<widget xmlns     = "http://www.w3.org/ns/widgets"\n' +
@@ -454,7 +454,7 @@ describe('xml-helpers', function(){
             expect(testElements.length).toEqual(1);
         });
 
-        it('should merge preferences, with platform preferences written last', function ()
{
+        it('Test 043 : should merge preferences, with platform preferences written last',
function () {
             var testXml = et.XML(
                 '<?xml version="1.0" encoding="UTF-8"?>\n' +
                 '<widget xmlns     = "http://www.w3.org/ns/widgets"\n' +


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


Mime
View raw message