Repository: cordova-windows Updated Branches: refs/heads/master 826670cc5 -> 92a298a31
CB-10480 Remove Windows 8 template from cordova-windows Updated the tests Project: http://git-wip-us.apache.org/repos/asf/cordova-windows/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-windows/commit/92a298a3 Tree: http://git-wip-us.apache.org/repos/asf/cordova-windows/tree/92a298a3 Diff: http://git-wip-us.apache.org/repos/asf/cordova-windows/diff/92a298a3 Branch: refs/heads/master Commit: 92a298a3189ce8ce9fe6973b49dbdc777835a62b Parents: 5f15c5e Author: daserge <[email protected]> Authored: Wed Feb 3 10:53:36 2016 +0300 Committer: daserge <[email protected]> Committed: Wed Feb 3 10:53:47 2016 +0300 ---------------------------------------------------------------------- spec/unit/build.spec.js | 12 +++++++++--- spec/unit/package.spec.js | 35 +++++++++++++++++++---------------- spec/unit/run.spec.js | 6 +++--- 3 files changed, 31 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/92a298a3/spec/unit/build.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/build.spec.js b/spec/unit/build.spec.js index 28b4b2f..3105906 100644 --- a/spec/unit/build.spec.js +++ b/spec/unit/build.spec.js @@ -249,8 +249,9 @@ describe('run method', function() { }); }); - it('spec.8 should call buildProject of MSBuildTools if built with MSBuildTools version 4.0', function(done) { - var buildSpy = jasmine.createSpy(); + it('spec.8 should fail buildProject if built with MSBuildTools version 4.0', function(done) { + var buildSpy = jasmine.createSpy(), + errorSpy = jasmine.createSpy(); build.__set__('utils.isCordovaProject', isCordovaProjectTrue); createFindAllAvailableVersionsMock([{version: '4.0', buildProject: buildSpy, path: testPath }]); @@ -258,8 +259,13 @@ describe('run method', function() { createConfigParserMock('8.0'); build.run({argv: ['--win']}) + .fail(function(error) { + errorSpy(); + expect(error).toBeDefined(); + }) .finally(function() { - expect(buildSpy).toHaveBeenCalled(); + expect(errorSpy).toHaveBeenCalled(); + expect(buildSpy).not.toHaveBeenCalled(); done(); }); }); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/92a298a3/spec/unit/package.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/package.spec.js b/spec/unit/package.spec.js index 6eeea4c..ac604b2 100644 --- a/spec/unit/package.spec.js +++ b/spec/unit/package.spec.js @@ -44,16 +44,19 @@ describe('getPackage method', function() { shell.cp('-R', testPkgPath, pkgRoot); }); - it('spec.1 should find windows 8.0 anycpu debug package', function(done) { + it('spec.1 should find windows anycpu debug package', function(done) { var rejected = jasmine.createSpy(); - pkg.getPackage('windows80', 'debug', 'anycpu') + pkg.getPackage('windows', 'debug', 'anycpu') .then(function(pkgInfo) { - expect(pkgInfo.type).toBe('windows80'); + expect(pkgInfo.type).toBe('windows'); expect(pkgInfo.buildtype).toBe('debug'); expect(pkgInfo.arch).toBe('anycpu'); expect(pkgInfo.script).toBeDefined(); - }, rejected) + }, function(err) { + console.error(err); + rejected(); + }) .finally(function() { expect(rejected).not.toHaveBeenCalled(); done(); @@ -76,10 +79,10 @@ describe('getPackage method', function() { }); }); - it('spec.3 should not find windows anycpu debug package', function(done) { + it('spec.3 should not find windows 10 anycpu debug package', function(done) { var resolved = jasmine.createSpy(); - pkg.getPackage('windows', 'debug', 'anycpu') + pkg.getPackage('windows10', 'debug', 'anycpu') .then(resolved) .finally(function() { expect(resolved).not.toHaveBeenCalled(); @@ -87,10 +90,10 @@ describe('getPackage method', function() { }); }); - it('spec.4 should not find windows 8.0 anycpu release package', function(done) { + it('spec.4 should not find windows anycpu release package', function(done) { var resolved = jasmine.createSpy(); - pkg.getPackage('windows80', 'release', 'anycpu') + pkg.getPackage('windows', 'release', 'anycpu') .then(resolved) .finally(function() { expect(resolved).not.toHaveBeenCalled(); @@ -98,10 +101,10 @@ describe('getPackage method', function() { }); }); - it('spec.5 should not find windows 8.0 x86 debug package', function(done) { + it('spec.5 should not find windows x86 debug package', function(done) { var resolved = jasmine.createSpy(); - pkg.getPackage('windows80', 'debug', 'x86') + pkg.getPackage('windows', 'debug', 'x86') .then(resolved) .finally(function() { expect(resolved).not.toHaveBeenCalled(); @@ -124,20 +127,20 @@ describe('getPackageFileInfo method', function() { expect(pkgInfo.buildtype).toBe('debug'); }); - it('spec.7 should get file info correctly for windows 8.0 anycpu debug package', function() { - var packageFile = path.join(pkgPath, 'CordovaApp.Windows80_0.0.1.0_anycpu_debug_Test', 'CordovaApp.Windows80_0.0.1.0_anycpu_debug.appx'); + it('spec.7 should get file info correctly for windows 8.1 anycpu debug package', function() { + var packageFile = path.join(pkgPath, 'CordovaApp.Windows_0.0.1.0_anycpu_debug_Test', 'CordovaApp.Windows_0.0.1.0_anycpu_debug.appx'); var pkgInfo = pkg.getPackageFileInfo(packageFile); - expect(pkgInfo.type).toBe('windows80'); + expect(pkgInfo.type).toBe('windows'); expect(pkgInfo.arch).toBe('anycpu'); expect(pkgInfo.buildtype).toBe('debug'); }); - it('spec.8 should get file info correctly for windows 8.0 x64 release package', function() { - var packageFile = path.join(pkgPath, 'CordovaApp.Windows80_0.0.1.0_x64_Test', 'CordovaApp.Windows80_0.0.1.0_x64.appx'); + it('spec.8 should get file info correctly for windows 8.1 x64 release package', function() { + var packageFile = path.join(pkgPath, 'CordovaApp.Windows_0.0.1.0_x64_Test', 'CordovaApp.Windows_0.0.1.0_x64.appx'); var pkgInfo = pkg.getPackageFileInfo(packageFile); - expect(pkgInfo.type).toBe('windows80'); + expect(pkgInfo.type).toBe('windows'); expect(pkgInfo.arch).toBe('x64'); expect(pkgInfo.buildtype).toBe('release'); }); http://git-wip-us.apache.org/repos/asf/cordova-windows/blob/92a298a3/spec/unit/run.spec.js ---------------------------------------------------------------------- diff --git a/spec/unit/run.spec.js b/spec/unit/run.spec.js index 179c4a7..5a2cbd7 100644 --- a/spec/unit/run.spec.js +++ b/spec/unit/run.spec.js @@ -183,7 +183,7 @@ describe('run method', function() { run.__set__('build.run', function () { build(); var buildResult = { - type : 'windows80', + type : 'windows', arch : 'anycpu', archs : ['anycpu'], buildtype : 'release', @@ -195,7 +195,7 @@ describe('run method', function() { }); run.__set__('packages.getPackage', function () { return Q({ - type: 'windows80', + type: 'windows', file: 'testfile' }); }); @@ -228,7 +228,7 @@ describe('run method', function() { }); run.__set__('packages.getPackage', function () { return Q({ - type: 'windows80', + type: 'windows', file: 'testfile' }); }); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
