Comments (10)
We have an open PR to remove that: testing-library/testing-library-docs#1329
This was relevant back when peerDependencies weren't downloaded in case they weren't installed already.
You can safely remove @testing-library/dom
from your devDependencies.
I'm resolving this one as it's a duplicate of the open issue in RTL (testing-library/react-testing-library#1216) and for the specific concern you've raised, we already have an open PR in the docs.
Thanks!
from dom-testing-library.
Uh oh! @joaopedrodcf, the image you shared is missing helpful alt text. Check your issue body.
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.
Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
from dom-testing-library.
Thank you so much 🙏
from dom-testing-library.
Hi @joaopedrodcf.
The act
error is from React Testing Library, is there any specific reason why you have DTL installed explicitly?
We have this issue that suggests it might be related to multiple DTL versions installed: testing-library/react-testing-library#1216
from dom-testing-library.
Wow, that was really quick @MatanBobi :D
Yeah, it was getting duplicated like this! After removing it, it works again 🥇
I think I saw it in next documentation but tried to look again but can't find it anymore maybe they updated their docs 😆
Gonna close the issue
from dom-testing-library.
Actually found the reason @MatanBobi why I add installed the @testing-library/dom
.
In the docs of user-event they say that we need to install it:
https://testing-library.com/docs/ecosystem-user-event/
![image](https://private-user-images.githubusercontent.com/11476152/281004105-805e4988-b33b-4b35-8f65-2fff2b4d9241.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkyMjA3MjgsIm5iZiI6MTcwOTIyMDQyOCwicGF0aCI6Ii8xMTQ3NjE1Mi8yODEwMDQxMDUtODA1ZTQ5ODgtYjMzYi00YjM1LThmNjUtMmZmZjJiNGQ5MjQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI5VDE1MjcwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgyODEzMjliZWMxZThjNDdhMmVlYjk3Mzc2YTBhNzRhOGIyNGQ3ZTdjMTlhY2MwYTBjN2ZkNGE0NTJiOGVlMGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.2hAYZuDTKmTNkml8GXqZA9UbWb0gKPDgx9O1eD9sjHs)
Even yarn will say that a peer dep is not met if we don't install it
![image](https://private-user-images.githubusercontent.com/11476152/281017865-4d6d7fdd-fd06-49ba-9074-16269db31eab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkyMjA3MjgsIm5iZiI6MTcwOTIyMDQyOCwicGF0aCI6Ii8xMTQ3NjE1Mi8yODEwMTc4NjUtNGQ2ZDdmZGQtZmQwNi00OWJhLTkwNzQtMTYyNjlkYjMxZWFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI5VDE1MjcwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZjYWM5ODdlYzMzYjdkOGIzOWY2YWVkNjJlOTY0NWQ3MjhlYWQ3MjQ3NDU5YzlkYzUyNTk4M2RjMzdiMTNiNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1rD3eA2v_nqayoaU5Ej_uigO0bv-34_D9Pszw_m-neI)
from dom-testing-library.
Uh oh! @joaopedrodcf, the image you shared is missing helpful alt text. Check #1275 (comment).
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.
Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
from dom-testing-library.
Uh oh! @joaopedrodcf, the image you shared is missing helpful alt text. Check #1275 (comment).
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.
Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
from dom-testing-library.
Just to add more information for the issue:
![image](https://private-user-images.githubusercontent.com/11476152/281025662-59919a38-d488-4485-901f-3ee2cff84dd9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkyMjA3MjgsIm5iZiI6MTcwOTIyMDQyOCwicGF0aCI6Ii8xMTQ3NjE1Mi8yODEwMjU2NjItNTk5MTlhMzgtZDQ4OC00NDg1LTkwMWYtM2VlMmNmZjg0ZGQ5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI5VDE1MjcwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUyNzhiNjU4NDhjMTE3ODcxZmE0ZThkZTJmZjA4YmJhY2QwM2Y3N2Y3OTA2MWU2MzNiYjY2NTc0ZTk4NjVjMzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.3uHDjI-xO613YEhjWlBVT_nhQfyDiI3oME-m2E5AlGs)
![image](https://private-user-images.githubusercontent.com/11476152/281025998-3188916b-dc87-4ac3-9d86-09221e36e933.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDkyMjA3MjgsIm5iZiI6MTcwOTIyMDQyOCwicGF0aCI6Ii8xMTQ3NjE1Mi8yODEwMjU5OTgtMzE4ODkxNmItZGM4Ny00YWMzLTlkODYtMDkyMjFlMzZlOTMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAyMjklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMjI5VDE1MjcwOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRmNzQxN2UwMDFlNmYzZmNhM2JmY2RjNDYwZWZhMDc4NDVlODMwYWE4YTg2ODc5Yzc1NGM0MGIxZjk4NjY5NTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HYI8M6xfNUGfLER_oJRlkFH8OExtL_OeJiht1XJzjUI)
It can be seen in the yarn.lock the 9.0.0 was resolved to 9.3.1 and then 9.3.3 was the one I installed manually
So the solution for me was to basically relly in "resolutions" ( overrides in npm ) to force the same version and not having a warning in doing yarn because of a missing peer dependency
// package.json
{
"devDependencies": {
"@testing-library/dom": "9.3.3",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.5.1",
},
"resolutions": {
"@testing-library/dom": "9.3.3"
}
}
from dom-testing-library.
Uh oh! @joaopedrodcf, the image you shared is missing helpful alt text. Check #1275 (comment).
Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.
Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.
from dom-testing-library.
Related Issues (20)
- When using an invalid selector, the error isn't processed properly by waitFor HOT 4
- Add option to avoid printing DOM to log on failures HOT 2
- we may not need the initial check at the beginning of `waitForElementToBeRemoved` HOT 4
- Leaking `waitFor` callback against `jasmine` when the `clock` is mocked HOT 3
- `getByRole("option", { name: "..." })` does not match element contents HOT 2
- getByTestId not working when upgrading @testing-library/dom from version 9.3.1 to 9.3.2 or above HOT 15
- `getByRole("group")` can't match `address` tag HOT 1
- I thought this was the solution for jest but naaahhh HOT 5
- Having a <p> inside a <label> breaks the query HOT 2
- Support complex aria-labelledby queries HOT 1
- Support abstract roles HOT 9
- findByRole() finds no candidates HOT 13
- getByText not working with multiline text
- `waitFor` doesn't advance time when using `jest` fake timers without injecting globals HOT 4
- `getByRole('insertion')` and `getByRole('deletion')` do not match semantic `<del>` and `<ins>` tags HOT 6
- getByRole('caption') does not find caption element HOT 12
- Images with an empty alt attribute are not being assigned `presentation` role (and are still being found by testing library even though they are hidden from the accessibility tree) HOT 4
- fireEvent doesn't work in pointer event HOT 2
- Github actions - tests pass but execution fails on Process completed with exit code 1. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dom-testing-library.