Skip to content

Commit ccce45e

Browse files
committed
make to separate isTerminal and isDisabled.
1 parent 27cfd68 commit ccce45e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

packages/selenium-ide/src/neo/playback/playback-tree/command-node.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,22 @@ export class CommandNode {
5555
isTerminal() {
5656
return (
5757
ControlFlowCommandChecks.isTerminal(this.command) ||
58-
this.command.command === '' ||
59-
this.command.command.startsWith('//')
58+
this.command.command === ''
6059
)
6160
}
6261

62+
isDisabled() {
63+
return this.command.command.startsWith('//')
64+
}
65+
6366
execute(commandExecutor, options, targetOverride) {
6467
if (this._isRetryLimit()) {
6568
return Promise.resolve({
6669
result:
6770
'Max retry limit exceeded. To override it, specify a new limit in the value input field.',
6871
})
6972
}
70-
if (this.isTerminal()) {
73+
if (this.isDisabled()) {
7174
return Promise.resolve(
7275
this._executionResult(commandExecutor, { result: 'success' })
7376
)
@@ -112,6 +115,10 @@ export class CommandNode {
112115
throw new Error(`Unknown command ${this.command.command}`)
113116
} else if (this.isControlFlow()) {
114117
return this._evaluate(commandExecutor)
118+
} else if (this.isTerminal()) {
119+
return Promise.resolve({
120+
result: 'success',
121+
})
115122
} else if (
116123
this.isWebDriverCommand(commandExecutor) ||
117124
this.isExtCommand(commandExecutor)

0 commit comments

Comments
 (0)