Skip to content

Commit

Permalink
proxyless: update test run glob (#7486)
Browse files Browse the repository at this point in the history
  • Loading branch information
miherlosev authored Feb 3, 2023
1 parent 5e0c96a commit f977b30
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 54 deletions.
41 changes: 11 additions & 30 deletions gulp/constants/functional-test-globs.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,50 +28,31 @@ const DEBUG_GLOB_2 = [
];

const PROXYLESS_TESTS_GLOB = [
...SCREENSHOT_TESTS_GLOB,
'test/functional/fixtures/app-command/test.js',
'test/functional/fixtures/driver/test.js',
'test/functional/fixtures/page-error/test.js',
'test/functional/fixtures/page-js-errors/test.js',
'test/functional/fixtures/api/es-next/disable-reloads/test.js',
'test/functional/fixtures/quarantine/test.js',
'test/functional/fixtures/api/es-next/cookies/test.js',
'test/functional/fixtures/concurrency/test.js',
'test/functional/fixtures/api/es-next/request-hooks/test.js',
'test/functional/fixtures/api/es-next/iframe-switching/test.js',
'test/functional/fixtures/api/es-next/console/test.js',
'test/functional/fixtures/api/es-next/roles/test.js',
'test/functional/fixtures/request-pipeline/**/test.js',
'test/functional/fixtures/hammerhead/worker/test.js',
'test/functional/fixtures/api/es-next/native-dialogs-handling/test.js',
'test/functional/fixtures/api/es-next/native-dialogs-handling/iframe/test.js',
'test/functional/fixtures/page-js-errors/test.js',
'test/functional/fixtures/api/es-next/click/test.js',
'test/functional/fixtures/api/es-next/assertions/test.js',
'test/functional/fixtures/api/es-next/browser-info/test.js',
'test/functional/fixtures/api/es-next/client-function/test.js',
'test/functional/fixtures/api/es-next/compiler-options/test.js',
'test/functional/fixtures/api/es-next/execution-timeout/test.js',
'test/functional/fixtures/api/es-next/generic-errors/test.js',
'test/functional/fixtures/api/es-next/global-hooks/test.js',
'test/functional/fixtures/api/es-next/hooks/test.js',
'test/functional/fixtures/api/es-next/auth/test.js',
'test/functional/fixtures/regression/**/test.js',
...TESTS_GLOB,
'!test/functional/fixtures/ui/test.js',
'!test/functional/fixtures/browser-provider/browser-reconnect/test.js',
'!test/functional/fixtures/browser-provider/job-reporting/test.js',
'!test/functional/fixtures/driver/script-execution-barrier/test.js',
'!test/functional/fixtures/run-options/request-timeout/test.js',
'!test/functional/fixtures/run-options/disable-page-caching/test.js',
'!test/functional/fixtures/live/test.js',
'!test/functional/fixtures/api/es-next/navigate-to-and-test-page/test.js',
'!test/functional/fixtures/api/es-next/request/test.js',
'!test/functional/fixtures/regression/gh-1138/test.js',
'!test/functional/fixtures/regression/gh-1311/test.js',
'!test/functional/fixtures/regression/gh-1388/test.js',
'!test/functional/fixtures/regression/gh-1521/test.js',
'!test/functional/fixtures/regression/gh-1846/test.js',
'!test/functional/fixtures/regression/gh-2546/test.js',
'!test/functional/fixtures/regression/gh-2601/test.js',
'!test/functional/fixtures/hammerhead/gh-2622/test.js',
'!test/functional/fixtures/regression/gh-2861/test.js',
'!test/functional/fixtures/regression/gh-3127/test.js',
'!test/functional/fixtures/regression/gh-423/test.js',
'!test/functional/fixtures/regression/gh-5447/test.js',
'!test/functional/fixtures/regression/gh-5886/test.js',
'!test/functional/fixtures/regression/gh-664/test.js',
'!test/functional/fixtures/regression/hammerhead/gh-2350/test.js',
'test/functional/fixtures/api/es-next/custom-client-scripts/test.js',
];

module.exports = {
Expand Down
5 changes: 3 additions & 2 deletions test/functional/fixtures/api/es-next/drag/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const expect = require('chai').expect;
const { skipInProxyless } = require('../../../../utils/skip-in');
const { expect } = require('chai');


describe('[API] Drag actions', function () {
Expand Down Expand Up @@ -136,7 +137,7 @@ describe('[API] Drag actions', function () {
return runTests('./testcafe-fixtures/drag-and-drop-test.js', 'try to drop to undroppable', { skip: ['iphone', 'ipad', 'android'] });
});

it('Should reproduce native browser behavior', function () {
skipInProxyless('Should reproduce native browser behavior', function () {
return runTests('./testcafe-fixtures/drag-and-drop-test.js', 'drag link and image', { only: ['chrome'] });
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const expect = require('chai').expect;
const { expect } = require('chai');

describe('[API] t.navigateTo', function () {
it('Should validate the url argument', function () {
Expand Down
4 changes: 3 additions & 1 deletion test/functional/fixtures/api/es-next/scroll/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
describe('Scroll', () => {
const { skipDescribeInProxyless } = require('../../../../utils/skip-in');

skipDescribeInProxyless('Scroll', () => {
it('Should raise events for scroll', () => {
return runTests('./testcafe-fixtures/raise-events.js');
});
Expand Down
7 changes: 4 additions & 3 deletions test/functional/fixtures/api/es-next/upload/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const { expect } = require('chai');
const path = require('path');
const { expect } = require('chai');
const path = require('path');
const { skipInProxyless } = require('../../../../utils/skip-in');

describe('[API] Upload', function () {
describe('t.setFilesToUpload', function () {
it('Should upload the specified file', function () {
skipInProxyless('Should upload the specified file', function () {
return runTests('./testcafe-fixtures/upload-test.js', 'Upload the file', { only: 'chrome' });
});

Expand Down
11 changes: 6 additions & 5 deletions test/functional/fixtures/api/json/test.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const { expect } = require('chai');
const path = require('path');
const { expect } = require('chai');
const path = require('path');
const { skipInProxyless } = require('../../../utils/skip-in');

describe('[API] DevTools Compiler', function () {
it('Should make click on a button', function () {
return runTests('./testcafe-fixtures/click-test.json', null, { only: 'chrome' });
});

it('Should make hover on a button', function () {
skipInProxyless('Should make hover on a button', function () {
return runTests('./testcafe-fixtures/hover-test.json', null, { only: 'chrome' });
});

Expand Down Expand Up @@ -57,7 +58,7 @@ describe('[API] DevTools Compiler', function () {
return runTests('./testcafe-fixtures/wait-for-element-test.json', null, { only: 'chrome' });
});

it('Should switch to iframe', function () {
skipInProxyless('Should switch to iframe', function () {
return runTests('./testcafe-fixtures/iframe-test.json', null, { only: 'chrome' });
});

Expand All @@ -79,7 +80,7 @@ describe('[API] DevTools Compiler', function () {
});
});

it('Should click inside shadow DOM', function () {
skipInProxyless('Should click inside shadow DOM', function () {
return runTests('./testcafe-fixtures/shadow-dom-test.json', null, {
only: 'chrome',
shouldFail: true,
Expand Down
9 changes: 5 additions & 4 deletions test/functional/fixtures/api/raw/upload/test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
const expect = require('chai').expect;
const errorInEachBrowserContains = require('../../../../assertion-helper.js').errorInEachBrowserContains;
const { skipInProxyless } = require('../../../../utils/skip-in');
const { expect } = require('chai');
const { errorInEachBrowserContains } = require('../../../../assertion-helper.js');


describe('[Raw API] Upload', function () {
it('Should upload a file', function () {
skipInProxyless('Should upload a file', function () {
return runTests('./testcafe-fixtures/upload.testcafe', 'Upload a file', { shouldFail: true })
.catch(function (errs) {
errorInEachBrowserContains(errs, 'File uploaded', 0);
Expand All @@ -25,7 +26,7 @@ describe('[Raw API] Upload', function () {
});
});

it('Should upload files', function () {
skipInProxyless('Should upload files', function () {
return runTests('./testcafe-fixtures/upload.testcafe', 'Upload files', { shouldFail: true })
.catch(function (errs) {
errorInEachBrowserContains(errs, 'Files uploaded', 0);
Expand Down
9 changes: 5 additions & 4 deletions test/functional/fixtures/proxy/test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const os = require('os');
const expect = require('chai').expect;
const os = require('os');
const { expect } = require('chai');
const { skipInProxyless } = require('../../utils/skip-in');

const TRUSTED_PROXY_URL = os.hostname() + ':3004';
const TRANSPARENT_PROXY_URL = os.hostname() + ':3005';
Expand All @@ -10,7 +11,7 @@ describe('Using external proxy server', function () {
return runTests('testcafe-fixtures/index.test.js', null, { useProxy: TRANSPARENT_PROXY_URL });
});

it('Should open restricted page via trusted proxy server', function () {
skipInProxyless('Should open restricted page via trusted proxy server', function () {
return runTests('testcafe-fixtures/restricted-page.test.js', null, { useProxy: TRUSTED_PROXY_URL });
});
});
Expand Down Expand Up @@ -39,7 +40,7 @@ describe('Using proxy-bypass', function () {
});
});

it('Should open page without proxy but get resource with proxy', function () {
skipInProxyless('Should open page without proxy but get resource with proxy', function () {
const http = require('http');

const server = http.createServer(function (req, res) {
Expand Down
9 changes: 5 additions & 4 deletions test/functional/fixtures/reporter/test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const expect = require('chai').expect;
const { expect } = require('chai');
const fs = require('fs');
const generateReporter = require('./reporter');
const { createReporter } = require('../../utils/reporter');
Expand All @@ -7,6 +7,7 @@ const ReporterPluginMethod = require('../../../../lib/reporter/plugin-metho
const assertionHelper = require('../../assertion-helper.js');
const path = require('path');
const config = require('../../config');
const { skipInProxyless } = require('../../utils/skip-in');

const {
createSimpleTestStream,
Expand Down Expand Up @@ -945,7 +946,7 @@ const experimentalDebug = !!process.env.EXPERIMENTAL_DEBUG;
});
}

it('Should get warning for request hook', async () => {
skipInProxyless('Should get warning for request hook', async () => {
await runTests('./testcafe-fixtures/failed-cors-validation.js', 'Failed CORS validation', {
only: 'chrome',
reporter,
Expand Down Expand Up @@ -1162,7 +1163,7 @@ const experimentalDebug = !!process.env.EXPERIMENTAL_DEBUG;
});
});

it('Should raise an error when uncaught exception occurred in any reporter method', async () => {
skipInProxyless('Should raise an error when uncaught exception occurred in any reporter method', async () => {
function createReporterWithBrokenMethod (method) {
const base = {
async reportTaskStart () {},
Expand Down Expand Up @@ -1211,7 +1212,7 @@ const experimentalDebug = !!process.env.EXPERIMENTAL_DEBUG;
});
});

it('Should set options _hasTaskErrors to the runner if an error occurs', async () => {
skipInProxyless('Should set options _hasTaskErrors to the runner if an error occurs', async () => {
try {
await runTests('testcafe-fixtures/index-test.js', 'Simple command err test', { only: ['chrome'], shouldFail: true });
}
Expand Down

0 comments on commit f977b30

Please sign in to comment.