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

Bound queries to the base element #100

Merged
merged 2 commits into from
Oct 9, 2019
Merged

Bound queries to the base element #100

merged 2 commits into from
Oct 9, 2019

Conversation

afontcu
Copy link
Member

@afontcu afontcu commented Sep 30, 2019

This PR aims to fix several issues when trying to query content outside of the regular DOM node tree (portals, modals, etc). It tries to mirror React Testing Library behavior.

I also added a test based on Vuetify, because (1) it is related to the introduced changes and (2) Vuetify is widely-used and comes with its own nuances.

This is a breaking change since container and baseElement changed their meaning.

This PR closes #98

@afontcu afontcu requested a review from dfcook September 30, 2019 05:22
@afontcu afontcu added the BREAKING CHANGE This change will require a major version bump label Sep 30, 2019
@codecov
Copy link

codecov bot commented Sep 30, 2019

Codecov Report

Merging #100 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #100   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          66     67    +1     
  Branches       11     13    +2     
=====================================
+ Hits           66     67    +1
Impacted Files Coverage Δ
src/vue-testing-library.js 100% <100%> (ø) ⬆️

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 787a34a...049db94. Read the comment docs.

@dfcook
Copy link
Collaborator

dfcook commented Sep 30, 2019

All looks good to me, I think the resulting code is a lot cleaner as well.

@afontcu
Copy link
Member Author

afontcu commented Oct 2, 2019

@ChristophWalter @dfcook I've updated the PR in order to make it closer to React Testing Library.

https://testing-library.com/docs/react-testing-library/api#container

@afontcu afontcu requested a review from dfcook October 7, 2019 18:32
@afontcu afontcu merged commit c4eacd2 into master Oct 9, 2019
@afontcu afontcu deleted the bound-queries-body branch October 9, 2019 11:22
@afontcu
Copy link
Member Author

afontcu commented Oct 9, 2019

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE This change will require a major version bump released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide options to adapt the document before mount
3 participants