Skip to content

Commit eb838d5

Browse files
ralphpulselivelgandecki
authored andcommitted
fix(docstring.feature): extend DocString.feature tests to cover failing scenario
DocString.feature will fail when ES6 template literals are present in the DocString.
1 parent fbbbc20 commit eb838d5

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

cypress/integration/DocString.feature

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,13 @@ Feature: Being a plugin handling DocString scenario
99
expect(true).to.equal(true)
1010
variableToVerify = "hello world"
1111
"""
12-
Then I ran it and verify that it executes it
12+
Then I ran it and verify that it executes it
13+
14+
Scenario: DocString
15+
When I use DocString for freemarker code like this
16+
"""
17+
<div>
18+
<h1>${ article.title }</h1>
19+
</div>
20+
"""
21+
Then I can interpret it as a string

cypress/support/step_definitions/docString.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,12 @@ then("I ran it and verify that it executes it", () => {
1313
eval(code);
1414
expect(variableToVerify).to.equal("hello world");
1515
});
16+
17+
let freemarkerSnippet = "";
18+
when("I use DocString for freemarker code like this", dataString => {
19+
freemarkerSnippet = dataString;
20+
});
21+
22+
then("I can interpret it as a string", () => {
23+
expect(freemarkerSnippet).to.be.a("string");
24+
});

0 commit comments

Comments
 (0)