Skip to content

Commit 914eb49

Browse files
committed
pause command works like in spec
1 parent 331eedc commit 914eb49

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/selenium-ide/src/neo/IO/SideeX/ext-command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export default class ExtCommand {
212212
});
213213
}
214214

215-
doPause(ignored, milliseconds) {
215+
doPause(milliseconds) {
216216
return new Promise(function(resolve) {
217217
setTimeout(resolve, milliseconds);
218218
});

packages/selianize/__tests__/command.spec.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,10 @@ describe("command code emitter", () => {
166166
it("should emit `pause` command", () => {
167167
const command = {
168168
command: "pause",
169-
target: "",
170-
value: "300"
169+
target: "300",
170+
value: ""
171171
};
172-
return expect(CommandEmitter.emit(command)).resolves.toBe(`await driver.sleep(${command.value});`);
172+
return expect(CommandEmitter.emit(command)).resolves.toBe(`await driver.sleep(${command.target});`);
173173
});
174174
it("should emit `verify checked` command", () => {
175175
const command = {

packages/selianize/src/command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ async function emitExecuteAsyncScript(script, varName) {
188188
return Promise.resolve(`vars["${varName}"] = await driver.executeAsyncScript(\`var callback = arguments[arguments.length - 1];${script}.then(callback).catch(callback);\`);`);
189189
}
190190

191-
async function emitPause(_, time) {
191+
async function emitPause(time) {
192192
return Promise.resolve(`await driver.sleep(${time});`);
193193
}
194194

0 commit comments

Comments
 (0)