-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: When using several calls of defineBddConfig() after installing v4.0.0 #39
Comments
@vitalets Sry I did a mistake when describing the issue. This is how I really have my playwright.config: All the outputDir are differents and still I have that error. |
@jzaratei could you post in text your actual |
Never mind, it seems a version issue. I was having this issue yesterday when I installed the v4.0.0, but doing a fresh install today it seems that the latest version is 4.4.0 and all seems to work pretty good. I'm closing this issue. |
Excellent! |
Sorry @vitalets I had to reopen this because it still happening in the latest version 4.0.0 Error:
This is my playwright.config.ts:
And I have organized my features this way |
No problem, will try to reproduce. |
@jzaratei I've created a very similar config in |
After some hours of tests, I manage to reproduce the issue. It seems that adding a storage_state in a login step is causing the error:
In the playwright.config.ts:
I did a pull request to your branch so you can replicate it as well. |
Thank you for your effort @jzaratei ! Checking.. |
The problem is in this line - importing // steps/index.ts
import { STORAGE_STATE } from "../playwright.config"; The solution is to move // const.ts
export const STORAGE_STATE = path.join(__dirname, ".auth/user.json"); and then: import { STORAGE_STATE } from "../const"; I know that there is example in Playwright docs that uses exporting @jzaratei could you try moving |
yeah that worked! I moved STORAGE_STATE to a const file and the generation process is working again. |
Ok, agree. Btw, what is the reason why you keep two separate calls of |
@vitalets I do it that way because I have to execute all my regression test twice, one for each browser. If I group them in a single call like:
the outputDir would be the same for both of them, and that is generating only testcases for the first browser. |
I'm testing on main branch of playwright-bdd-example config - single call of
Isn't it your case? |
Released in v5.0.0. Changelog. |
Yeah, that is the case. I updated my playwright.config.ts to use the testDir constant and everything looks cleaner now. Thanks for your support! |
You are welcome :) |
Hello,
After installing v4.0.0, I get this error when doing the npx bddgen:
ERROR: When using several calls of defineBddConfig() please manually provide different "outputDir" option.
I'm running my features in different projects and I have differents outputDir for each project:
Note: when rolling back to 3.3.0, it works just fine
The text was updated successfully, but these errors were encountered: