You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🐞 Describe the question:
I have a question related to fixtures and Playwright. My app has 2 flavors, EU and US shop and the customers can be guest or logged in (authenticated) - it is a ecommerce shop. So I created fixtures in this manner:
authenticated.ts
import{authenticatedTest}from'./authenticated';exportconstguestBaseTest=authenticatedTest.extend<{setCookies: void;}>({storageState: {cookies: [],origins: []},isGuest: true,setCookies: [async({},use)=>{// To be overridden in specific guest testsawaituse();},{auto: true,scope: 'test'},],});
I did it like that, in a way of extending the fixtures, but I would like to get your feedback on it and maybe suggestion in how to do it better? I have a feeling that I am doing something wrong here, but not sure what exactly, cannot pin point it.
Thanks! :)
The text was updated successfully, but these errors were encountered:
🐞 Describe the question:
I have a question related to fixtures and Playwright. My app has 2 flavors, EU and US shop and the customers can be guest or logged in (authenticated) - it is a ecommerce shop. So I created fixtures in this manner:
authenticated.ts
Then I have guestBase.ts
guestEU.ts
guestUS.ts
I did it like that, in a way of extending the fixtures, but I would like to get your feedback on it and maybe suggestion in how to do it better? I have a feeling that I am doing something wrong here, but not sure what exactly, cannot pin point it.
Thanks! :)
The text was updated successfully, but these errors were encountered: