sveltejs / kit

web development, streamlined
https://kit.svelte.dev
MIT License
18.19k stars 1.85k forks source link

Include Playwright specific `.gitignore` configuration when choosing playwright in `npm create svelte` options #12362

Open Pranay-Tej opened 1 month ago

Pranay-Tej commented 1 month ago

Describe the problem

It'd be nice to have playwright specific .gitignore configuration to be included when choosing Add Playwright for browser testing in npm create svelte options.

Describe the proposed solution

Example:

.gitignore

#Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth

Importance

nice to have

dominikg commented 1 month ago

Are any/all of these files & directories created by the playwright setup create-svelte has?

If users have to change their config first, i'd say its out of scope here. We don't want to be tracking whatever output all tools we offer could have and maintain the ignore list. (another example could be eslint or prettier cache)

Pranay-Tej commented 1 month ago

No, they were created after I ran playwright test command. I almost didn't realise there was a zip file in the staged files (I'm new to playwright).

Yes, tracking and maintaining output of all tools is not a viable option.

Maybe adding a suggestion in post-install instructions could be helpful?

hopperelec commented 1 month ago

No, they were created after I ran playwright test command. I almost didn't realise there was a zip file in the staged files (I'm new to playwright).

Only one I get is /test-results/

Pranay-Tej commented 4 weeks ago

The entries in example I mentioned are from the .gitignore created by npm init playwright@latest and /playwright/.auth is mentioned in playwright docs