April 29, 2019, 8:16am
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:
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.
April 29, 2019, 8:36am
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
I can tweet the current quote by clicking on the
<a> element should include the “
twitter.com/intent/tweet” path in it’s href attribute to tweet the current 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
April 29, 2019, 9:25am
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.
I’m curious why your code re-renders and you get a 404 after you tweet the quote. Any clues?
June 2, 2019, 9:49am
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.