Comments (6)
Ok fixed. The solution described above was correct I only had to do test in series instead of parallel.
This can be closed but I suggest to add an example on docs with the createBrowserContext like this.
Thanks again for the support given so far 🙏🏼
from web.
This might be the way, can you play with it?
// @web/test-runner-playwright/src/PlaywrightLauncher.ts
export type CreateBrowserContextFn = (args: CreateArgs) => BrowserContext | Promise<BrowserContext>;
export class PlaywrightLauncher implements BrowserLauncher {
// ...
private createBrowserContextFn: CreateBrowserContextFn;
// ...
}
You can pass it via playwrightLauncher
argument { createBrowserContext }
.
from web.
Thanks for the hint:
function createBrowserContext({ browser, config }) {
// ignore HTTPS errors
const context = browser.newContext({
ignoreHTTPSErrors: true
})
return context
}
....
export default {
// https://modern-web.dev/docs/test-runner/browser-launchers/playwright/#testing-multiple-browsers
// Requires: @web/test-runner-playwright
browsers: [
playwrightLauncher({
product: 'chromium', createBrowserContext
}), // { headless: false, devtools: true } }),
playwrightLauncher({ product: 'firefox', createBrowserContext }),
playwrightLauncher({ product: 'webkit', createBrowserContext }),
],
....
This actually works for chromium but not for firefox and webkit, will do some more tests to dfind out how to make others working
from web.
It should work also for firefox and webkit based on docs but I them are not working as expected.... any other hint?
from web.
Ok fixed. The solution described above was correct I only had to do test in series instead of parallel.
did you have to set "concurrent: 1"? if so, then it might be related to a recent change in Chrome which cuts resources in inactive tabs, which are heavily used by WTR, so that many tests don't work in there
that's another issue which we don't have a solution for, so we recommend for now to disable concurrency
from web.
Nope I simply had to wait for ws tests to end before running wss tests, at start I was just starting both one after the other:
https://github.com/mqttjs/MQTT.js/blob/main/test/browser/test.js#L60
Tests are passing: https://github.com/mqttjs/MQTT.js/actions/runs/6782443335/job/18434666671#step:6:33 🎉
from web.
Related Issues (20)
- Web Test Runner terminates randomly without logs HOT 5
- Including/excluding files from coverage based on source path HOT 2
- Tree shaken content shows up as tested in code coverage
- [dev-server-rollup] TypeError: Cannot destructure property 'skipSelf' of 'options' as it is undefined.
- [dev-server] [CVE-2023-42282] Update "ip" package to >=2.0.0 HOT 1
- Error when executing test "Failed to fetch dynamically imported module" HOT 5
- Used Puppeteer version is deprecated HOT 1
- [test-runner] Specifying the root directory of non-script assets HOT 1
- [dev-server-storybook]: distribution filenames with problematic `--` as the first characters HOT 1
- [Server] Mutating source files resulting in them being invalid
- Web development
- Getting websocket error with @web/test-runner-visual-regression HOT 3
- Error while reading source maps
- Support for monorepo build is missing in @web/dev-server-storybook HOT 1
- Built files have '__wds-outside-root__' added to the name even though they are compiled and in the same source tree
- Era
- Accessibility Tab in Storybook builder is not working HOT 3
- Allow passing custom arguments to CLI HOT 1
- mergeConfigs should merge objects recursively HOT 1
- Cannot find module web-dev-server.config.mjs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from web.