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

Add tests for the correct routes of the form management buttons #100

Merged
merged 16 commits into from
Feb 14, 2024
Merged

Conversation

PascalinDe
Copy link
Member

@PascalinDe PascalinDe commented Feb 12, 2024

This PR adds

  • tests that verify that form management buttons are only visible in certain states
  • tests that test that the correct routes are called when clicking on the form creation buttons.

It closes #72 .

@PascalinDe PascalinDe self-assigned this Feb 12, 2024
Copy link
Member

@ineiti ineiti left a comment

Choose a reason for hiding this comment

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

Fix linting, specifically missing file web/frontend/tests/mocks/shared, which seems to be in web/frontend/tests/mocks now.

Comment on lines 26 to 34
const prettyFormStates = new Map([
[0, 'Initial'],
[1, 'Open'],
[2, 'Closed'],
[3, 'ShuffledBallots'],
[4, 'PubSharesSubmitted'],
[5, 'ResultAvailable'],
[6, 'Canceled'],
]);
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to be a map? Looks like an array to me.

@PascalinDe
Copy link
Member Author

Fix linting, specifically missing file web/frontend/tests/mocks/shared, which seems to be in web/frontend/tests/mocks now.

aw, I ran the linting locally where it passed fine, but of course I forgot to include the file 🤦‍♀️

@ineiti
Copy link
Member

ineiti commented Feb 13, 2024

Re-ran the failing test.

@PascalinDe PascalinDe merged commit aca09c9 into main Feb 14, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: Done
Development

Successfully merging this pull request may close these issues.

form management tests
2 participants