Why am I still failing these user stories?

Why am I still failing these user stories?


I am creating my product landing page and I am pretty sure I have completed user story 5 and 12 but why am I still failing them in the test??

This is my project: https://codepen.io/bookworm0618/pen/wxojZQ


User Story #4: I can see at least three clickable elements inside the nav element, each with the class nav-link.

and you have:

      <li class="nav-link"><a href="#about-us">About Us</a></li>

It says that the “clickable element” must have the class. The a tag is the clickable element, not the li.

On the second one, the error text from the test suite says:

… The #email input should have a name attribute : expected false to equal true

This is not explicit in the user stories, but is good practice and was probably covered in the curriculum.

When I move those classnames to the the appropriate place, and add a name attribute of “email” to your email input, it passes.


Thank you so much!!! :hugs:


Hello, I just finished putting together the survey page challenge, and I must say the survey page looks presentable - except for the dropdown button which seems to activate when the pointer is off-side. But the main thing is I am not able to pass any of the user stories even though I have added IDs where it is needed. What am I doing wrong?
Here’s my pen:


I see what you are trying to do, but I don’t understand why? Did you consider using the HTML element select?


Hi Kevin,

You mean as far as the tag for the drop-down? No, I haven’t but I will give it a try. This is for the survey form mind you.

But as for the user stories, I only have 2 out of 17 correct. Why are all the other user stories coming up as incorrect? I would think that using id for each element would pass that portion of the test, if you noticed in the code I put together.


Sorry, I got so wrapped up in that that I forgot that you asked about the tests.

The tests are telling you what is wrong. For example, the second test tells you:

  1. I can see a title with id=“title” in H1 sized text. #title should be in H1 sized text : expected ‘DIV’ to equal ‘H1’ AssertionError: #title should be in H1 sized text : expected ‘DIV’ to equal ‘H1’ …

When I look at your code, I see:

<div id="title" >
  <h1>Survey form</h1>

You need the id “title” to be on that h1. That is what it is look for.

The next one says:

  1. I can see a short explanation with id=“description” in P sized text. There should be an element with id=“description” : expected null to not equal null AssertionError: There should be an element with id=“description” : …

I see a description:

  <p><em>A survey for the precentage of people living in New York City</em></p>

but I don’t see the id tag on there.

You need to work through these and read them very carefully. A very important skill for web dev is attention to minute details. I understand this is new to you - but this is what you need to learn to do.

So, with this knowledge, work through these and see how many of them you can solve. Read the original challenge description or better yet, write to the tests, which are telling you what they want.

If you get stuck on some, check back.


Okay…very good! Thank you for the advise. :grinning: