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

feat: create project slug #213

Merged
merged 4 commits into from
Mar 11, 2023
Merged

feat: create project slug #213

merged 4 commits into from
Mar 11, 2023

Conversation

ttebify
Copy link
Collaborator

@ttebify ttebify commented Mar 11, 2023

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

This feature fixes #194

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  1. 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.

  2. 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.

  3. 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.

  4. Test the validation of the form by submitting it with empty or invalid fields and ensuring that the validation errors are displayed.

  5. 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:

  • OS with version:
  • Browser with version:
  • SDK / CLI with version:

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I documented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@dahal dahal self-requested a review March 11, 2023 07:13
Copy link
Member

@dahal dahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for your contribution @ttebify 🎉

@dahal dahal merged commit 6c516cc into envless:main Mar 11, 2023
@ttebify
Copy link
Collaborator Author

ttebify commented Mar 11, 2023

I am happy to contribute

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

Successfully merging this pull request may close these issues.

feature: create project slug
2 participants