* fix: Chinese test suite Add localeTiltes, descriptions, and adjust test text and testStrings to get the automated test suite working. * fix: ran script, updated testStrings and solutions
1.6 KiB
1.6 KiB
id, title, challengeType, videoUrl, localeTitle
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
bad87fee1348bd9aec908846 | Create a Bootstrap Headline | 0 | 创建一个Bootstrap标题 |
Description
jQuery Playground
创建一个h3
元素。使用text-primary
Bootstrap类为h3
元素着色,并将其与text-center
Bootstrap类text-center
。 Instructions
Tests
tests:
- text: 在页面中添加<code>h3</code>元素。
testString: assert($("h3") && $("h3").length > 0);
- text: 确保您的<code>h3</code>元素具有结束标记。
testString: assert(code.match(/<\/h3>/g) && code.match(/<h3/g) && code.match(/<\/h3>/g).length === code.match(/<h3/g).length);
- text: 应该使用<code>text-primary</code>类来对你的<code>h3</code>元素进行着色
testString: assert($("h3").hasClass("text-primary"));
- text: 应用类<code>text-center</code>应该使<code>h3</code>元素居中
testString: assert($("h3").hasClass("text-center"));
- text: 你的<code>h3</code>元素应该有<code>jQuery Playground</code>文本。
testString: assert.isTrue((/jquery(\s)+playground/gi).test($("h3").text()));
Challenge Seed
Solution
// solution required