Skip to content

DRY spec/requests/casa_cases.rb #6948

@FireLemons

Description

@FireLemons

Description

Some blocks of code in this test file are copied and pasted especially between the supervisor and admin. Over time despite the page behaving the same for both types of users, the test blocks have diverged.
Group reused code in an Rspec shared example. Shared examples can take parameters like functions.
Make sure the tests are working.

Divergent Tests

GET index/

  • it "renders a successful response" use build_stubbed for both tests
  • it "shows all my organization's cases" do test relevant to admin and supervisor but only in admin section
  • it "doesn't show other organizations' cases" do test relevant to admin and supervisor but only in admin section

Opportunities for shared examples between volunteers and supervisors for tests that check for unauthorized access
Admin test blocks have missing tests for suprvisors

How to access the QA site

Login Details:
Link to QA site

Login Emails:

password for all users: 12345678

Questions? Join Slack!

We highly recommend that you join us in slack #casa channel to ask questions quickly. And discord for office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions