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

Fix failures related to at queries. #647

Merged
merged 3 commits into from
May 7, 2022

Conversation

marcandre
Copy link
Contributor

  1. assert_has gave an unexcepted error.
  2. find gave a wrong error messages always indicating a 0 found count:
    "The element at index X is not available because 0 elements..."

This PR provides a more instructive error message for failures. It also
distinguishes between invalid values for at and values that are not found.

@marcandre
Copy link
Contributor Author

To avoid conflicts, this includes #642 (and thus a few other PRs too). Just the last commit is new.

@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2021

Codecov Report

Merging #647 (8fe55b0) into main (5e02d94) will increase coverage by 5.05%.
The diff coverage is 100.00%.

❗ Current head 8fe55b0 differs from pull request most recent head 29075ab. Consider uploading reports for the commit 29075ab to get more accurate results

@@            Coverage Diff             @@
##             main     #647      +/-   ##
==========================================
+ Coverage   88.04%   93.09%   +5.05%     
==========================================
  Files          24       24              
  Lines         995      999       +4     
==========================================
+ Hits          876      930      +54     
+ Misses        119       69      -50     
Flag Coverage Δ
IntegrationTest 88.68% <95.23%> (+7.48%) ⬆️
UnitTest 42.24% <85.71%> (+0.43%) ⬆️

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

Impacted Files Coverage Δ
lib/wallaby/browser.ex 94.54% <100.00%> (ø)
lib/wallaby/query.ex 98.50% <100.00%> (+0.04%) ⬆️
lib/wallaby/query/error_message.ex 89.47% <100.00%> (+2.20%) ⬆️
lib/wallaby/selenium.ex 76.82% <0.00%> (+59.75%) ⬆️

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 448ec35...29075ab. Read the comment docs.

@marcandre
Copy link
Contributor Author

(It may not be obvious, but I'm fixing a bunch of little things as a prelude to fix refute_has correctly...)

marcandre and others added 2 commits May 7, 2022 16:59
1) `assert_has` gave an unexcepted error.
2) `find` gave a wrong error messages always indicating a 0 found count:
"The element at index X is not available because 0 elements..."

This PR provides a more instructive error message for failures. It also
distinguishes between invalid values for `at` and values that are not found.
@mhanberg mhanberg merged commit 330025c into elixir-wallaby:main May 7, 2022
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