Testcafe has unusual behavior when operating a jQuery mobile checkboxradio widget. t.click() results in two click events being fired on the checkbox input. Both of these clicks appear to come from testcafe.
Working vanilla checkbox test:
import { Selector } from 'testcafe';
fixture`checkboxradio test`
.page`https://html.form.guide/checkbox/html-form-with-checkbox/`;
test('Checkbox state from testcafe', async t => {
const cb = await Selector('input[type=checkbox]');
await t.expect(cb.nth(0).checked).eql(false)
.click(cb.nth(0));
await t.expect(cb.nth(0).checked).eql(true);
});
jQuery mobile checkbox (fails)
import { Selector } from 'testcafe';
fixture`checkboxradio test`
.page`https://demos.jquerymobile.com/1.4.5/checkboxradio-checkbox/`;
test('Checkbox state from testcafe', async t => {
const cb = await Selector('#checkbox-h-2a');
await t.expect(cb.checked).eql(false)
.click(cb);
await t.expect(cb.checked).eql(true);
});
Anyone familiar with this issue? Any workarounds?