Amphtml: Visual Diff: Expose helpers for common DOM Apis

Created on 12 Feb 2019  路  3Comments  路  Source: ampproject/amphtml

Feedback from the visual diff workshop

Currently, we have to write own helpers such as in #20783 to do things like localStorage. Would be nice to have helpers to do all of these asynchronous tasks in a single location that could be maintained from there, rather than in the test itself.

Feature Request infra

Most helpful comment

I keep an eye on new tests, so if I see that there's a repeated demand for some APIs I can always add a helper method and refactor those tests that use them. I think Puppeteer has a wide enough API already for most cases, but of course I might be wrong since I'm not the one writing the tests. Closing this for now, we can always revisit if there's more explicit API requests :)

All 3 comments

The localStorage functions seem to be only used in that one test, I don't think most other tests would need it. Were there specific things you've noticed were re-implemented in multiple tests?

@danielrozenberg So honestly, I only see localStorage being used today. As that is what I am familiar with, and this was more of a pre-emptive measure for the API.

Was a little unsure how fleshed out the visual diff testing is, so if you don't see anymore DOM APIs being a problem than I think we should be fine 馃槃

Feel free to close.

I keep an eye on new tests, so if I see that there's a repeated demand for some APIs I can always add a helper method and refactor those tests that use them. I think Puppeteer has a wide enough API already for most cases, but of course I might be wrong since I'm not the one writing the tests. Closing this for now, we can always revisit if there's more explicit API requests :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gmajoulet picture gmajoulet  路  3Comments

radiovisual picture radiovisual  路  3Comments

mkhatib picture mkhatib  路  3Comments

aghassemi picture aghassemi  路  3Comments

jpettitt picture jpettitt  路  3Comments