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 failure wording #634

Merged
merged 2 commits into from
Oct 16, 2021
Merged

Improve failure wording #634

merged 2 commits into from
Oct 16, 2021

Conversation

marcandre
Copy link
Contributor

First commit removes commas that were grammatically incorrect

Second commit extends "Expected ... but only ... were found" to any n that is smaller than expected value (not just n == 1).

It also fixes the case were expected was 0 and 1 element was found. It used to say "Expected 0 but only 1 was found", now the "only" is no longer there.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2021

Codecov Report

Merging #634 (110d119) into main (0d6fef5) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #634      +/-   ##
==========================================
+ Coverage   92.60%   92.62%   +0.02%     
==========================================
  Files          24       24              
  Lines         919      922       +3     
==========================================
+ Hits          851      854       +3     
  Misses         68       68              
Flag Coverage Δ
IntegrationTest 88.28% <100.00%> (+0.03%) ⬆️
UnitTest 41.86% <100.00%> (+0.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/wallaby/query/error_message.ex 85.71% <100.00%> (+0.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0d6fef5...110d119. Read the comment docs.

marcandre added a commit to marcandre/wallaby that referenced this pull request Oct 7, 2021
It distinguishes three cases about the id specified by the "for" attribute:
* does not exist
* exists once (but must be failing because of a type mismatch)
* exists multiple times

[Fixes elixir-wallaby#634]
This extends "but only <n>" wording to all cases were <n> is smaller than expected.
It fixes the case where expected was 0 and result was 1 from "Expected 0 but only 1 was found"
@mhanberg
Copy link
Member

Thank you! 🎃

@mhanberg mhanberg merged commit ba0138f into elixir-wallaby:main Oct 16, 2021
mhanberg pushed a commit to marcandre/wallaby that referenced this pull request Oct 20, 2021
It distinguishes three cases about the id specified by the "for" attribute:
* does not exist
* exists once (but must be failing because of a type mismatch)
* exists multiple times

[Fixes elixir-wallaby#634]
@marcandre marcandre deleted the wording branch October 24, 2021 23:25
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.

3 participants