Project Test Script Seems Broken

Doing my personal portfolio project and I finished all the user stories. Before I finished the last one, I was passing 11/12. Ran the test again and it gave me 10/12. I figured it must be a mistake and ran it a few more times. Now it says I’m only passing 8/12 stories. I’ve double checked and I’m pretty sure I’ve meet the minimum requirements. Has anyone else had this problem?

1 Like

Hello @Mato-Sapa. Can you please provide a link to your pen? Then only we can identify the problem. Thanks!

@Mato-Sapa, Click the red button to see which test(s) are failing and text to help you correct the issue.

I believe that’s the right link. Sorry, a busy Friday. But still not working.

Have you clicked the red button to see which test(s) are failing and text to help you correct the issue?

For instance, the first failing test says;

My portfolio should have a Welcome section with an id of "welcome-section".  
expected null to not equal null  
AssertionError: expected null to not equal null  

You do not have id="welcome-section" Notice the typo?
(Btw, correcting that one typo changes tests to 11/12)

Read all the failing messages. Not just the first line.

Hope that helps.

ok I went back and changed that. I get the 11/12 now as well. But the part I’m failing now is having a clickable link in my navbar. But that was passing before and I’m pretty positive I haven’t changed anything. I don’t see what I did wrong in that section. I’ll mess around with it, but do you see anything obvious? Obvious is what I usually miss lol

Checked your code, you need an anchor tag to take you to different part of code. Something like this
<a href="#projects">Projects</a>
and then somewhere down below
<section id="projects">Here are projects</section>

@Mato-Sapa, your code has a lot of errors. There are a lot of open elements, elements out of order (there’s an opening body tag in the middle of your code).

  • Run your HTML code through the W3C validator. (Do this with all your projects)
    • There are HTML coding errors you should be aware of and address.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in HTML. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.

No, that wasn’t passing before. And it cannot pass now because of the unclosed elements. The way it’s set now there’s no place to scroll to. All of your code is contained within one section.

ok, I think I’ll be able to figure it out from here. But that boilerplate tag link was really helpful. I guess even with these lessons here, there is a lot to learn still. I had no idea how to use the head and body tags. Thank you.

Glad to help.
If you have additional questions, here to help.

Ok, I’m stumped. I know I said I had it, but I was apparently wrong. My only failed test is making step 7.

“The navbar should contain at least one link that I can click on to navigate to different sections of the page.”

I’ve checked tons of sites through google, most of which didn’t really answer my question. But in the FCC html lessons, it shows how to use the a href to link. I have it set up exactly like it has it. It’s been like that since the beggining.

I’m obviously missing something still though. Can you take another look?

just in case i need to post the link again

@Mato-Sapa, it’s getting there but once again, you need to follow up on some things. These are very important.

  • Run your HTML code through the W3C validator.
    • There are HTML coding errors you should be aware of and address.
      • You must clean these errors up! I can’t stress this enough. You have three opening section tags and none of them are closed. Closing them will pass this one test but you still need to correct the other errors. For instance, there is the body element that’s incorrectly placed. Get rid of the body tags since they’re not needed when using codepen. Revisit the boilerplate tag link. There’s also two opening header tags of which you only close one. Get rid of the first one.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.

When you clean all that up you’ll have one failing test and that will be that the navbar should always be at the top of the viewport.

If you read the entire failing message it says;

The navbar should always be at the top of the viewport.  
Navbars parent should be body and it should be at the top of the viewport : expected 128 to be close to 0 +/- 15  
AssertionError: Navbar's parent should be body and it should be at the top of the viewport : expected 128 to be close to 0 +/- 15

Read that carefully. "Navbar’s parent should be body" The way you have it set up, navbar’s parent is header.
And once you correct that you’ll need to use the position property to set the navbar to the top.

That was incredibly helpful. I can’t believe I didn’t see any of that. Thanks for the help here, I’ll clean all of that up. Feel free to come back later and critique me lol.

Since I won’t know when you finish getting things cleaned up I’ll wait for you to update this thread and at that time I’ll look at it again.