We need to consider feature tests when introducing changes in the UI.
This came up in the context of this issue and comment.
Makes further changes more resilient against possible regressions.
IMO this is not a tech debt to be dealt with later on but part of the epic, as it should have been included in https://github.com/openfoodfoundation/openfoodnetwork/pull/6905. It's just that this time, and because JB is not yet that familiar with feature specs, that we moved on.
Were you planning to do work on it yourself? My initial idea was to use this to onboard JB into this kind of test.
Great - thanks for your feedback on this @sauloperez ,
I've removed that label now, and added the issue to the to the unit prices epic :+1:
Also, please go ahead with on-boarding JB on this. It's relevant to be able to keep track of these visual changes.
Should we consider adding something like Percy https://www.browserstack.com/percy, to our CI?
I don't think we need Percy at all for this. That's what our current feature specs can already do: check that the question mark is there, it's clickable and doing so shows a tooltip with the right text.
Yes, I agree that feature specs would nicely cover the test case you describe :+1:
I'm wondering though, if feature specs could catch regressions like the misplacement of elements on the page, while not breaking the functionality of that page.
I don't advocate for Percy though. I'm rather trying to understand the limitations of feature specs, when visual tests are needed.
I'm wondering though, if feature specs could catch regressions like the misplacement of elements on the page, while not breaking the functionality of that page.
exactly. They wouldn't catch that.
This is out of scope as far as Unit prices go IMO. Introducing a new visual testing tool to catch misplacements while the feature is still functional (at least by a robot) is a totally unrelated topic.
Unit prices are already covered at feature-spec level on spec/features/admin/unit_price_spec.rb and spec/features/consumer/shopping/unit_price_spec.rb
Most helpful comment
This is out of scope as far as Unit prices go IMO. Introducing a new visual testing tool to catch misplacements while the feature is still functional (at least by a robot) is a totally unrelated topic.
Unit prices are already covered at feature-spec level on spec/features/admin/unit_price_spec.rb and spec/features/consumer/shopping/unit_price_spec.rb