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
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
sectionelement with the class ofmain-sectionshould also have an id that corresponds with the text of eachheadercontained within it. Any spaces should be replaced with underscores (e.g. Thesectionthat contains the header âJavaScript and Javaâ should have a correspondingid="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 !
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.