Open
Description
What is your Scenario?
This error happens only when running testcafe firefox
UI tests. testcafe chrome
tests pass without errors.
Corresponding issue guybedford/es-module-shims#494 has been opened in es-module-shims repository.
What is the Current behavior?
The page tries to load invalid URL https://local.my-page.com/vendor/js/y (there is no "y" folder or file there) after "Multiple import maps are not allowed" warning is displayed in the browser's console:
Multiple import maps are not allowed. hammerhead.js line 43250 > eval:16901:32
GET http://192.168.1.99:42205/0dp5G64Rf!s/https://local.my-page.com/vendor/js/y NS_ERROR_CORRUPTED_CONTENT
What is the Expected behavior?
I would expect no errors.
What is your public website URL? (or attach your complete example)
The page contains only one importmap:
<head>
<script src="https://ga.jspm.io/npm:[email protected]/dist/es-module-shims.js" async="async"></script>
<script type="importmap">
{
"imports": {
"https://cdn.example.com/my-js.js": "https://cdn.example.com/my-js.js?v=1"
}
}
</script>
</head>
What is your TestCafe test code?
import { Selector } from 'testcafe';
fixture ('Fixture');
test('test', async t => {
await t
.debug() // The error happens when the page loads
.navigateTo('https://example.com');
});
Your complete configuration file
const fs = require('fs');
const TestCafeModule = {
cache: true,
quarantineMode: false,
stopOnFirstFail: true,
disableNativeAutomation: false,
videoPath: null,
videoOptions: null,
reporter: 'spec-time',
};
module.exports = TestCafeModule;
Your complete test report
No response
Screenshots
No response
Steps to Reproduce
- Create a page that load
es-module-shims.js
and contains<script type="importmap">
. - Create a test that loads such a page.
- Run
testcafe firefox
.
TestCafe version
3.7.2
Node.js version
v18.16.1
Command-line arguments
testcafe firefox
Browser name(s) and version(s)
Firefox 136.0
Platform(s) and version(s)
Ubuntu 20.04 LTS
Other
No response