From 22b4a2793c6eb4942fd9742009f16d17b76b9aa5 Mon Sep 17 00:00:00 2001 From: ThrawnCA Date: Mon, 15 Jul 2024 11:36:08 +1000 Subject: [PATCH] [QOLDEV-915] add scenario test for upgrading CSV usability rating on valid schema --- test/features/data_usability_rating.feature | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/features/data_usability_rating.feature b/test/features/data_usability_rating.feature index 93b4901b..17516128 100644 --- a/test/features/data_usability_rating.feature +++ b/test/features/data_usability_rating.feature @@ -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')]"