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: Map and Label Happy Path Tests #3690

Merged
merged 9 commits into from
Sep 17, 2024
Merged

feat: Map and Label Happy Path Tests #3690

merged 9 commits into from
Sep 17, 2024

Conversation

RODO94
Copy link
Contributor

@RODO94 RODO94 commented Sep 17, 2024

What does this PR do?

Running through the Happy Path test to-dos. Tried to do a nice amount of refactoring to keep the testing concise but explicit, so I have some simple functions handling "Clicking Continue" and "Checking for Error Messages are Populated or Empty" since these are repeatable situations without a high amount of meaning or context for the test.

I would be interested to know if I should be waiting for a handleSubmit() to be called to confirm the happy path is successful rather than just checking the absence of error messages.

Copy link

github-actions bot commented Sep 17, 2024

Removed vultr server and associated DNS entries

@RODO94 RODO94 requested a review from a team September 17, 2024 10:54
Copy link
Contributor

@DafyddLlyr DafyddLlyr left a comment

Choose a reason for hiding this comment

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

A few very small nit comments to take a look through here.

PR is great through - clean and easy to ready, love it 👍

On the handleSubmit() - it's worth explicitly testing that this has not been called when validation errors are shown. I'd suggest that rather than adding this to a random test or each test, just add a new test for just this instance - a little more atomic and explicit.

@@ -186,6 +186,22 @@ describe("validation and error handling", () => {
});
// shows the error state on a tab when it's invalid
});

it("does not trigger handleSubmit when errors exist", async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

👌

@RODO94 RODO94 merged commit f45fefd into main Sep 17, 2024
12 checks passed
@RODO94 RODO94 deleted the rory/mal-test-happy branch September 17, 2024 13:44
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