Now that we've got a pretty good body of Behat tests going, there's starting to be some pretty clear ways we could refactor them to make it easier to create new tests and maintain the existing ones.

Here are some of the things I'd like to do:

  1. #2291961: Create a panopoly_test module to hold Views and Content Types for testing
  2. Reduce repetition in tests by creating custom Given steps. We have loads of tests that setup essentially the same context. Reducing repetition would make maintenance easier.
  3. #2154225: Switch Behat widget tests to use "Landing page"
  4. Audit permissions levels and reduce to the lowest possible to complete a test. Right now, I think we're using the "administrator" role for pretty much every test. We should reduce this to the lowest level capable of completing a test in order to also test that permissions are set correctly. #2372063: Audit permissions levels used in Behat tests
  5. Replace all field names with the label wherever possible. When we first started writing tests, some labels where missing (due to a bug in panopoly_admin: #2151657: Use #title_display rather than unsetting #title for better accessibility) and we hadn't started using regions yet (so, some labels were ambiguous). This led to us using field names rather than labels early on, much of which got copy-pasted into loads of other tests. The test are more readable and future proof using the labels, so we should switch to them where possible.
  6. #2370527: Use 'imports' in behat.yml files to share common configuration
  7. #2267555: Parameterize tests as much as possible so they work in child distributions
  8. #2291813: Move functionality from .travis.yml into a proper script
  9. #2293747: Move our FeatureContext and *.features into panopoly_test so that child distributions can reuse them
  10. #2293753: Refactor scripts/travis-ci.sh so that child distributions can use it

Comments

dsnopek’s picture

Issue summary: View changes
dsnopek’s picture

Issue summary: View changes
dsnopek’s picture

Issue summary: View changes
dsnopek’s picture

Issue summary: View changes
cboyden’s picture

Issue summary: View changes

Added a child issue for importing common Behat config.

dsnopek’s picture

Issue summary: View changes

We've made a lot of headway on point #2, so I crossed it out. And I added a child issue for point #4, which was the only one missing a child issue that wasn't already complete.

dsnopek’s picture

Category: Task » Plan
dsnopek’s picture

Status: Active » Closed (fixed)

I'm going to mark this one as closed: the bulk of the work is finished and the remaining tasks have child issues.