Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This feature fixes #194
Type of change
How Has This Been Tested?
Test the functionality of the kebabCase function by calling it with different strings that include spaces, uppercase letters, and special characters, and ensure that it returns the expected kebab-case string.
Test the CreateProjectModal component by rendering it and simulating user interactions such as filling the form and submitting it, and ensure that the component behaves as expected, i.e., creates a new project with a unique slug, and navigates to the newly created project page.
Test the useEffect hooks by rendering the component and updating the name and slug fields, and ensure that the kebabCase function is called and the slug field is updated accordingly.
Test the validation of the form by submitting it with empty or invalid fields and ensuring that the validation errors are displayed.
Test the checkSlugAvailability function by mocking the API response to return both true and false, and ensure that the component displays the appropriate error message when the slug is already taken.
Test Configuration:
Checklist: