happo / happo-cypress

A Happo integration with Cypress.io
35 stars 4 forks source link

Send fallback shas to Happo server #81

Closed trotzig closed 3 years ago

trotzig commented 3 years ago

Support for fallback shas to use as the baseline was added earlier this year for the main happo.io library [1]. But the happo-cypress library was never updated. I just had a support issue where someone was trying to compare using a different base branch than master, and they were getting confusing results.

Fallback shas take precedence over Happo's default way of resolving baseline reports from the main/default branch.

I was a little confused to see that the format for fallbackShas passed to compareReports was expected to be "raw" and that string splitting happened late. Not going to worry about that right now, but might be worth making the interface a little nicer. https://github.com/happo/happo.io/blob/8bf7980a69572066fec6daf81c0a1249d50e6051/src/commands/compareReports.js#L27

[1] https://github.com/happo/happo.io/releases/tag/v6.6.0