added test to assert h1 is before h2 (#39040)

This commit is contained in:
tomki1 2020-08-30 20:13:30 -07:00 committed by GitHub
parent b88c8ab351
commit 9c3de2df24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,8 @@ tests:
testString: assert.isTrue((/cat(\s)?photo(\s)?app/gi).test($("h2").text()));
- text: Your <code>h1</code> element should have the text "Hello World".
testString: assert.isTrue((/hello(\s)+world/gi).test($("h1").text()));
- text: Your <code>h1</code> element should be before your <code>h2</code> element.
testString: assert(code.match(/<h1>\s*?.*?\s*?<\/h1>\s*<h2>\s*?.*?\s*?<\/h2>/gi));
```