Skip to content

Commit

Permalink
Merge pull request #21 from LarsHassler/fix/actions-steps-remove-esca…
Browse files Browse the repository at this point in the history
…ping

fix(template): removed html escaping from action.steps
  • Loading branch information
LarsHassler committed Oct 16, 2016
2 parents 33a9d89 + cba456e commit f07cb6d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion templates/main.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ gemini.suite('Patternlab - ', function(patternlabSuite) {
.setCaptureElements(['#<%= pattern.id %> .sg-pattern-example'])<% pattern.sizes.forEach(function(size) { %>
.capture('<%= size.name %>', function(actions, find) {
actions.setWindowSize(<%= size.width %>, <%= size.height %>)
<%= action.steps %>;
<%- action.steps %>;
})<% }); %>;
});
<% }); %>
Expand Down
13 changes: 13 additions & 0 deletions test/expectedTestFiles/generateTestsMultiplePatternActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ gemini.suite('Patternlab - ', function(patternlabSuite) {
});


gemini.suite('Pattern Name 1 --- sendKeys', function(suite) {
suite
.before(function(actions, find) {
this.element = find('#pattern-1 .sg-pattern-example > *')
})
.setCaptureElements(['#pattern-1 .sg-pattern-example'])
.capture('desktop', function(actions, find) {
actions.setWindowSize(1440, 900)
.sendKeys(this.element, 'inputString');
});
});


gemini.suite('Pattern Name 2', function(suite) {
suite
.setCaptureElements(['#pattern-2 .sg-pattern-example'])
Expand Down
6 changes: 6 additions & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,12 @@ describe('main - ', () => {
"name": "focused",
"selector": "> *",
"steps": ".focus(this.element)"
},
{
"action": "sendKeys",
"name": "sendKeys",
"selector": "> *",
"steps": ".sendKeys(this.element, 'inputString')"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
{
"action": "focus",
"name": "focused"
},
{
"action": "sendKeys",
"name": "sendKeys",
"keys": "inputString"
}
]
}
Expand Down

0 comments on commit f07cb6d

Please sign in to comment.