Skip to content
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

Remove Individual Icons Tests #1243

Closed
saurabhdaware opened this issue Jun 1, 2023 · 6 comments
Closed

Remove Individual Icons Tests #1243

saurabhdaware opened this issue Jun 1, 2023 · 6 comments
Assignees
Labels
P1 Kinda Important

Comments

@saurabhdaware
Copy link
Member

It takes 4 minutes to run the entire test suite locally which is a lot. A lot of these tests are snapshot tests on individual icons which might not be needed.

Its unlikely that one icon breaks but others don't. So we can have tests on common components but individual icons snapshot tests feels a bit of an overkill.

We can probably keep tests on 1-2 icons but might not be needed on every icon.

Icons will keep growing and so is the test runtime

@saurabhdaware saurabhdaware added 🤔 Needs discussion This needs some internal discussions P1 Kinda Important labels Jun 1, 2023
@anuraghazra
Copy link
Member

+1 on removing 260+ snapshot tests to speed up the tests.

I think chromatic image snapshots makes more sense here, we already have the catalog of all the icons in storybook.

Also, it might also be interesting to check where does the bottleneck coming from, will the test significantly perform faster if we only have 1 file say icons.test.tsx where we generate and match all the snapshots?

@divyanshu013
Copy link
Contributor

Let's restrict it to ~10 icons (gif)

@saurabhdaware saurabhdaware changed the title Removes Individual Icons Tests Remove Individual Icons Tests Jun 13, 2023
@saurabhdaware saurabhdaware removed the 🤔 Needs discussion This needs some internal discussions label Jul 21, 2023
@snitin315
Copy link
Member

We have added sharding on CI with #1473, we can close this.

@saurabhdaware
Copy link
Member Author

Should we still do this? tests are still taking a lot of time locally and remove Icon tests wouldn't be very high effort task. What do you think @snitin315?

@snitin315
Copy link
Member

@saurabhdaware Locally we can easily choose to run specific tests yarn test:react Autocomplete or yarn test:react --testPathIgnorePatterns="(icons|native.test)"

@saurabhdaware
Copy link
Member Author

aha yes this is nice yarn test:react --testPathIgnorePatterns="(icons|native.test)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Kinda Important
Projects
None yet
Development

No branches or pull requests

5 participants