Skip to content

Commit dee2886

Browse files
committed
fix: Move evaluation of "has*" instructions after "is*" instructions
Allow existence check before class check in a single block. Forgotten change in the previous commit.
1 parent 53c1d2c commit dee2886

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

INSTRUCTIONS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ One of the instructions has to be present in every command. These properties are
2222
- [keys](#keys)
2323
- [elementSendKeys](#elementSendKeys)
2424
- [wait](#wait)
25-
- [hasAttribute](#hasattribute)
26-
- [hasClass](#hasclass)
27-
- [hasValue](#hasvalue)
28-
- [hasText](#hastext)
29-
- [hasInnerHtml](#hasinnerhtml)
30-
- [hasOuterHtml](#hasouterhtml)
3125
- [isExisting](#isexisting)
3226
- [isVisible](#isvisible)
3327
- [isVisibleWithinViewport](#isvisiblewithinviewport)
@@ -40,6 +34,12 @@ One of the instructions has to be present in every command. These properties are
4034
- [isNotEnabled](#isnotenabled)
4135
- [isNotSelected](#isnotselected)
4236
- [isNotFocused](#isnotfocused)
37+
- [hasAttribute](#hasattribute)
38+
- [hasClass](#hasclass)
39+
- [hasValue](#hasvalue)
40+
- [hasText](#hastext)
41+
- [hasInnerHtml](#hasinnerhtml)
42+
- [hasOuterHtml](#hasouterhtml)
4343
- [break](#break)
4444
- [abort](#abort)
4545
- [file](#file)

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,6 @@ One of the [instructions] has to be present in every command, otherwise its exec
297297
* [keys](INSTRUCTIONS.md#keys)
298298
* [elementSendKeys](INSTRUCTIONS.md#elementSendKeys)
299299
* [wait](INSTRUCTIONS.md#wait)
300-
* [hasAttribute](INSTRUCTIONS.md#hasattribute)
301-
* [hasClass](INSTRUCTIONS.md#hasclass)
302-
* [hasValue](INSTRUCTIONS.md#hasvalue)
303-
* [hasText](INSTRUCTIONS.md#hastext)
304-
* [hasInnerHtml](INSTRUCTIONS.md#hasinnerhtml)
305-
* [hasOuterHtml](INSTRUCTIONS.md#hasouterhtml)
306300
* [isExisting](INSTRUCTIONS.md#isexisting)
307301
* [isVisible](INSTRUCTIONS.md#isvisible)
308302
* [isVisibleWithinViewport](INSTRUCTIONS.md#isvisiblewithinviewport)
@@ -315,6 +309,12 @@ One of the [instructions] has to be present in every command, otherwise its exec
315309
* [isNotEnabled](INSTRUCTIONS.md#isnotenabled)
316310
* [isNotSelected](INSTRUCTIONS.md#isnotselected)
317311
* [isNotFocused](INSTRUCTIONS.md#isnotfocused)
312+
* [hasAttribute](INSTRUCTIONS.md#hasattribute)
313+
* [hasClass](INSTRUCTIONS.md#hasclass)
314+
* [hasValue](INSTRUCTIONS.md#hasvalue)
315+
* [hasText](INSTRUCTIONS.md#hastext)
316+
* [hasInnerHtml](INSTRUCTIONS.md#hasinnerhtml)
317+
* [hasOuterHtml](INSTRUCTIONS.md#hasouterhtml)
318318
* [break](INSTRUCTIONS.md#break)
319319
* [abort](INSTRUCTIONS.md#abort)
320320
* [file](INSTRUCTIONS.md#file)

tasks/html-dom-snapshot.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ const mkdirp = require('mkdirp')
1010
const instructionKeys = [
1111
'setViewport', 'url', 'go', 'scroll', 'focus', 'clearValue', 'setValue',
1212
'addValue', 'selectOptionByIndex', 'selectOptionByValue', 'moveCursor',
13-
'click', 'clickIfVisible', 'keys', 'elementSendKeys', 'wait', 'hasAttribute',
14-
'hasClass', 'hasValue', 'hasText', 'hasInnerHtml', 'hasOuterHtml',
13+
'click', 'clickIfVisible', 'keys', 'elementSendKeys', 'wait',
1514
'isExisting', 'isVisible', 'isVisibleWithinViewport', 'isEnabled',
1615
'isSelected', 'isFocused', 'isNotExisting', 'isNotVisible',
1716
'isNotVisibleWithinViewport', 'isNotEnabled', 'isNotFocused',
18-
'isNotSelected', 'break', 'abort'
17+
'isNotSelected', 'hasAttribute', 'hasClass', 'hasValue', 'hasText',
18+
'hasInnerHtml', 'hasOuterHtml',
19+
'break', 'abort'
1920
]
2021
const instructions = instructionKeys.map(instruction =>
2122
require('./instructions/' + instruction))

0 commit comments

Comments
 (0)