Landing page 1 test fails even when user story is completed

There is User Story #5: When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page. - in CodePen when I click on a link it works fine - all three links. But when I run the tests then I get the error about it. As everything works well when I do manually then I don’t understand where is the mistake.
Can anybody understand why it gives the error?

https://codepen.io/Kris_Muru/full/mdebxVX

just below the failed test there is written as reason why it is failing

Each .nav-link element should have an href attribute

can you figure out how to fix it knowing the reason?

and I have :
<li class="nav-link"><a href="#video">Selection</a></li>. And as I said when I manually click the link also it moves the page to different sections accordingly.

what kind of element has the nav-link class? can it have a href attribute?

I have edited your code. to format it correctly you can select it and press the Preformatted Text button </>

I didn’t pay attention, a had to have the .nav-link class, but I gave the class to li. All woking now :slight_smile: Thanks