PoonLab/covizu

Cypress: Tests passing in Electron Browser only

Closed this issue · 4 comments

This might be related to this issue here.
I wrote a test to verify that the tips have the right colours. This test passes in the Interactive version of the Electron browser but it fails in Headless mode of the Electron browser.

Test passes in the Interactive Browser (npx cypress open)

Cypress-Test-Passes-in-Electron-Browser

Test fails in Headless Browser (npx cypress run)

Cypress-Test-Fails-in-Headless-Mode

Upon changing the colourScale to Region, the colour of the first tip is expected to be rgb(68,187,153) which is a cyanish colour. But the actual colour is rgb(109,29,106) which is a purple hue from the default Divergence colour scale. So, it seems like the dropdown does not fully trigger the event of selection. I've tried increasing the timeout but that didn't work.

@nav-mohan reports that this is a known issue without a resolution. If there is not a better way to write this test, we will need to bypass it for now.

@nav-mohan please update - did we bypass these tests?

Yes, currently we are overriding that section of the test.
@GopiGugan suggested that we could change the colorScale without clicking on the dropdown button. I should look into that approach. It wouldn't be a perfect test of the UI but it would be close enough.

Commented out for the time being