Skip to content

Instantly share code, notes, and snippets.

@wormeyman
Created April 7, 2020 17:34
Show Gist options
  • Save wormeyman/21e3afd88cebc91a3e2dfe39d5212322 to your computer and use it in GitHub Desktop.
Save wormeyman/21e3afd88cebc91a3e2dfe39d5212322 to your computer and use it in GitHub Desktop.
FCC: Test Suite - Eric J
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<!--
Hello Camper!
For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding!
- The freeCodeCamp Team
-->
<section id="SurveyFormSection">
<h1 id="title">Survey Form</h1>
<p id="description">The description</p>
<form id="survey-form">
<div class="cssTestFormItem">
<label id="name-label" for="name"> Your Name:
<input id="name" name="name" type="text" placeholder="Enter your name" required>
</input>
</label>
</div>
<div class="cssTestFormItem">
<label id="email-label" for="email"> Your Email:
<input id="email" name="email" type="email" placeholder="enter your Email" required>
</input>
</label>
</div>
<div class="cssTestFormItem">
<label id="number-label" for="number"> Your Number:
<input id="number" name="number" type="number" placeholder="enter your Number" min="13" max="120" required>
</input>
</label>
</div>
<div class="cssTestFormItem">
<label id="dropdown-label" for="dropdown"> Your Dropdown:
<select id="dropdown">
<option value="one">One</option>
<option value="Two">Two</option>
<option value="Three">Three</option>
</select>
</label>
</div>
<div class="cssTestFormItem">
<p>Your Favorite Color:</p>
<label for="red"><input type="radio" id="red" name="favcolor" value="red">red</label>
<label for="Green"><input type="radio" id="Green" name="favcolor" value="green">green</label>
<label for="blue"><input type="radio" id="blue" name="favcolor" value="blue">blue</label>
<label for="other"><input type="radio" id="other" name="favcolor" value="other">Other</label>
</div>
<div class="cssTestFormItem">
<p>Your Drink(s)</p>
<input type="checkbox" id="water" name="water" value="water" checked>
<label for="water">Water</label>
<input type="checkbox" id="coffee" name="coffee" value="coffee">
<label for="coffee">Coffee</label>
<input type="checkbox" id="tea" name="tea" value="tea">
<label for="tea">Tea</label>
</div>
<div class="cssTestFormItem">
<p>Your Feedback:</p>
<textarea></textarea>
</div>
<button id="submit">Submit</button>
</form> <!-- End Survey Form survey-form -->
</section>
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
body {
background-color: #123456;
}
#SurveyFormSection {
/* margin: 0 auto 0 auto; */
margin: auto;
display: block;
max-width: 50%;
background-color: yellow;
}
#number {
min-width: 20%;
}
label {
display: flex;
margin: 0 0 10px 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment