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)
- [internal] improve react code in UI mode, trace viewer and html report HOT 3
- [Feature]: expect.toPass failure output should include last inner error output HOT 2
- [Bug]: Control border not fully visible with headless false (Firefox) HOT 5
- Unable to launch the browser on aws lambda even though the browser launch works fine on same image of docker on local machine HOT 2
- How to get Annotations to display in Azure test results HOT 1
- [Feature]: WaitForCondition Should Return Result As Boolean HOT 1
- [Bug]: `getByLabel` only matches element labelled by first label found when `id` is repeated HOT 3
- [Bug]: `getByRole` doesn't match properly with multiple exact labels with the same `id` HOT 3
- Is there a way to turn off videos on any specs in a certain folder? HOT 3
- "Error: locator.click: Target page, context or browser has been closed". in 2nd iteration in typescript HOT 1
- page.selectOption: TypeError: element.tagName.toUpperCase is not a function HOT 2
- [Docs]: Manual installation steps HOT 1
- [Feature]: Get the current actived page. HOT 1
- [Bug]: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /var/task/playwright/driver/node) HOT 1
- [Bug]:When trying to automate adding link to quill editor the popup disappeared after clicking on ql link button however it is working fine in normal way HOT 1
- Is it possible to record videos only on failure for Electron app? Tried all options from the doc, but it didn't work HOT 1
- [Bug]: Playwright api is unable to interact with frame in headless mode HOT 3
- [Please read the message below]
- [Bug]: @playwright/experimental-ct-react doesn't mount component HOT 3
- [Feature]: toHaveProperty() with multiple acceptable expected values HOT 2
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.