Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map not responding to mouse commands #2768

Closed
justin-bits opened this issue Nov 12, 2018 · 5 comments · Fixed by #3030
Closed

Map not responding to mouse commands #2768

justin-bits opened this issue Nov 12, 2018 · 5 comments · Fixed by #3030

Comments

@justin-bits
Copy link

justin-bits commented Nov 12, 2018

Current behavior:

No response from the map in application under test to mouse commands in Cypress test script.

Desired behavior:

Looking for a way to update test script so that mouse commands work with the map, or updates to Cypress.

Steps to reproduce:

This test script has four different attempts to use mouse commands on the map in this application, none of them are working.

describe('mouse test', function () {
	before('open application', function () {
		cy.visit('https://master-branch-opensphere-ngageoint.surge.sh/?tips=false')
		cy.get('.webgl-canvas', {timeout: 12000}) // map loaded
		cy.get('body').type('+++++++++++++++++++++++++') // zoom in on the map
		cy.get('.close > span').click() // close layers widget
	})

	it('open map context menu', function () {
		cy.get('.webgl-canvas').trigger('contextmenu')  // attempt to open the context menu
		cy.get('#menu') // check for menu
	})

	it('zoom on double click', function () {
		cy.get('.zoom-text').should('have.text', 'Zoom: 6.2')// verify current zoom level
		cy.get('.webgl-canvas')
			.dblclick()
			.dblclick()
			.dblclick()
			.dblclick()
			.dblclick()
			.dblclick()
			.dblclick()
			.dblclick()
		cy.get('.zoom-text').should('not.have.text', 'Zoom: 6.2')// verify current zoom level
	})


	it('load query area (query button)', function () {
		cy.get('[title="Draws a box on the map for queries, zoom, and selection"]').click() // activate query tool
		cy.get('[class="btn btn-primary on active"]') // verify query tool active

		cy.get('body').as('map')
		cy.get('@map') // attempt to draw a query area
			.trigger('mousedown', "center", {force:true})
			.trigger('mousemove', 400, 400, {force:true})
			.trigger('mouseup', 400, 400, {force:true})

		cy.get('#menu') // check for menu
	})

	it('load query area (keyboard and mouse)', function () {
		cy.get('body').as('map')
		cy.get('@map') // attempt to draw a query area
			.type('{ctrl}', {release:false,force:true}).click(400,400)
			.type('{ctrl}', {release:true,force:true}).click(600,600)
			
		cy.get('#menu') // check for menu
	})
})

Versions

Cypress 3.1.1
Chrome 70
Windows 10 / macOS 10.12.6

@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Nov 14, 2018
@kuceb
Copy link
Contributor

kuceb commented Dec 17, 2018

@justin-bits we're planning on supporting drag-and-drop and right click in the future , and we're also fixing the events fired for dblclick in the native events release.
Thanks for the reproducible example!

@justin-bits
Copy link
Author

Great, thanks! This is definitely something I need for my tests.

@kuceb
Copy link
Contributor

kuceb commented Jul 29, 2019

I've verified that #3030 will fix your test cases open map context menu (you can use .rightclick() instead of .trigger) and zoom on doubleclick, so this issue will be closed with that PR.

The drag-and-drop is a separate issue #857 , so those tests will continue to fail

@cypress-bot cypress-bot bot added stage: work in progress and removed stage: needs investigating Someone from Cypress needs to look at this labels Jul 30, 2019
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review stage: work in progress and removed stage: work in progress stage: needs review The PR code is done & tested, needs review labels Aug 8, 2019
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Sep 6, 2019
@cypress-bot cypress-bot bot added stage: work in progress stage: needs review The PR code is done & tested, needs review and removed stage: needs review The PR code is done & tested, needs review stage: work in progress labels Sep 25, 2019
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: work in progress labels Oct 7, 2019
@cypress-bot cypress-bot bot added stage: pending release and removed stage: needs review The PR code is done & tested, needs review labels Oct 11, 2019
@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 11, 2019

The code for this is done in cypress-io/cypress#3030, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Oct 23, 2019

Released in 3.5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants