-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
[Fix] Prevent empty name category from being added #3761
[Fix] Prevent empty name category from being added #3761
Conversation
src/frontend/screens/Library/components/CategoriesManager/index.tsx
Outdated
Show resolved
Hide resolved
src/frontend/screens/Library/components/CategoriesManager/index.tsx
Outdated
Show resolved
Hide resolved
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.
Sorry, one more thing, it would be good to update the e2e/categories.spec.ts
to test these changes
it should be easy to update the test to check that the button is disabled with blank and unchanged values
No worries. Everything is valid to increase the code quality. Detailed errorThis error happen for this four tests:
|
e2e/categories.spec.ts
Outdated
@@ -23,8 +26,20 @@ electronTest('categories', async (app) => { | |||
dialog.locator('span', { hasText: 'Great games' }) | |||
).toBeInViewport() | |||
|
|||
// rename category | |||
// add button should be disable if trying to rename category to empty name |
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.
Here you are testing that the button is disabled when the name is unchanged, the comment doesn't match that
the other 2 expects are for the blank tests
I can merge this after that's fixed
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.
Sorry for the delay in fixing this.
These previous days were very busy.
I fixed this now. Where it says "empty" should be "same", I didn't realize that "words swap".
thanks! merging |
Currently we can add empty categories and also rename categories for an empty string.
This is just a small fix to prevent those cases.
I also did another one change to disable the "confirm rename button" when the name was not changed.
Before:
Before.mp4
After:
After.mp4
Use the following Checklist if you have changed something on the Backend or Frontend: