Technical doc project

I have fulfilled the user stories to complete the project. Yet the tests are not cleared. What could be the issue?
Any advice is welcome. Thank You !

find my pen using the link:
https://codepen.io/Code4Apoorva/pen/XWVozXb

Well, the tests are built around the user stories, so if you are failing the tests, that means that you aren’t meeting the user stories, at least not in the way that is wanted.

Let’s look at the first failing test:

Each element with the class of “main-section” should also have an id comprised of the innerText contained within it, with underscores in place of spaces. The id may include special characters if there are special characters in the respective innerText. (e.g. The that contains the header, “JavaScript & Java”, should have a corresponding id=“JavaScript_&_Java”).

Each ‘main-section’ should have an id attribute : expected false to equal true
AssertionError: Each ‘main-section’ should have an id attribute : expected false to equal true

This corresponds to this user story:

Each section element with the class of main-section should also have an id that corresponds with the text of each header contained within it. Any spaces should be replaced with underscores (e.g. The section that contains the header “JavaScript and Java” should have a corresponding id="JavaScript_and_Java" ).

It is the exact text.

When I look in your code and look for this…

Here:

    <section class="main-section" id="Introduction_to_python">
    <header>Introduction</header>

The text of the header is “Introduction” and the id is “Introduction_to_python” - that doesn’t match.

Then the next one.

  <section class="main-section" >
    <header id="python_Interpreter">Python Interpreter</header>

Here the id matches (I guess, I don’t think capitalization matters in the test) but it is in the wrong place. The instructions were “Each element with the class of “main-section” should also have an id…” But you didn’t put it there, you put in on the header.


Always read the instructions very closely.

Ohh! I clearly overlooked it earlier. Thanks you !

1 Like