Testcafe tiene un comportamiento inusual cuando opera un widget de checkboxradio de jQuery mobile. t.click() da como resultado dos eventos de clic que se activan en la entrada de la casilla de verificación. Ambos clics parecen provenir de testcafe.
Prueba de casilla de verificación de vainilla de trabajo:
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); });casilla de jQuery mobile (falla)
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); });¿Alguien familiarizado con este tema? ¿Alguna solución?