Skip to content

Commit f9cee53

Browse files
authored
update prefixes to load the commands using text nw (#6)
1 parent 232cb77 commit f9cee53

File tree

4 files changed

+64
-61
lines changed

4 files changed

+64
-61
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.2.1] - 11-11-2018 (DD-MM-YYYY)
2+
### Patch
3+
- update prefix to list the commands using "nw"
4+
15
## [0.2.0] - 11-11-2018 (DD-MM-YYYY)
26
### Update
37
- add client commands and assertions

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
[![Installs](https://vsmarketplacebadge.apphb.com/installs/Raju.vscode-nightwatchjs-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=Raju.vscode-nightwatchjs-snippets)
55
[![Ratings](https://vsmarketplacebadge.apphb.com/rating/Raju.vscode-nightwatchjs-snippets.svg)](https://marketplace.visualstudio.com/items?itemName=Raju.vscode-nightwatchjs-snippets)
66

7+
Please type "nw" first and it will list down all the commands
8+
79
## The below commands are supported in this version
810

911
* **attributeContains**(selector, attribute, expected, optionalMessage)
@@ -22,12 +24,10 @@
2224
* **value**(expected, optionalMessage)
2325
* **valueContains**(selector, expected, optionalMessage)
2426
* **visible**(selector, optionalMessage)
25-
2627
* **waitForElementNotPresent**(selector, time)
2728
* **waitForElementNotVisible**(selector, time)
2829
* **waitForElementPresent**(selector, time)
2930
* **waitForElementVisible**(selector, time)
30-
3131
* **click**(selector, optionalCallback)
3232
* **clearValue**(selector, optionalCallback)
3333
* **getAttribute**(selector, attribute, callback)
@@ -42,7 +42,6 @@
4242
* **moveToElement**(selector, xoffset, yoffset, optionalCallback)
4343
* **setValue**(selector, inputValue, optionalCallback)
4444
* **submitForm**(selector, optionalCallback)
45-
4645
* **end**(optionalCallback)
4746
* **pause**(1000ms, optionalCallback)
4847
* **perform**(optionalCallback)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vscode-nightwatchjs-snippets",
3-
"version": "0.2.0",
3+
"version": "0.2.1",
44
"description": "NightwatchJS code snippets for Visual Studio Code",
55
"displayName": "NightwatchJS snippets",
66
"publisher": "Raju",

snippets/nightwatchsnippets.json

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,286 +1,286 @@
11
{
22
"end": {
3-
"prefix": "end",
3+
"prefix": "nwend",
44
"body": "end(${0:optionalCallback})",
55
"description": "end(optionalCallback)"
66
},
77
"pause": {
8-
"prefix": "pause",
8+
"prefix": "nwpause",
99
"body": "pause(${0:1000ms}, ${1:optionalCallback})",
1010
"description": "pause(timems, optionalCallback)"
1111
},
1212
"perform": {
13-
"prefix": "per",
13+
"prefix": "nwperform",
1414
"body": "perform(${0:optionalCallback})",
1515
"description": "perform(optionalCallback)"
1616
},
1717
"useCss": {
18-
"prefix": "usec",
18+
"prefix": "nwuseCss",
1919
"body": "useCss(${0:optionalCallback})",
2020
"description": "useCss(optionalCallback"
2121
},
2222
"useXpath": {
23-
"prefix": "usex",
23+
"prefix": "nwuseXpath",
2424
"body": "useXpath(${0:optionalCallback})",
2525
"description": "useXpath(optionalCallback)"
2626
},
2727
"switchWindow": {
28-
"prefix": "swiw",
28+
"prefix": "nwswitchWindow",
2929
"body": "switchWindow(${0:handleOrName}, ${1:optionalCallback})",
3030
"description": "switchWindow(handleOrName, optionalCallback)"
3131
},
3232
"resizeWindow": {
33-
"prefix": "resw",
33+
"prefix": "nwresizeWindow",
3434
"body": "resizeWindow(${0:width}, ${1:height}, ${2:optionalCallback})",
3535
"description": "resizeWindow(width, height, optionalCallback)"
3636
},
3737
"setWindowPosition": {
38-
"prefix": "setw",
38+
"prefix": "nwsetWindowPosition",
3939
"body": "setWindowPosition(${0:offsetX}, ${1:offsetY}, ${2:optionalCallback})",
4040
"description": "setWindowPosition(offsetX, offsetY, optionalCallback)"
4141
},
4242
"maximizeWindow": {
43-
"prefix": "maxw",
43+
"prefix": "nwmaximizeWindow",
4444
"body": "maximizeWindow(${0:optionalCallback})",
4545
"description": "maximizeWindow(optionalCallback)"
4646
},
4747
"saveScreenshot": {
48-
"prefix": "saves",
48+
"prefix": "nwsaveScreenshot",
4949
"body": "saveScreenshot(${0:fileName}, ${1:optionalCallback})",
5050
"description": "saveScreenshot(fileName, optionalCallback)"
5151
},
5252
"getTitle": {
53-
"prefix": "gett",
53+
"prefix": "nwgetTitle",
5454
"body": "getTitle(${0:callback})",
5555
"description": "getTitle(callback)"
5656
},
5757
"closeWindow": {
58-
"prefix": "clow",
58+
"prefix": "nwcloseWindow",
5959
"body": "closeWindow(${0:optionalCallback})",
6060
"description": "closeWindow(optionalCallback)"
6161
},
6262
"init": {
63-
"prefix": "in",
63+
"prefix": "nwinit",
6464
"body": "init(${0:URL}, ${1:optionalCallback})",
6565
"description": "init(URL, optionalCallback)"
6666
},
6767
"urlHash": {
68-
"prefix": "urlh",
68+
"prefix": "nwurlHash",
6969
"body": "urlHash(${0:hash}, ${1:optionalCallback})",
7070
"description": "urlHash(hash, optionalCallback)"
7171
},
7272
"getCookies": {
73-
"prefix": "getcs",
73+
"prefix": "nwgetCookies",
7474
"body": "getCookies(${0:callback})",
7575
"description": "getCookies(callback)"
7676
},
7777
"getCookie": {
78-
"prefix": "getc",
78+
"prefix": "nwgetCookie",
7979
"body": "getCookie(${0:cookieName}, ${1:callback})",
8080
"description": "getCookie(cookieName, callback)"
8181
},
8282
"setCookie": {
83-
"prefix": "setc",
83+
"prefix": "nwsetCookie",
8484
"body": "setCookie(${0:cookieObject}, ${1:optionalCallback})",
8585
"description": "setCookie(cookieObject, optionalCallback)"
8686
},
8787
"deleteCookie": {
88-
"prefix": "delc",
88+
"prefix": "nwdeleteCookie",
8989
"body": "deleteCookie(${0:cookieName}, ${1:callback})",
9090
"description": "deleteCookie(cookieName, callback)"
9191
},
9292
"deleteCookies": {
93-
"prefix": "delcs",
93+
"prefix": "nwdeleteCookies",
9494
"body": "deleteCookies(${0:optionalCallback})",
9595
"description": "deleteCookies(optionalCallback)"
9696
},
9797
"injectScript": {
98-
"prefix": "injs",
98+
"prefix": "nwinjectScript",
9999
"body": "injectScript(${0:scriptUrl}, ${1:id}, ${2:optionalCallback})",
100100
"description": "injectScript(scriptUrl, id, optionalCallback)"
101101
},
102102
"getLogTypes": {
103-
"prefix": "getlt",
103+
"prefix": "nwgetLogTypes",
104104
"body": "getLogTypes(${0:callback})",
105105
"description": "getLogTypes(callback)"
106106
},
107107
"getLog": {
108-
"prefix": "getl",
108+
"prefix": "nwgetLog",
109109
"body": "getLog(${0:typeString}, ${1:callback})",
110110
"description": "getLog(typeString, callback)"
111111
},
112112
"isLogAvailable": {
113-
"prefix": "isla",
113+
"prefix": "nwisLogAvailable",
114114
"body": "isLogAvailable(${0:typeString}, ${1:callback})",
115115
"description": "isLogAvailable(typeString, callback)"
116116
},
117117
"click": {
118-
"prefix": "cli",
118+
"prefix": "nwclick",
119119
"body": "click(${0:selector}, ${1:optionalCallback})",
120120
"description": "click(selector, optionalCallback)"
121121
},
122122
"clearValue": {
123-
"prefix": "clev",
123+
"prefix": "nwclearValue",
124124
"body": "clearValue(${0:selector}, ${1:optionalCallback})",
125125
"description": "clearValue(selector, optionalCallback)"
126126
},
127127
"getAttribute": {
128-
"prefix": "geta",
128+
"prefix": "nwgetAttribute",
129129
"body": "getAttribute(${0:selector}, ${1:attribute}, ${2:callback})",
130130
"description": "getAttribute(selector, attribute, callback)"
131131
},
132132
"getCssProperty": {
133-
"prefix": "getcp",
133+
"prefix": "nwgetCssProperty",
134134
"body": "getCssProperty(${0:selector}, ${1:cssProperty}, ${2:callback})",
135135
"description": "getCssProperty(selector, cssProperty, callback)"
136136
},
137137
"getElementSize": {
138-
"prefix": "getes",
138+
"prefix": "nwgetElementSize",
139139
"body": "getElementSize(${0:selector}, ${1:callback})",
140140
"description": "getElementSize(selector, callback)"
141141
},
142142
"getLocation": {
143-
"prefix": "getl",
143+
"prefix": "nwgetLocation",
144144
"body": "getLocation(${0:selector}, ${1:callback})",
145145
"description": "getLocation(selector, callback)"
146146
},
147147
"getLocationInView": {
148-
"prefix": "getlv",
148+
"prefix": "nwgetLocationInView",
149149
"body": "getLocationInView(${0:selector}, ${1:callback})",
150150
"description": "getLocationInView(selector, callback)"
151151
},
152152
"getTagName": {
153-
"prefix": "getta",
153+
"prefix": "nwgetTagName",
154154
"body": "getTagName(${0:selector}, ${1:callback})",
155155
"description": "getTagName(selector, callback)"
156156
},
157157
"getText": {
158-
"prefix": "gett",
158+
"prefix": "nwgetText",
159159
"body": "getText(${0:selector}, ${1:callback})",
160160
"description": "getText(selector, callback)"
161161
},
162162
"getValue": {
163-
"prefix": "getv",
163+
"prefix": "nwgetValue",
164164
"body": "getValue(${0:selector}, ${1:callback})",
165165
"description": "getValue(selector, callback)"
166166
},
167167
"isVisible": {
168-
"prefix": "isv",
168+
"prefix": "nwisVisible",
169169
"body": "isVisible(${0:selector}, ${1:callback})",
170170
"description": "isVisible(selector, callback)"
171171
},
172172
"moveToElement": {
173-
"prefix": "movte",
173+
"prefix": "nwmoveToElement",
174174
"body": "moveToElement(${0:selector}, ${1:xoffset}, ${2:yoffset}, ${3:optionalCallback})",
175175
"description": "moveToElement(selector, xoffset, yoffset, optionalCallback)"
176176
},
177177
"setValue": {
178-
"prefix": "setv",
178+
"prefix": "nwsetValue",
179179
"body": "setValue(${0:selector}, ${1:inputValue}, ${2:optionalCallback})",
180180
"description": "setValue(selector, inputValue, optionalCallback)"
181181
},
182182
"submitForm": {
183-
"prefix": "subf",
183+
"prefix": "nwsubmitForm",
184184
"body": "submitForm(${0:selector}, ${1:optionalCallback})",
185185
"description": "submitForm(selector, optionalCallback)"
186186
},
187187
"attributeContains": {
188-
"prefix": "attc",
188+
"prefix": "nwattributeContains",
189189
"body": "attributeContains(${0:selector}, ${1:attribute}, ${2:expected}, ${3:optionalMessage})",
190190
"description": "attributeContains(selector, attribute, expected, optionalMessage)"
191191
},
192192
"attributeEquals": {
193-
"prefix": "atte",
193+
"prefix": "nwattributeEquals",
194194
"body": "attributeEquals(${0:selector}, ${1:attribute}, ${2:expected}, ${3:optionalMessage})",
195195
"description": "attributeEquals(selector, attribute, expected, optionalMessage)"
196196
},
197197
"containsText": {
198-
"prefix": "contt",
198+
"prefix": "nwcontainsText",
199199
"body": "containsText(${0:selector}, ${1:expectedText}, ${2:optionalMessage})",
200200
"description": "containsText(selector, expectedText, optionalMessage)"
201201
},
202202
"cssClassNotPresent": {
203-
"prefix": "csscnp",
203+
"prefix": "nwcssClassNotPresent",
204204
"body": "cssClassNotPresent(${0:selector}, ${1:className}, ${2:optionalMessage})",
205205
"description": "cssClassNotPresent(selector, className, optionalMessage)"
206206
},
207207
"cssClassPresent": {
208-
"prefix": "csscp",
208+
"prefix": "nwcssClassPresent",
209209
"body": "cssClassPresent(${0:selector}, ${1:className}, ${2:optionalMessage})",
210210
"description": "cssClassPresent(selector, className, optionalMessage)"
211211
},
212212
"cssProperty": {
213-
"prefix": "cssp",
213+
"prefix": "nwcssProperty",
214214
"body": "cssProperty(${0:selector}, ${1:cssProperty}, ${2:expected}, ${3:optionalMessage})",
215215
"description": "cssProperty(selector, cssProperty, expected, optionalMessage)"
216216
},
217217
"elementNotPresent": {
218-
"prefix": "elemnp",
218+
"prefix": "nwelementNotPresent",
219219
"body": "elementNotPresent(${0:selector}, ${1:optionalMessage})",
220220
"description": "elementNotPresent(selector, optionalMessage)"
221221
},
222222
"elementPresent": {
223-
"prefix": "elemp",
223+
"prefix": "nwelementPresent",
224224
"body": "elementPresent(${0:selector}, ${1:optionalMessage})",
225225
"description": "elementPresent(selector, optionalMessage)"
226226
},
227227
"hidden": {
228-
"prefix": "hid",
228+
"prefix": "nwhidden",
229229
"body": "hidden(${0:selector}, ${1:optionalMessage})",
230230
"description": "hidden(selector, optionalMessage)"
231231
},
232232
"title": {
233-
"prefix": "titl",
233+
"prefix": "nwtitle",
234234
"body": "title(${0:expected}, ${1:optionalMessage})",
235235
"description": "title(expected, optionalMessage)"
236236
},
237237
"titleContains": {
238-
"prefix": "titlec",
238+
"prefix": "nwtitleContains",
239239
"body": "titleContains(${0:expected}, ${1:optionalMessage})",
240240
"description": "titleContains(expected, optionalMessage)"
241241
},
242242
"urlContains": {
243-
"prefix": "urlc",
243+
"prefix": "nwurlContains",
244244
"body": "urlContains(${0:expected}, ${1:optionalMessage})",
245245
"description": "urlContains(expected, optionalMessage)"
246246
},
247247
"urlEquals": {
248-
"prefix": "urle",
248+
"prefix": "nwurlEquals",
249249
"body": "urlEquals(${0:expected}, ${1:optionalMessage})",
250250
"description": "urlEquals(expected, optionalMessage)"
251251
},
252252
"value": {
253-
"prefix": "val",
253+
"prefix": "nwvalue",
254254
"body": "value(${0:expected}, ${1:optionalMessage})",
255255
"description": "value(expected, optionalMessage)"
256256
},
257257
"valueContains": {
258-
"prefix": "valueco",
258+
"prefix": "nwvalueContains",
259259
"body": "valueContains(${0:selector}, ${1:expected}, ${2:optionalMessage})",
260260
"description": "valueContains(selector, expected, optionalMessage)"
261261
},
262262
"visible": {
263-
"prefix": "visi",
263+
"prefix": "nwvisible",
264264
"body": "visible(${0:selector}, ${1:optionalMessage})",
265265
"description": "visible(selector, optionalMessage)"
266266
},
267267
"waitForElementNotPresent": {
268-
"prefix": "waitenp",
268+
"prefix": "nwwaitForElementNotPresent",
269269
"body": "waitForElementNotPresent(${0:selector}, ${1:time})",
270270
"description": "waitForElementNotPresent(selector, time)"
271271
},
272272
"waitForElementNotVisible": {
273-
"prefix": "waitenv",
273+
"prefix": "nwwaitForElementNotVisible",
274274
"body": "waitForElementNotVisible(${0:selector}, ${1:time})",
275275
"description": "waitForElementNotVisible(selector, time)"
276276
},
277277
"waitForElementPresent": {
278-
"prefix": "waitep",
278+
"prefix": "nwwaitForElementPresent",
279279
"body": "waitForElementPresent(${0:selector}, ${1:time})",
280280
"description": "waitForElementPresent(selector, time)"
281281
},
282282
"waitForElementVisible": {
283-
"prefix": "waitev",
283+
"prefix": "nwwaitForElementVisible",
284284
"body": "waitForElementVisible(${0:selector}, ${1:time})",
285285
"description": "waitForElementVisible(selector, time)"
286286
}

0 commit comments

Comments
 (0)