Skip to content

Commit

Permalink
fix throttle and delay arg in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-atr committed Oct 10, 2022
1 parent 6913717 commit ae82d2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/scriptlets/trusted-click-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ export function trustedClickElement(source, selectors, extraMatch = '', delay =
return;
}

cb(args);
cb(...args);
wait = true;

setTimeout(() => {
Expand Down
10 changes: 5 additions & 5 deletions tests/scriptlets/trusted-click-element.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ test('Single element clicked, delay is set', (assert) => {
const done2 = assert.async();
const selectorsString = `#${PANEL_ID} > #${CLICKABLE_NAME}${ELEM_COUNT}`;

runScriptlet(name, [selectorsString, DELAY]);
runScriptlet(name, [selectorsString, '', DELAY]);
const panel = createPanel();
const clickable = createClickable(1);
panel.appendChild(clickable);
Expand Down Expand Up @@ -174,7 +174,7 @@ test('extraMatch - single cookie match, matched', (assert) => {

const selectorsString = `#${PANEL_ID} > #${CLICKABLE_NAME}${ELEM_COUNT}`;

runScriptlet(name, [selectorsString, '', EXTRA_MATCH_STR]);
runScriptlet(name, [selectorsString, EXTRA_MATCH_STR]);
const panel = createPanel();
const clickable = createClickable(1);
panel.appendChild(clickable);
Expand Down Expand Up @@ -202,7 +202,7 @@ test('extraMatch - single cookie match, not matched', (assert) => {

const selectorsString = `#${PANEL_ID} > #${CLICKABLE_NAME}${ELEM_COUNT}`;

runScriptlet(name, [selectorsString, '', EXTRA_MATCH_STR]);
runScriptlet(name, [selectorsString, EXTRA_MATCH_STR]);
const panel = createPanel();
const clickable = createClickable(1);
panel.appendChild(clickable);
Expand All @@ -228,7 +228,7 @@ test('extraMatch - single localStorage match, matched', (assert) => {

const selectorsString = `#${PANEL_ID} > #${CLICKABLE_NAME}${ELEM_COUNT}`;

runScriptlet(name, [selectorsString, '', EXTRA_MATCH_STR]);
runScriptlet(name, [selectorsString, EXTRA_MATCH_STR]);
const panel = createPanel();
const clickable = createClickable(1);
panel.appendChild(clickable);
Expand All @@ -255,7 +255,7 @@ test('extraMatch - single localStorage match, not matched', (assert) => {

const selectorsString = `#${PANEL_ID} > #${CLICKABLE_NAME}${ELEM_COUNT}`;

runScriptlet(name, [selectorsString, '', EXTRA_MATCH_STR]);
runScriptlet(name, [selectorsString, EXTRA_MATCH_STR]);
const panel = createPanel();
const clickable = createClickable(1);
panel.appendChild(clickable);
Expand Down

0 comments on commit ae82d2d

Please # to comment.