-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(cursor): Update react tests cursor rule with information from the dev docs #93472
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
Conversation
.cursor/rules/tsx_tests.mdc
Outdated
screen.getByRole('button', { name: /save/i }) | ||
screen.getByRole('textbox', { name: /search/i }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not give examples with regex, prefer the whole labels instead?
.cursor/rules/tsx_tests.mdc
Outdated
screen.getByLabelText(/email address/i) | ||
screen.getByPlaceholderText(/enter search term/i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, otherwise we're going to end up with a lot of regex searching
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can tell it "if the string is dynamic, you can use regex"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just went ahead and removed any references to the regex, I haven't seen any issues with it so far so probably not necessary
Thanks! |
…e dev docs (#93472) Cursor has not been very good at writing frontend tests in this codebase (often mocking way too much and not using correct conventions). I'm hoping by converting some of the info we have on develop.sentry.dev over to cursor rules we can get better quality tests out of it.
…e dev docs (#93472) Cursor has not been very good at writing frontend tests in this codebase (often mocking way too much and not using correct conventions). I'm hoping by converting some of the info we have on develop.sentry.dev over to cursor rules we can get better quality tests out of it.
Cursor has not been very good at writing frontend tests in this codebase (often mocking way too much and not using correct conventions). I'm hoping by converting some of the info we have on develop.sentry.dev over to cursor rules we can get better quality tests out of it.