From fd8414062dc2af058b335cc08691aaade45d942d Mon Sep 17 00:00:00 2001
From: The Coding Aviator <34807532+thecodingaviator@users.noreply.github.com>
Date: Thu, 15 Nov 2018 20:59:35 +0530
Subject: [PATCH] Fixed issue which was causing problem while testing for
headings challenge (#19590)
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md
* fix(tests): for closing tags
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md
* Update use-headings-to-show-hierarchical-relationships-of-content.english.md
---
...hierarchical-relationships-of-content.english.md | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md
index 992e882bd50..aa7138f0dde 100644
--- a/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md
+++ b/curriculum/challenges/english/01-responsive-web-design/applied-accessibility/use-headings-to-show-hierarchical-relationships-of-content.english.md
@@ -17,7 +17,7 @@ One final point, each page should always have one (and only one) h1
## Instructions
-Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix the headings so his markup gives semantic meaning to the content, and shows the proper parent-child relationships of his sections. Change all the h5
tags to the proper heading level to indicate they are subsections of the h2
ones.
+Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix the headings so his markup gives semantic meaning to the content, and shows the proper parent-child relationships of his sections. Change all the h5
tags to the proper heading level to indicate they are subsections of the h2
ones. Use h3
tags for the purpose.
## Tests
@@ -25,11 +25,14 @@ Camper Cat wants a page on his site dedicated to becoming a ninja. Help him fix
```yml
tests:
- - text: Your code should have six h3
tags.
- testString: assert($('h3').length === 6, 'Your code should have six h3
tags.');
+ - text: Your code should have 6 h3
tags.
+ testString: assert($("h3").length === 6, 'Your code should have 6 h3
tags.');
+ - text: Your code should have 6 h3
closing tags.
+ testString: assert((code.match(/\/h3/g) || []).length===6,'Your code should have 6 h3
closing tags.');
- text: Your code should not have any h5
tags.
- testString: assert($('h5').length === 0, 'Your code should not have any h5
tags.');
-
+ testString: assert($("h5").length === 0, "Your code should not have any h5
tags.");
+ - text: Your code should not have any h5
closing tags.
+ testString: assert(/\/h5/.test(code)===false, 'Your code should not have any h5
closing tags');
```