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

Validation check when booking onto events #207

Merged
merged 12 commits into from
Jun 24, 2024
Merged

Validation check when booking onto events #207

merged 12 commits into from
Jun 24, 2024

Conversation

Parth097
Copy link

Copy link

github-actions bot commented Jun 14, 2024

Lines Statements Branches Functions
Coverage: 50%
50.93% (8622/16927) 34.16% (4200/12294) 40.25% (1452/3607)

@Parth097 Parth097 marked this pull request as ready for review June 19, 2024 20:32
@hannah-whelan
Copy link

You'll also want to add a couple of tests to the EventDetails.test.tsx file, as the submit button for the form lives in EventDetails.tsx (and has new functionality to disable it when information is missing)

const stageInput = screen.getByRole("textbox", { name: "Stage" });
expect(stageInput).toBeInvalid();
const examBoardInput = screen.getByRole("textbox", { name: "Exam board" });
expect(examBoardInput).toBeInvalid();

Choose a reason for hiding this comment

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

These could be done like this to be a little more concise:

[firstNameInput, familyNameInput, stageInput, examBoardInput].forEach((each)=>expect(each).toBeInvalid())

Copy link
Author

Choose a reason for hiding this comment

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

Sorted

Copy link

@hannah-whelan hannah-whelan merged commit 55091af into main Jun 24, 2024
4 checks passed
@hannah-whelan hannah-whelan deleted the feature-439 branch June 24, 2024 12:45
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