Comments (5)
We cannot .use in void
I know, just suggesting an idea.
I found out that this does work:
test.extend({ fixture: 'some fixture' })('some test', async ({ fixture }) => {
// test
});
On runtime it works, but it gives TS errors. And of course is also quite ugly.
from playwright.
It would be interesting if you could attach use
like this:
test('some test', async ({ fixture }) => {
// test
}).use({
fixture: 'some fixture'
})
from playwright.
.use({ fixture: 'some fixture' })
We cannot .use in void
from playwright.
The original issue refers to the Cannot use({ headless }) in a describe group, because it forces a new worker
error. For the fixtures that force new workers (run browsers in a different mode), this will remain to be a hard limitation. You can't have headed and headless tests in the same file.
As for the .use on a test level, please use anonymous describes to wrap those tests and define use
. As use refers to the scope and is not chained, that's the only way we'll support it.
from playwright.
@pavelfeldman
Can you comment if this is expected to work:
test.extend({ viewport: someViewport })('some test', async ({ fixture }) => {
// test
});
it does work, but it gives TS errors
from playwright.
Related Issues (20)
- [Bug]: When using the Clock API, errors appear in the browser console.
- File Download With Playwright on Selenium Grid(With Java) HOT 2
- Driver not found: /home/site/wwwroot/bin/Debug/.playwright/node/linux-x64/node HOT 2
- [Feature]: Customized Report HOT 4
- [Feature]: Support Firebase IndexedDB for automated login HOT 1
- [Bug]: Storagestate is not working in GithubActions HOT 7
- [Bug]: SSL errors on MacOS localhost connection even after specifying ignoreHTTPSErrors: true HOT 4
- [internal] [playwright-test] › babel.spec.ts:135:5 › should not transform external is failing
- [Bug]: Incorrect Output is received HOT 2
- [Feature]: Add an option to --last-failed to attach the test results to the last test report HOT 1
- [Feature]: Vision Deficiency Simulation Support (Chrome) HOT 1
- [Bug]: Run Select Configuration Not Showing Any Browsers HOT 2
- Delete please
- [Feature]: chrome://flags or IPV6/IPV4 control HOT 1
- [Feature]: Add 'retryDelayInMs' Property to API Requests HOT 1
- [Question] Why upload a file larger then 50Mb is forbidden when upgrading to v1.40.0, I was using launchPersistentContext(), with options: channel: 'chrome'. HOT 1
- [Bug]: Unable to launch Chrome and Firefox in Incognito mode HOT 1
- [Bug]: UI client uses wrong path separator
- [Bug]: Chromium/Chrome Managed Policies Not Supported HOT 1
- [Feature]: HTTP status code constants
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 playwright.