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

Improve two step failure messages #943

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Nov 20, 2024

Summary

Improve step failure messages for two provided cucumber steps. Also, fix logic of one of the steps so it does what the wording says it does.

Details

  • Fix logic of cucumber step ' should not contain anything', requiring all commands to have no output on the channel, not just one.
  • Improve the failure message of the same step so that it shows the actual output.
  • Fix cucumber step 'it should pass/fail with exactly:' so that the failure message of the output comparison shows the correct diff.

Motivation and Context

This fixes #942.

How Has This Been Tested?

I added cucumber scenarios testing the failure case for both steps, and after implementing the fix I ran the whole test suite to verify that I didn't break anything.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I've added tests for my code

mvz added 2 commits November 20, 2024 11:27
This fixes two things:

- It requires all commands to have no output on the channel, not just
  one.
- It improves the failure message so that it shows the actual output.
This fixes the failure message of the output comparison so that it shows
the correct diff.
@mvz mvz enabled auto-merge November 21, 2024 09:44
@mvz mvz merged commit 45307e6 into main Nov 21, 2024
18 checks passed
@mvz mvz deleted the issue-942-improve-step-failure-messages branch November 21, 2024 09:46
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.

Failure message for output matching is uninformative
1 participant