Skip to content

Commit

Permalink
update the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bayheck committed May 19, 2024
1 parent 84c9e3b commit 7c6b9a5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 0 additions & 1 deletion .github/workflows/test-functional-local-edge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ jobs:
with:
os: 'windows-latest'
test-script: 'npx gulp test-functional-local-headless-edge-run --steps-as-tasks'
timeout: 40
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if (config.useLocalBrowsers) {
const BROWSER_OPENING_DELAY = 4000;

let mockProvider = null;
const needSkip = config.hasBrowser('edge');

const mockProviderPlugin = Object.assign({}, chromeBrowserProvider, {
state: {},
Expand Down Expand Up @@ -110,7 +111,7 @@ if (config.useLocalBrowsers) {
});
});

it.skip('Should report job error to the providers', () => {
(needSkip ? it.skip : it)('Should report job error to the providers', () => {
return run(['chrome --failed-1', 'chrome --id-2'], './testcafe-fixtures/long-test.js')
.then(() => {
throw new Error('Promise rejection expected');
Expand Down
10 changes: 6 additions & 4 deletions test/functional/fixtures/regression/gh-2011/test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const path = require('path');
const createTestCafe = require('../../../../../lib');
const config = require('../../../config');
const { createReporter } = require('../../../utils/reporter');
const { expect } = require('chai');

let testCafe = null;
let runner = null;
let errors = null;
let testCafe = null;
let runner = null;
let errors = null;
const needSkip = config.hasBrowser('edge');

const reporter = createReporter({
reportTestDone (_, testRunInfo) {
Expand Down Expand Up @@ -35,7 +37,7 @@ const run = (pathToTest, concurrency) => {
});
};

describe.skip('[Regression](GH-2011)', function () {
(needSkip ? describe.skip : describe)('[Regression](GH-2011)', function () {

it('Should execute all fixture\'s test with disableConcurrency in one browser', function () {
return run('./testcafe-fixtures/concurrency-mode-with-disable-concurrency-fixture-test.js', 3)
Expand Down
1 change: 1 addition & 0 deletions test/functional/fixtures/regression/gh-2568/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const expect = require('chai').expect;

function removeWhitespaces (str) {
if (!str) return '';
return str.replace(/\s+|\n/g, ' ').trim();
}

Expand Down

0 comments on commit 7c6b9a5

Please sign in to comment.