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

Fixed Duplicate code for issue #174 #200

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

imkeanserna
Copy link

Description

This pull request is for issue #174 refactors the login tests in auth.spec.ts to eliminate code duplication by introducing the mockAndPerformLogin utility function. This change enhances maintainability and readability of the test suite.

Related Issues

N/A

How can it be tested?

  1. You can just run the existing unit and integration tests to ensure no breaking changes.
  2. Test the API endpoints that require a 403 Forbidden response to confirm that the response format remains consistent after refactoring.
  3. Optionally, manually invoke any API endpoints related to manifest or entity manifest to make sure it's proper.

Check list before submitting

  • I have performed a self-review of my code (no debugs, no commented code, good naming, etc.)
  • I wrote the relative tests
  • I created a PR for the documentation if necessary and attached the link to this PR
  • This PR is wrote in a clear language and correctly labeled

Copy link

vercel bot commented Oct 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
manifest-schema ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 0:53am

Copy link
Contributor

@brunobuddy brunobuddy left a comment

Choose a reason for hiding this comment

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

Hello @imkeanserna I think that the function should only "mock" as the "perform login" part is a different action.

@brunobuddy brunobuddy changed the base branch from master to develop November 15, 2024 14:54
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.

2 participants