Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding E2E Tests #2795

Closed
22 tasks
swissspidy opened this issue Jul 11, 2019 · 2 comments
Closed
22 tasks

Adding E2E Tests #2795

swissspidy opened this issue Jul 11, 2019 · 2 comments
Labels
Enhancement New feature or improvement of an existing one Epic Needs Tests Task Tasks which do not involve engineering WS:Core Work stream for Plugin core

Comments

@swissspidy
Copy link
Collaborator

swissspidy commented Jul 11, 2019

Now that we have the E2E testing infrastructure set up (see #2696), we should look into how we can best leverage that to further improve code quality and catch bugs in the AMP Stories editor.

While we of course can add E2E tests for all aspects of the AMP plugin, we should focus on AMP Stories first. Still, I am mentioning some of the other areas in the plugin here.

#2779 is related, but I'd want to focus on E2E tests first instead of the unit tests, as I think here we have the bigger opportunity to solidify the AMP Stories editor.

Ideally, going forward we add E2E tests whenever we work on an area that is a good fit for such a test or when we introduce a new feature. Then, later we can go through pre-existing areas to add them.

Testable Areas

The following list is not necessarily complete, but should give a good idea about what we can and should test.

  • Block Editor
    • Reader Mode
      • Verify that customizer controls and toggles are visible and working
    • Transitional Mode
      • Verify that AMP blocks are not available in the editor
    • Standard Mode
      • Verify that AMP blocks are available in the editor
    • Block validation
      • Verify that block validation happens when AMP is enabled for the current post.
      • Verify that block validation is not happening when AMP is disabled for the current post.
  • Settings
    • Verify visibility of post type selection area depending on whether Website Mode is active.
    • Verify that Story Export URL is only visible when Stories experience is toggled
  • Validation Screen
    • Verify status changes
    • Verify alter when there are unsaved changes
  • Integrations
    • PWA (there is nothing user-facing yet)
    • Site Kit (maybe in the future if not already done in Site Kit)

Infrastructure Changes

  • Create additional helper plugins that we might need during E2E tests, and set this up accordingly.
    • One example could be a plugin that makes sure pointers can not be dismissed permanently, makes testing of these easier
  • Possibly use smarter APIs like expect(instance).toMatchElement(selector[, options]) instead of XPath -> E2E Tests: Avoid using XPath #2888.
  • Possibly also run E2E tests against an older WordPress version
@swissspidy swissspidy added Enhancement New feature or improvement of an existing one Task Tasks which do not involve engineering Needs Tests labels Jul 11, 2019
@miina
Copy link
Contributor

miina commented Jul 18, 2019

FI: I'm adding some CTA-related e2e tests within #2824.

@westonruter
Copy link
Member

For testing mobile redirection, see #5268.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement of an existing one Epic Needs Tests Task Tasks which do not involve engineering WS:Core Work stream for Plugin core
Projects
Archived in project
Development

No branches or pull requests

4 participants