PoonLab / covizu

Rapid analysis and visualization of coronavirus genome variation
https://filogeneti.ca/CoVizu/
MIT License
45 stars 20 forks source link

Cypress: Tests passing in Electron Browser only #462

Closed nav-mohan closed 1 year ago

nav-mohan commented 1 year ago

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.

ArtPoon commented 1 year ago

@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.

ArtPoon commented 1 year ago

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

nav-mohan commented 1 year ago

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.

ArtPoon commented 1 year ago

Commented out for the time being