This is an automated email from the ASF dual-hosted git repository. janpio pushed a commit to branch janpio-CB-13829 in repository https://gitbox.apache.org/repos/asf/cordova-windows.git
commit 5fa5ebb43ba4226d94448dada438bfef4f049639 Author: Jan Piotrowski <[email protected]> AuthorDate: Thu Jan 25 19:12:16 2018 +0100 more tests fixed --- spec/e2e/endtoend.spec.js | 51 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/spec/e2e/endtoend.spec.js b/spec/e2e/endtoend.spec.js index 49484ea..ec58952 100644 --- a/spec/e2e/endtoend.spec.js +++ b/spec/e2e/endtoend.spec.js @@ -34,7 +34,7 @@ describe('Cordova create and build', function () { var buildDirectory = path.join(__dirname, '../..'); var appPackagesFolder = path.join(buildDirectory, projectFolder, 'AppPackages'); var buildScriptPath = '"' + path.join(buildDirectory, projectFolder, 'cordova', 'build') + '"'; - var silent = true; + var silent = false; function verifySubDirContainsFile (subDirName, fileName) { var subDir = path.join(appPackagesFolder, subDirName); @@ -98,24 +98,45 @@ describe('Cordova create and build', function () { // --archs - it('spec.3 should build project for particular CPU', function () { + it('spec.3a should build project for particular CPU', function () { shell.exec(buildScriptPath + ' --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */ - var packages = shell.ls(appPackagesFolder); - expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Windows.*x64.*\.appx.*/); }).length).toBe(1); + _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x64_debug.appx'); + }); + + it('spec.3b should build project for particular CPU', function () { + shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */ + _expectExist(/.*Phone.*x64.*\.appxupload/); + _expectExist(/.*Windows.*x64.*\.appxupload/); }); - it('spec.4 should build project for CPUs separated by whitespaces', function () { + it('spec.3c should build project for particular CPU', function () { + shell.exec(buildScriptPath + ' --appx=8.1-win --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */ + _expectExist(/.*Windows.*x64.*\.appxupload/); + }); + + it('spec.3d should build project for particular CPU', function () { + shell.exec(buildScriptPath + ' --appx=8.1-phone --archs=\"x64\"', {silent: silent}); /* eslint no-useless-escape : 0 */ + _expectExist(/.*Phone.*x64.*\.appxupload/); + }); + + it('spec.4a should build project for CPUs separated by whitespaces', function () { shell.exec(buildScriptPath + ' --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */ - var packages = shell.ls(appPackagesFolder); - expect(packages.filter(function (file) { return file.match(/.*Phone.*x86.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Phone.*x64.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Phone.*arm.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Phone.*AnyCPU.*\.appx.*/i); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Windows.*x64.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Windows.*x86.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Windows.*arm.*\.appx.*/); }).length).toBe(1); - expect(packages.filter(function (file) { return file.match(/.*Windows.*anycpu.*\.appx.*/i); }).length).toBe(1); + _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x64_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x64_debug.appx'); + _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_x86_debug_Test', 'CordovaApp.Windows10_1.0.0.0_x86_debug.appx'); + _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_arm_debug_Test', 'CordovaApp.Windows10_1.0.0.0_arm_debug.appx'); + _expectSubdirAndFileExist('CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test', 'CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx'); + }); + + it('spec.4b should build project for CPUs separated by whitespaces', function () { + shell.exec(buildScriptPath + ' --appx=8.1 --archs=\"x64 x86 arm anycpu\"', {silent: silent}); /* eslint no-useless-escape : 0 */ + _expectExist(/.*Phone.*x86.*\.appxupload/); + _expectExist(/.*Phone.*x64.*\.appxupload/); + _expectExist(/.*Phone.*arm.*\.appxupload/); + _expectExist(/.*Phone.*AnyCPU.*\.appxupload/i); + _expectExist(/.*Windows.*x64.*\.appxupload/); + _expectExist(/.*Windows.*x86.*\.appxupload/); + _expectExist(/.*Windows.*arm.*\.appxupload/); + _expectExist(/.*Windows.*anycpu.*\.appxupload/i); }); // "InProcessServer extension" -- To stop receiving notification emails like this one, please contact [email protected]. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
