Skip to content

feat: Add Playwright output folder to .gitignore #482

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

Closed
fel1x-developer opened this issue Mar 11, 2025 · 8 comments
Closed

feat: Add Playwright output folder to .gitignore #482

fel1x-developer opened this issue Mar 11, 2025 · 8 comments
Labels
enhancement New feature or request pkg:add sv add

Comments

@fel1x-developer
Copy link

During sv create, when playwright and storybook is added to the new project, .gitignore should include

# Playwright
playwright-report

# Storybook
storybook-static

as these are output/build folders.

@manuel3108 manuel3108 added enhancement New feature or request pkg:add sv add labels Mar 14, 2025
@manuel3108
Copy link
Member

What did you change after scaffolding the project to make those tools generate files in those output folders? Just tried running storybook and playwright on a newly created project, and those folders were not created.

@manuel3108 manuel3108 added question Further information is requested and removed enhancement New feature or request labels Mar 15, 2025
@fel1x-developer
Copy link
Author

What did you change after scaffolding the project to make those tools generate files in those output folders? Just tried running storybook and playwright on a newly created project, and those folders were not created.

For storybook-static, run bun run build-storybook
playwright-report is created after you finish running bun run test:e2e

@manuel3108
Copy link
Member

For storybook-static, run bun run build-storybook

Now i understand. Actually, we are only executing the storybook cli for the storybook add-on:

await sv.execute(['storybook@latest', 'init', '--skip-install', '--no-dev'], 'inherit');

@JReinhold is this maybe something that could be added to the storybook cli? We could technically also add it here if that causes trouble on your side.

playwright-report is created after you finish running bun run test:e2e

That's not happening for me on a freshly created project. Need to add that I'm running it with pnpm but that shouldn't make any difference. For me it's generating a test-results folder, but that one is already correctly added to the .gitignore

@manuel3108 manuel3108 added enhancement New feature or request and removed question Further information is requested labels Mar 16, 2025
@fel1x-developer
Copy link
Author

fel1x-developer commented Mar 16, 2025

test-results folder is created when playwright is taking a screenshot and fails.

@manuel3108
Copy link
Member

@JReinhold Do you think it would be viable that the storybook cli adds storybook-static to .gitignore.

Doing the same for playwright would be in our hands, obviously.

@JReinhold
Copy link
Contributor

@manuel3108 thank you, we should have done this ages ago.

storybookjs/storybook#31201

Will take some time to be released because we're doing hard work on the upcoming major version. 🙂

@manuel3108
Copy link
Member

thank you, we should have done this ages ago.

storybookjs/storybook#31201

Thanks!

Only the playwright thing remaining now.

@manuel3108 manuel3108 changed the title feat: Add Playwright and Storybook output folder in .gitignore feat: Add Playwright output folder to .gitignore Apr 24, 2025
@jycouet
Copy link
Contributor

jycouet commented Jun 10, 2025

Just tested and test-results is in .gitignore now.
Code here: https://github.com/sveltejs/cli/blob/main/packages/addons/playwright/index.ts#L27-L31

I guess that this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pkg:add sv add
Projects
None yet
Development

No branches or pull requests

5 participants