Hello, I want your help on the Product Landing Page project. I made the page but when I run the test it doesn’t pass the nav test. I don’t know where is the error, I put the id for each section and the href on the a tag in the nav links.
Here is the codepen:
https://codepen.io/ischristian/pen/ExvvYLy
Thank you for your help.
I see that this test is failing:
When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.’
Each .nav-link element should have an href attribute : expected false to equal true AssertionError: Each .nav-link element should have an href attribute : expected false to equal true
I see this in your code, for example:
<li class="nav-link">
<a href="#features">Features</a>
</li>
The test is looking at the element that has the class of “nav-link” and seeing that it has an href. But it’s not that element, but its child.
When I fix that, I get 100% pass.
Thank you so much. It now works!