Skip to content
This repository was archived by the owner on Jun 10, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions Gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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);
});
Expand Down
92 changes: 91 additions & 1 deletion test/functional/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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',

Expand Down Expand Up @@ -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',

Expand Down
1 change: 0 additions & 1 deletion test/functional/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,3 @@ if (config.useLocalBrowsers && !config.isLegacyEnvironment) {
require('./fixtures/api/es-next/take-screenshot/test');
require('./fixtures/screenshots-on-fails/test');
}

7 changes: 4 additions & 3 deletions test/server/cli-argument-parser-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')]);
Expand All @@ -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;
});
});

Expand Down Expand Up @@ -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('');
Expand All @@ -449,4 +451,3 @@ describe('CLI argument parser', function () {
expect(find(options, EXPECTED_OPTIONS[i])).not.eql(void 0, WARNING);
});
});