Skip to content

Commit

Permalink
[QOLDEV-915] add scenario test for upgrading CSV usability rating on …
Browse files Browse the repository at this point in the history
…valid schema
  • Loading branch information
ThrawnCA committed Jul 15, 2024
1 parent 4e63da6 commit 948d2b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/features/data_usability_rating.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ Feature: Data usability rating
| CSV | csv_resource.csv | 3 |
| JSON | json_resource.json | 3 |
| RDF | rdf_resource.rdf | 4 |

Scenario: As a publisher, when I create an open resource with a matching schema, I can verify the score is upgraded from 3 to 4
Given "TestOrgEditor" as the persona
When I log in
And I create a dataset and resource with key-value parameters "license=other-open" and "format=CSV::upload=csv_resource_with_schema.csv::schema_upload=test-resource_schemea.json"
And I press the element with xpath "//ol[contains(@class, 'breadcrumb')]//a[starts-with(@href, '/dataset/')]"
And I reload page every 3 seconds until I see an element with xpath "//div[contains(@class, 'qa') and contains(@class, 'openness-')]" but not more than 10 times
Then I should see data usability rating 4
When I press "Test Resource"
Then I should see an element with xpath "//div[contains(@class, 'qa openness-4')]"
2 changes: 2 additions & 0 deletions test/fixtures/csv_resource_with_schema.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Measurement identifier,Measurement location code,Measurement date,Measure of the oblique fractal impedance at noon,Extra observations
1,A,01/01/1970,12345,"Lorem ipsum"

0 comments on commit 948d2b9

Please sign in to comment.