Skip to content

Improved mouse position e2e tests#304

Merged
ltshb merged 1 commit intodevelopfrom
bug-mouseposition-e2e
Nov 23, 2022
Merged

Improved mouse position e2e tests#304
ltshb merged 1 commit intodevelopfrom
bug-mouseposition-e2e

Conversation

@ltshb
Copy link
Contributor

@ltshb ltshb commented Nov 22, 2022

This test did sometimes not pass without a useful info of the failure reason.
Hopefully with this changes we can have a better understanding why this test
is sometimes failing.

Test link

@ltshb ltshb requested a review from pakb November 22, 2022 14:35
@github-actions github-actions bot added the bug label Nov 22, 2022
Copy link
Contributor

@pakb pakb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea, although I'm suspecting nothing will be present in text, and the issue is somewhat related to mouse position not being interpreted correctly (we use a .click to position the mouse)

@ltshb
Copy link
Contributor Author

ltshb commented Nov 22, 2022

@pakb could not be due to a timing problem between click() and cy.get('[data-cy="mouse-position"]') ? Should we not have some kind of wait to have the position popup visible ?

function checkMousePositionNumberValue(expectedX, expectedY, parser) {
    cy.get('[data-cy="map"]').click()
    cy.get('[data-cy="mouse-position"]')
        .invoke('text')
        .then(parser)
        .then(checkXY(expectedX, expectedY))
}

@pakb
Copy link
Contributor

pakb commented Nov 22, 2022

There should not be backend requests here, it should be seamless, so no alias to wait on... If we continue having issue with this test we could consider waiting for an arbitrary length of time (which is a bad practice with Cypress, but this test is way too prone to fail not to try fixing it)

@ltshb ltshb force-pushed the bug-mouseposition-e2e branch from 1d25449 to 9f36c71 Compare November 22, 2022 15:05
This test did sometimes not pass without a useful info of the failure reason.
Hopefully with this changes we can have a better understanding why this test
is sometimes failing.
@ltshb ltshb force-pushed the bug-mouseposition-e2e branch from 9f36c71 to 5fc02aa Compare November 22, 2022 15:11
@ltshb ltshb merged commit e78439e into develop Nov 23, 2022
@ltshb ltshb deleted the bug-mouseposition-e2e branch November 23, 2022 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants