Skip to content

Commit

Permalink
[QOLSVC-4217] expand report scenario testing to check individual orgs
Browse files Browse the repository at this point in the history
- Running a report for an organisation hits code paths that the report landing page does not,
so we need to check both
  • Loading branch information
ThrawnCA committed Dec 15, 2023
1 parent 8bfdad6 commit 1271111
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions test/features/reporting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,42 @@ Feature: Reporting
And I should see an element with xpath "//table[@id='report-table']//th[contains(string(), 'Broken links')]"
And I should see an element with xpath "//table[@id='report-table']//td[position()=1]/a[contains(@href, 'report/broken-links') and contains(string(), 'Test Organisation')]"

When I press "Test Organisation"
Then I should see an element with xpath "//table[@id='report-table']//th[string() = 'Dataset']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Res']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'URL']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Status']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Reason']"

When I go back
Then I should see an element with xpath "//select[@name='organization']"
When I select by text "Test Organisation" from "organization"
Then I should see an element with xpath "//table[@id='report-table']//th[string() = 'Dataset']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Res']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'URL']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Status']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Reason']"

@unauthenticated
Scenario: I can view a 'Data Usability Rating' report anonymously
Given "Unauthenticated" as the persona
When I visit "/report"
And I press "Data usability rating"
Then I should see an element with xpath "//select[@name='organization']"
And I should see an element with xpath "//table[@id='report-table']//th[contains(string(), 'Score TBC')]"
And I should see an element with xpath "//table[@id='report-table']//th[contains(string(), 'Average score')]"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Score TBC']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Average score']"
And I should see an element with xpath "//table[@id='report-table']//td[position()=1]/a[contains(@href, 'report/openness') and contains(string(), 'Test Organisation')]"

When I press "Test Organisation"
Then I should see an element with xpath "//table[@id='report-table']//th[string() = 'Dataset']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Notes']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Score']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Reason']"

When I go back
Then I should see an element with xpath "//select[@name='organization']"
When I select by text "Test Organisation" from "organization"
Then I should see an element with xpath "//table[@id='report-table']//th[string() = 'Dataset']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Notes']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Score']"
And I should see an element with xpath "//table[@id='report-table']//th[string() = 'Reason']"

0 comments on commit 1271111

Please sign in to comment.