Skip to content

Commit fc3ef99

Browse files
committed
refactor: add new snippet
1 parent ad79112 commit fc3ef99

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Add new example snippet: `p-examples-dragAndDrop`
13+
814
## [1.2.0] - 2019-07-15
915

1016
### Added

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ Below is attached a list of all supported snippets.
135135

136136
### General Examples
137137

138-
| Snippet | Content |
139-
| ------------------ | ----------------------------------------------------------------------- |
140-
| `p-examples-basic` | Creates a basic usage example of a page |
141-
| `p-examples-sleep` | Creates an example that sleeps the browser with a specified time period |
138+
| Snippet | Content |
139+
| ------------------------ | ---------------------------------------------------------------------------------- |
140+
| `p-examples-basic` | Creates a basic usage example of a page |
141+
| `p-examples-sleep` | Creates an example that sleeps the browser with a specified time period |
142+
| `p-examples-dragAndDrop` | Creates an example that drags the mouse from a point and drops it to another point |
142143

143144
<br>
144145

snippets/snippets.json

+13
Original file line numberDiff line numberDiff line change
@@ -371,5 +371,18 @@
371371
"await sleep($0);"
372372
],
373373
"description": "Creates an example that sleeps the browser with a specified time period"
374+
},
375+
"Examples - drag and drop": {
376+
"prefix": "p-examples-dragAndDrop",
377+
"body": [
378+
"// Drags the mouse from a point",
379+
"await page.mouse.move($1);",
380+
"await page.mouse.down();",
381+
"",
382+
"// Drops the mouse to another point",
383+
"await page.mouse.move($2);",
384+
"await page.mouse.up();"
385+
],
386+
"description": "Creates an example that drags the mouse from a point and drops it to another point"
374387
}
375388
}

0 commit comments

Comments
 (0)