-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from LarsHassler/feat/action-delay
added option to add a delay into actions
- Loading branch information
Showing
6 changed files
with
167 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
test/expectedTestFiles/generateTestsPatternActionsWithDelays.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
gemini.suite('Patternlab - ', function(patternlabSuite) { | ||
patternlabSuite.setUrl('/styleguide/html/styleguide.html'); | ||
|
||
gemini.suite('Pattern Name 1', function(suite) { | ||
suite | ||
.setCaptureElements(['#pattern-1 .sg-pattern-example']) | ||
.capture('desktop', function(actions, find) { | ||
actions.setWindowSize(1440, 900); | ||
}); | ||
}); | ||
|
||
|
||
gemini.suite('Pattern Name 1 --- hovered', function(suite) { | ||
suite | ||
.before(function(actions, find) { | ||
this.element = find('#pattern-1 .sg-pattern-example button') | ||
}) | ||
.setCaptureElements(['#pattern-1 .sg-pattern-example']) | ||
.capture('desktop', function(actions, find) { | ||
actions.setWindowSize(1440, 900) | ||
.moveMouse(this.element).wait(250); | ||
}); | ||
}); | ||
|
||
|
||
gemini.suite('Pattern Name 2', function(suite) { | ||
suite | ||
.setCaptureElements(['#pattern-2 .sg-pattern-example']) | ||
.capture('desktop', function(actions, find) { | ||
actions.setWindowSize(1440, 900); | ||
}); | ||
}); | ||
|
||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
test/patternlab-to-geminiConfigs/actionFocusWithDelay.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"screenSizes": { | ||
"desktop": { | ||
"width": 1440, | ||
"height": 900 | ||
} | ||
}, | ||
"patterns": { | ||
"pattern-1": { | ||
"actions": [ | ||
{ | ||
"action": "focus", | ||
"name": "action 1", | ||
"delay": 500 | ||
} | ||
] | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
test/patternlab-to-geminiConfigs/definedPatternActionsWithDelays.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"patternlabUrl": "http://localhost:3000", | ||
"screenSizes": { | ||
"desktop": { | ||
"width": 1440, | ||
"height": 900 | ||
} | ||
}, | ||
"patterns": { | ||
"pattern-1": { | ||
"actions": [ | ||
{ | ||
"action": "hover", | ||
"name": "hovered", | ||
"selector": "button", | ||
"delay": 250 | ||
} | ||
] | ||
} | ||
} | ||
} |