I'm stuck again with just one more to go

Hello,

I’ve finished the Random Quote Machine project which seems to be working fine as it should be, but I have not passed one test out of twelve.

My code link is as follows:
https://codepen.io/KyeSuk-Suh/pen/XQOOwb

The test result shows me that I did not pass only one test, but it cannot seem to tell me which test I failed. So, I am frustrated.

If I can figure out what the problem is, I might try to fix it.
However, I can not find a solution because I do not know what the problem is.

I would appreciate it if some people out there could help me out with this because I feel like pretty much helpless.

Thank you.

If you click on the test button, after running the test you will see the full tests descriptions and eventually any error message.

In your case you are failing test #9

I can tweet the current quote by clicking on the #tweet-quote <a> element.
This <a> element should include the “twitter.com/intent/tweet” path in it’s href attribute to tweet the current quote.

#tweet-quote <a> element must have an href attribute : expected false to be truthy

Or in other words, it expect an a element with a href attribute pointing to the correct url.
Your element is missing the attribute entirely

<a class="btn btn-info" type="submit" id="tweet-quote">Tweet Quote</a>

Hope this helps :+1:

I pretty much appreciate it, because if I had not asked here in this forum, without your help, I would have never even known what was wrong.

With your help, I could finally get it to pass all the tests.

The below is my revised code:
<a href= “twitter.com/intent/tweet” class="btn btn-info" type="submit" id="tweet-quote" >Tweet Quote</a>

Thank you again.

1 Like

I’m curious why your code re-renders and you get a 404 after you tweet the quote. Any clues?

Hi, @patfreecodecamp

I just pushed the twitter button at the Codepen page on my Safari browser on my IPhone, and it opened the Twitter page, but unfortunately the same thing which is 404 error happened to me as you said. I don’t really have no clue either.

But I think it might work fine, if you build this on your computer outside of Codepen.

Thank you.

1 Like