How to use the test-drive-react.simulate.touchStart function in test-drive-react

To help you get started, we’ve selected a few test-drive-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix-playground / stylable-components / test / components / slider.spec.tsx View on Github external
await waitFor(() => {
                const element = select('SLIDER');

                simulate.touchStart(element, {
                    currentTarget: element!,
                    touches: {
                        0: {
                            clientX: eventMock.clientX,
                            clientY: eventMock.clientY
                        }
                    } as any as TouchList
                });
                simulateTouchEvent(
                    environment,
                    'touchmove',
                    {
                        clientX: eventMock.clientX,
                        clientY: eventMock.clientY
                    }
                );
github wix-playground / stylable-components / test-kit / components / slider-driver.ts View on Github external
public touchStart(event: SliderEventCoordinates) {
        const element = this.slider;
        simulate.touchStart(element, {
            preventDefault: noop,
            currentTarget: element,
            touches: {
                0: {
                    clientX: event.clientX,
                    clientY: event.clientY
                }
            } as any as TouchList
        });
    }