cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [2/3] cordova-lib git commit: CB-13380: updated integration tests to work with new pinned platforms
Date Fri, 06 Oct 2017 22:29:55 GMT
CB-13380: updated integration tests to work with new pinned platforms


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

Branch: refs/heads/master
Commit: 1a8c8abb77e8679eee399b8713b72ba3e08d9bf5
Parents: c0689ec
Author: Steve Gill <stevengill97@gmail.com>
Authored: Fri Oct 6 15:16:13 2017 -0700
Committer: Steve Gill <stevengill97@gmail.com>
Committed: Fri Oct 6 15:16:13 2017 -0700

----------------------------------------------------------------------
 integration-tests/pkgJson-restore.spec.js | 18 +++++++++---------
 integration-tests/pkgJson.spec.js         | 10 +++++-----
 2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1a8c8abb/integration-tests/pkgJson-restore.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/pkgJson-restore.spec.js b/integration-tests/pkgJson-restore.spec.js
index dfd1f10..f070e62 100644
--- a/integration-tests/pkgJson-restore.spec.js
+++ b/integration-tests/pkgJson-restore.spec.js
@@ -259,7 +259,7 @@ describe('tests platform/spec restore with --save', function () {
             expect(path.join(pluginsFolderPath, 'cordova-plugin-splashscreen')).not.toExist();
         }).then(function () {
             // Add platform (so that prepare can run).
-            return cordovaPlatform('add', 'browser', {'save': true});
+            return cordovaPlatform('add', 'browser', {'save': true, 'fetch': true});
         }).then(function () {
             // Run cordova prepare with fetch.
             return prepare({'fetch': true});
@@ -336,7 +336,7 @@ describe('tests platform/spec restore with --save', function () {
 
         emptyPlatformList().then(function () {
             // Add 'browser' platform to project without --save
-            return cordovaPlatform('add', secondPlatformAdded);
+            return cordovaPlatform('add', secondPlatformAdded, {'fetch': true});
         }).then(function () {
             // Add helpers.testPlatform to project with --save
             return cordovaPlatform('add', [helpers.testPlatform], {'save': true});
@@ -762,7 +762,7 @@ describe('update config.xml to use the variable found in pkg.json', function
()
 
         emptyPlatformList().then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -847,7 +847,7 @@ describe('update pkg.json to include plugin and variable found in config.xml',
f
 
         emptyPlatformList().then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -949,7 +949,7 @@ describe('update pkg.json AND config.xml to include all plugins and merge
unique
 
         emptyPlatformList().then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -1079,7 +1079,7 @@ describe('update pkg.json AND config.xml to include all plugins/merge
variables
 
         emptyPlatformList().then(function () {
             // Run cordova prepare
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json)
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -1199,7 +1199,7 @@ describe('update config.xml to include the plugin that is in pkg.json',
function
 
         emptyPlatformList().then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -1332,7 +1332,7 @@ describe('platforms and plugins should be restored with config.xml even
without
             expect(platformsJson[androidPlatform]).not.toBeDefined();
         }).then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             var cfg2 = new ConfigParser(configXmlPath);
             engines = cfg2.getEngines();
@@ -1378,7 +1378,7 @@ describe('platforms and plugins should be restored with config.xml even
without
             expect(path.join(pluginsFolderPath16, 'cordova-plugin-device')).not.toExist();
         }).then(function () {
             // Run cordova prepare.
-            return prepare();
+            return prepare({'fetch': true});
         }).then(function () {
             // Plugin should be restored and returned to the installed list.
             expect(path.join(pluginsFolderPath16, 'cordova-plugin-device')).toExist();

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/1a8c8abb/integration-tests/pkgJson.spec.js
----------------------------------------------------------------------
diff --git a/integration-tests/pkgJson.spec.js b/integration-tests/pkgJson.spec.js
index e756b97..ce3716a 100644
--- a/integration-tests/pkgJson.spec.js
+++ b/integration-tests/pkgJson.spec.js
@@ -487,10 +487,10 @@ describe('platform end-to-end with --save', function () {
         expect(pkgJsonPath).toExist();
 
         // Add a platform without --save.
-        cordova.platform('add', platformNotToAdd)
+        cordova.platform('add', platformNotToAdd, {'fetch': true})
             .then(function () {
                 // And now add another platform with --save.
-                return cordova.platform('add', [helpers.testPlatform], {'save': true});
+                return cordova.platform('add', [helpers.testPlatform], {'save': true, 'fetch':
true});
             }).then(function () {
                 // Check the platform add was successful, reload, skipping cache.
                 pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -527,7 +527,7 @@ describe('platform end-to-end with --save', function () {
         // Check there are no platforms yet.
         emptyPlatformList().then(function () {
             // Add the testing platform with --save and add specific version to android platform.
-            return cordova.platform('add', ['android@6.1.0', 'browser@4.1.0'], {'save': true,
'fetch': true});
+            return cordova.platform('add', ['android@6.3.0', 'browser@5.0.0'], {'save': true,
'fetch': true});
         }).then(function () {
             // Delete any previous caches of require(package.json).
             pkgJson = cordova_util.requireNoCache(pkgJsonPath);
@@ -539,7 +539,7 @@ describe('platform end-to-end with --save', function () {
             expect(pkgJson.dependencies['cordova-android']).toBeDefined();
             expect(pkgJson.dependencies['cordova-browser']).toBeDefined();
             // Android platform should have specific version from add.
-            expect(pkgJson.dependencies['cordova-android']).toEqual('^6.1.0');
+            expect(pkgJson.dependencies['cordova-android']).toEqual('^6.3.0');
 
             var cfg3 = new ConfigParser(configXmlPath);
             engines = cfg3.getEngines();
@@ -549,7 +549,7 @@ describe('platform end-to-end with --save', function () {
             configEngArray = engNames.slice();
             // Check that android and browser were added to config.xml with the correct spec.
             expect(configEngArray.length === 2);
-            expect(engines).toEqual([ { name: 'android', spec: '~6.1.0' }, { name: 'browser',
spec: '~4.1.0' } ]);
+            expect(engines).toEqual([ { name: 'android', spec: '~6.3.0' }, { name: 'browser',
spec: '~5.0.0' } ]);
 
         }).then(fullPlatformList) // Platform should still be in platform ls.
             .then(function () {


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


Mime
View raw message