-
-
Save codecademydev/92b35662c0a3ea424bbc257007cec8b8 to your computer and use it in GitHub Desktop.
Codecademy export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form> | |
<textarea id="quote" name="quote"></textarea> | |
<input id="attributed" name="attributed"> | |
<input id="source" name="source"> | |
<input type="submit"> | |
</form> | |
<div id="quotes" name="quotes"> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {assert} = require('chai'); | |
describe("User visits root", () => { | |
describe("Posting a quote", () => { | |
it("saves the quote and the metadata submitted by the user", () => { | |
const quote = "Our deepest fear is not that we are inadequate. Our deepest fear is that we are powerful beyond measure."; | |
const attributed = "Marianne Williamson."; | |
const source = "A Return to Love: Reflections on the Principles of A Course in Miracles" | |
browser.url("/"); | |
browser.setValue("textarea[id=quote]", quote); | |
browser.setValue("input[id=attributed]", attributed); | |
browser.setValue("input[id=source]", source); | |
browser.click("input[type=submit]"); | |
assert.include(browser.getText("#quotes"), quote); | |
assert.include(browser.getText("#quotes"), attributed); | |
assert.include(browser.getText("#quotes"), source); | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment