diff --git a/Gulpfile.js b/Gulpfile.js index cc7eea1a..7a6dcee1 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -635,6 +635,24 @@ gulp.step('test-functional-travis-desktop-osx-and-ms-edge-run', function () { gulp.task('test-functional-travis-desktop-osx-and-ms-edge', gulp.series('build', 'test-functional-travis-desktop-osx-and-ms-edge-run')); +gulp.step('test-functional-osx-safari', function () { + return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.osXDesktopSafari, functionalTestConfig.browserProviderNames.browserstack); +}); + +gulp.step('test-functional-osx-chrome', function () { + return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.osXDesktopChrome, functionalTestConfig.browserProviderNames.browserstack); +}); + +gulp.step('test-functional-osx-firefox', function () { + return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.osXDesktopFirefox, functionalTestConfig.browserProviderNames.browserstack); +}); + +gulp.step('test-functional-ms-edge', function () { + return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.MSEdge, functionalTestConfig.browserProviderNames.browserstack); +}); + +gulp.task('test-functional-prodperfect-desktop-osx-and-ms-edge', gulp.series('build', 'test-functional-osx-chrome')); + gulp.step('test-functional-travis-mobile-run', function () { return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.mobileBrowsers, functionalTestConfig.browserProviderNames.browserstack); }); @@ -647,6 +665,12 @@ gulp.step('test-functional-local-run', function () { gulp.task('test-functional-local', gulp.series('build', 'test-functional-local-run')); +gulp.step('test-functional-local-headless-chrome-run', function () { + return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.localHeadlessChrome); +}); + +gulp.task('test-functional-local-headless-chrome', gulp.series('build', 'test-functional-local-headless-chrome-run')); + gulp.step('test-functional-local-ie-run', function () { return testFunctional('test/functional/fixtures', functionalTestConfig.testingEnvironmentNames.localBrowsersIE); }); diff --git a/test/functional/config.js b/test/functional/config.js index f6015ee5..bcb090d2 100644 --- a/test/functional/config.js +++ b/test/functional/config.js @@ -14,9 +14,14 @@ var testingEnvironmentNames = { localBrowsersIE: 'local-browsers-ie', localBrowsersChromeFirefox: 'local-browsers-chrome-firefox', localBrowsers: 'local-browsers', + localHeadlessChrome: 'local-headless-chrome', localHeadlessBrowsers: 'local-headless-browsers', oldBrowsers: 'old-browsers', - legacy: 'legacy' + legacy: 'legacy', + osXDesktopSafari: 'osx-desktop-safari', + osXDesktopChrome: 'osx-desktop-chrome', + osXDesktopFirefox: 'osx-desktop-firefox', + msEdge: 'ms-edge' }; var testingEnvironments = {}; @@ -57,6 +62,78 @@ testingEnvironments[testingEnvironmentNames.osXDesktopAndMSEdgeBrowsers] = { ] }; +testingEnvironments[testingEnvironmentNames.osXDesktopSafari] = { + jobName: 'functional tests - OS X desktop Safari', + + browserstack: { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY + }, + + browsers: [ + { + os: 'OS X', + osVersion: 'Sierra', + name: 'safari', + alias: 'safari' + } + ] +}; + +testingEnvironments[testingEnvironmentNames.osXDesktopChrome] = { + jobName: 'functional tests - OS X desktop Chrome', + + browserstack: { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY + }, + + browsers: [ + { + os: 'OS X', + osVersion: 'Sierra', + name: 'chrome', + alias: 'chrome-osx' + } + ] +}; + +testingEnvironments[testingEnvironmentNames.osXDesktopFirefox] = { + jobName: 'functional tests - OS X desktop Firefox', + + browserstack: { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY + }, + + browsers: [ + { + os: 'OS X', + osVersion: 'Sierra', + name: 'firefox', + alias: 'firefox-osx' + } + ] +}; + +testingEnvironments[testingEnvironmentNames.MSEdge] = { + jobName: 'functional tests - MS edge', + + browserstack: { + username: process.env.BROWSER_STACK_USERNAME, + accessKey: process.env.BROWSER_STACK_ACCESS_KEY + }, + + browsers: [ + { + os: 'Windows', + osVersion: '10', + name: 'edge', + alias: 'edge', + } + ] +}; + testingEnvironments[testingEnvironmentNames.mobileBrowsers] = { jobName: 'functional tests - mobile browsers', @@ -164,6 +241,19 @@ testingEnvironments[testingEnvironmentNames.localHeadlessBrowsers] = { ] }; +testingEnvironments[testingEnvironmentNames.localHeadlessChrome] = { + isLocalBrowsers: true, + + browsers: [ + { + platform: 'Windows 10', + browserName: 'chrome:headless --no-sandbox', + userAgent: 'headlesschrome', + alias: 'chrome' + } + ] +}; + testingEnvironments[testingEnvironmentNames.oldBrowsers] = { jobName: 'functional tests - ms desktop browsers', diff --git a/test/functional/setup.js b/test/functional/setup.js index 7b0a48ef..68b7f20f 100644 --- a/test/functional/setup.js +++ b/test/functional/setup.js @@ -272,4 +272,3 @@ if (config.useLocalBrowsers && !config.isLegacyEnvironment) { require('./fixtures/api/es-next/take-screenshot/test'); require('./fixtures/screenshots-on-fails/test'); } - diff --git a/test/server/cli-argument-parser-test.js b/test/server/cli-argument-parser-test.js index 77593bce..6e23747f 100644 --- a/test/server/cli-argument-parser-test.js +++ b/test/server/cli-argument-parser-test.js @@ -386,7 +386,7 @@ describe('CLI argument parser', function () { }); it('Should parse command line arguments', function () { - return parse('-r list -S -q -e --hostname myhost --proxy localhost:1234 --proxy-bypass localhost:5678 --qr-code --app run-app --speed 0.5 --debug-on-fail --disable-page-reloads ie test/server/data/file-list/file-1.js') + return parse('-r list -S -q -e --hostname myhost --proxy localhost:1234 --proxy-bypass localhost:5678 --qr-code --app run-app --speed 0.5 --debug-on-fail --disable-page-reloads ie test/server/data/file-list/file-1.js --record-screen-capture') .then(function (parser) { expect(parser.browsers).eql(['ie']); expect(parser.src).eql([path.resolve(process.cwd(), 'test/server/data/file-list/file-1.js')]); @@ -403,6 +403,7 @@ describe('CLI argument parser', function () { expect(parser.opts.proxy).to.be.ok; expect(parser.opts.proxyBypass).to.be.ok; expect(parser.opts.debugOnFail).to.be.ok; + expect(parser.opts.recordScreenCapture).to.be.ok; }); }); @@ -437,7 +438,8 @@ describe('CLI argument parser', function () { { long: '--ssl' }, { long: '--qr-code' }, { long: '--color' }, - { long: '--no-color' } + { long: '--no-color' }, + { long: '--record-screen-capture' } ]; var parser = new CliArgumentParser(''); @@ -449,4 +451,3 @@ describe('CLI argument parser', function () { expect(find(options, EXPECTED_OPTIONS[i])).not.eql(void 0, WARNING); }); }); -