-
-
Notifications
You must be signed in to change notification settings - Fork 44k
Newlines break Movie Review Page test #60686
Copy link
Copy link
Closed
Labels
scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.Lessons, Challenges, Projects and other Curricular Content in curriculum directory.status: PR in worksWork in Progress (WIP) Issues.Work in Progress (WIP) Issues.
Description
Describe the Issue
Hello. Recently, I decided to give the Movie Review Page a go.
Everything was going fine, and after I felt like all the user stories should've been passing, I hit the testing button.
One of them failed:
// running tests
8. The span element inside the rating paragraph should have ten stars, either filled in (⭐) or empty (☆), followed by a numerical value in parentheses after the span.
// tests completed
This looked pretty weird to me, as I already had done that:
<p>
<strong>Movie Rating:</strong>
<span aria-hidden="true">
⭐⭐⭐⭐⭐⭐⭐⭐⭐☆
</span> (9/10)
</p>I kept jabbing at it and considered making a post on the forum until it randomly hit me that the newlines might be causing the issue
So I gave it a go, and it passed perfectly fine
<p>
<strong>Movie Rating:</strong>
<span aria-hidden="true">⭐⭐⭐⭐⭐⭐⭐⭐⭐☆</span> (9/10)
</p>Affected Page
Your code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Movie Review</title>
</head>
<body>
<main>
<h1>A Dog's Purpose</h1>
<img src="https://m.media-amazon.com/images/I/81qJGcZ078L._AC_UF894,1000_QL80_.jpg" alt="A movie poster, showing a dog, facing the camera, and zoomed in." style="width: 70vw;"/>
<p>A Dog's Purpose is a movie, adapted from the book of the same name, which was written by W. Bruce Cameron. It tells the story of a dog that wonders about the true purpose of life, and goes through several reincarnations, living all sorts of life. Some are special, some not that much. In the end, I think it's a really good movie with a deep meaning.</p>
<p>
<strong>Movie Rating:</strong>
<!--This is what causes the thing to not pass-->
<span aria-hidden="true">
⭐⭐⭐⭐⭐⭐⭐⭐⭐☆
</span> (9/10)
</p>
<h2>Cast Members</h2>
<ul>
<li><strong>Josh Gad</strong> as the dog's voice</li>
<li><strong>Dennis Quaid</strong> as Ethan</li>
<li><strong>Peggy Lipton</strong> as Hannah</li>
</ul>
</main>
</body>
</html>Expected behavior
The test should pass, even with newlines, as they do literally nothing other than make the code more pleasing to look at
Screenshots
No response
System
- Device: [e.g. iPhone 6, Laptop]
- OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04]
- Browser: [e.g. Chrome]
- Version: [e.g. 22]
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
scope: curriculumLessons, Challenges, Projects and other Curricular Content in curriculum directory.Lessons, Challenges, Projects and other Curricular Content in curriculum directory.status: PR in worksWork in Progress (WIP) Issues.Work in Progress (WIP) Issues.