diff --git a/package-lock.json b/package-lock.json index e2cf0231d63..d47f513b77e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -92,7 +92,7 @@ "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", "testcafe-browser-tools": "2.0.26", - "testcafe-hammerhead": "31.7.5", + "testcafe-hammerhead": "https://github.com/Bayheck/Builds/raw/main/testcafe-hammerhead-31.7.5.tgz", "testcafe-legacy-api": "5.1.8", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.2.0", @@ -15522,8 +15522,9 @@ }, "node_modules/testcafe-hammerhead": { "version": "31.7.5", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.7.5.tgz", - "integrity": "sha512-XnDtvrpiwoxMPhC9A3eFOPeE0erDF0iae5t23yaYB4lVQCRuEoNfg5Lv4vGvDhbJ2n2fpzOre4Lhvz12mac0tw==", + "resolved": "https://github.com/Bayheck/Builds/raw/main/testcafe-hammerhead-31.7.5.tgz", + "integrity": "sha512-eMULfZnDsv4+2Pl6VxBFenJ0gBnAvYkOSTDy92BozwwtlEVYMJqrD1nzEOsBX8Cl0imUBetNVcknwbDIgeO3Zg==", + "license": "MIT", "dependencies": { "@adobe/css-tools": "^4.3.0-rc.1", "@electron/asar": "^3.2.3", @@ -28706,9 +28707,8 @@ } }, "testcafe-hammerhead": { - "version": "31.7.5", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.7.5.tgz", - "integrity": "sha512-XnDtvrpiwoxMPhC9A3eFOPeE0erDF0iae5t23yaYB4lVQCRuEoNfg5Lv4vGvDhbJ2n2fpzOre4Lhvz12mac0tw==", + "version": "https://github.com/Bayheck/Builds/raw/main/testcafe-hammerhead-31.7.5.tgz", + "integrity": "sha512-eMULfZnDsv4+2Pl6VxBFenJ0gBnAvYkOSTDy92BozwwtlEVYMJqrD1nzEOsBX8Cl0imUBetNVcknwbDIgeO3Zg==", "requires": { "@adobe/css-tools": "^4.3.0-rc.1", "@electron/asar": "^3.2.3", diff --git a/package.json b/package.json index 5b29cbaf07c..442c3566a3d 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", "testcafe-browser-tools": "2.0.26", - "testcafe-hammerhead": "31.7.5", + "testcafe-hammerhead": "https://github.com/Bayheck/Builds/raw/main/testcafe-hammerhead-31.7.5.tgz", "testcafe-legacy-api": "5.1.8", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.2.0", diff --git a/test/functional/fixtures/hammerhead/gh-3046/pages/index.html b/test/functional/fixtures/hammerhead/gh-3046/pages/index.html new file mode 100644 index 00000000000..b8ea2f9284f --- /dev/null +++ b/test/functional/fixtures/hammerhead/gh-3046/pages/index.html @@ -0,0 +1,20 @@ + + + + + Worker + + +

Worker With Modules

+ + + + + diff --git a/test/functional/fixtures/hammerhead/gh-3046/pages/worker.js b/test/functional/fixtures/hammerhead/gh-3046/pages/worker.js new file mode 100644 index 00000000000..39a7c345e7b --- /dev/null +++ b/test/functional/fixtures/hammerhead/gh-3046/pages/worker.js @@ -0,0 +1 @@ +onmessage = () => postMessage(100); diff --git a/test/functional/fixtures/hammerhead/gh-3046/test.js b/test/functional/fixtures/hammerhead/gh-3046/test.js new file mode 100644 index 00000000000..4b1106b755a --- /dev/null +++ b/test/functional/fixtures/hammerhead/gh-3046/test.js @@ -0,0 +1,5 @@ +describe('Worker module type', function () { + it('Should not break due to importScripts with module workers', function () { + return runTests('testcafe-fixtures/index.js', null); + }); +}); diff --git a/test/functional/fixtures/hammerhead/gh-3046/testcafe-fixtures/index.js b/test/functional/fixtures/hammerhead/gh-3046/testcafe-fixtures/index.js new file mode 100644 index 00000000000..291246f81a4 --- /dev/null +++ b/test/functional/fixtures/hammerhead/gh-3046/testcafe-fixtures/index.js @@ -0,0 +1,12 @@ +import { Selector } from 'testcafe'; + +fixture `Worker` + .page `http://localhost:3000/fixtures/hammerhead/gh-3046/pages/index.html`; + +test('Should not break due to importScripts with module workers', async t => { + await t.expect(Selector('#out').textContent).eql(''); + await t.debug(); + await t.click(Selector('#btn')); + await t.debug(); + await t.expect(Selector('#out').textContent).eql('100'); +});