-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
pkg/driverThis is due to an issue in the packages/driver directoryThis is due to an issue in the packages/driver directorytype: bug
Description
Current behavior:
cy.get('#thing').trigger('mousedown', 10, 10);When the browser creates the MouseEvent object, it has a view property which points to the Window object.
Cypress does not add it during a trigger.
Apparently the d3-zoom library depends on this property being there. My app breaks when run via cypress but not when the user clicks.
Here is the property:
https://github.com/Microsoft/TypeScript/blob/master/lib/lib.dom.d.ts#L15454
Desired behavior:
During a trigger, fill in all of the same properties that the browser does when the user clicks.
Steps to reproduce: (app code and test code)
https://stackblitz.com/edit/typescript-eurovj?file=index.ts
it('should click just like the user does', () => {
cy.visit('https://typescript-eurovj.stackblitz.io');
cy.get('#rect').trigger('mousedown', 5, 5);
cy.get('#app').should('contain', 'got the view');
});Versions
Cypress 3.1.5
Metadata
Metadata
Assignees
Labels
pkg/driverThis is due to an issue in the packages/driver directoryThis is due to an issue in the packages/driver directorytype: bug