Audit end to end tests for best practice adherence

Summary

As our test practices have changed over time some of the end to end tests have become stale and have accrued technical debt. I propose we audit the tests for best practices.

Improvements

  • As per the testing guide
  • Prefer the API over the UI when doing setup and teardown of tests for increased speed.
  • Cleaning up after test isn't always done
  • Use let instead of instance variables.
  • Don’t supply the :each argument to hooks since it’s the default.
  • Use context to test branching logic.

Risks

The biggest risk feels like we'll be spending time refactoring test code while there could be something more important to do.

Involved components

Most of the tests under ./qa/qa/specs/features

Optional: Intended side effects

Faster test execution time by using the API for setup and teardown. Fewer artifacts leftover from test execution by cleaning up after a test.

Optional: Missing test coverage