From 71051fef50fdad64d8c79f15934f95003237df84 Mon Sep 17 00:00:00 2001 From: Ashraf Nazar Date: Mon, 31 Aug 2020 06:50:46 +0100 Subject: [PATCH] =?UTF-8?q?fix(Curriculum):=20make=20sure=20the=20nested?= =?UTF-8?q?=20input=20element=20in=20the=20form=20is=20th=E2=80=A6=20(#384?= =?UTF-8?q?80)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(Curriculum): make sure the nested input element in the form is the existing element given in the editor * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * Update curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> * fix: use backticks to avoid linting error Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com> Co-authored-by: Randell Dawson --- .../create-a-form-element.english.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md index 7489b58e71..376d9e8307 100644 --- a/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md +++ b/curriculum/challenges/english/01-responsive-web-design/basic-html-and-html5/create-a-form-element.english.md @@ -16,7 +16,9 @@ For example: ## Instructions
-Nest your text field inside a form element, and add the action="https://freecatphotoapp.com/submit-cat-photo" attribute to the form element. + +Nest the existing input element inside a form element and assign `"https://freecatphotoapp.com/submit-cat-photo"` to the action attribute of the form element. +
## Tests @@ -24,8 +26,8 @@ Nest your text field inside a form element, and add the actio ```yml tests: - - text: Your text input element should be nested within a form element. - testString: assert($("form") && $("form").children("input") && $("form").children("input").length > 0); + - text: The existing input element should be nested within a form element. + testString: const inputElem = document.querySelector('form input'); assert(inputElem.getAttribute('type') === 'text' && inputElem.getAttribute('placeholder') === 'cat photo URL'); - text: Your form should have an action attribute which is set to https://freecatphotoapp.com/submit-cat-photo testString: assert($("form").attr("action") === "https://freecatphotoapp.com/submit-cat-photo"); - text: Your form element should have well-formed open and close tags. @@ -76,9 +78,9 @@ tests:

CatPhotoApp

Click here to view more cat photos.

- + A cute orange cat lying on its back. - +

Things cats love:

  • cat nip