-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #270 from qld-gov-au/QOLDEV-1070-ckan-2.11
[QOLDEV-1070] add more scenario tests
- Loading branch information
Showing
7 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
include README.md | ||
include LICENSE | ||
include requirements.txt | ||
recursive-include ckanext/data-qld *.html *.json *.js *.less *.css *.mo | ||
recursive-include ckanext *.html *.json *.js *.less *.css *.mo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@resource_type_validation | ||
Feature: Resource type validation | ||
|
||
Scenario: As an evil user, when I try to upload a resource with a MIME type not matching its extension, I should get an error | ||
Given "TestOrgEditor" as the persona | ||
When I log in | ||
And I create a dataset with key-value parameters "notes=Testing resource type mismatch" | ||
And I open the new resource form for dataset "$last_generated_name" | ||
And I create a resource with key-value parameters "name=Testing EICAR PDF::description=Testing EICAR sample virus file with PDF extension::format=PDF::upload=eicar.com.pdf" | ||
Then I should see "Mismatched file type" | ||
|
||
Scenario: As a publisher, when I create a resource linking to an internal URL, I should not see any type mismatch errors | ||
Given "TestOrgEditor" as the persona | ||
When I log in | ||
And I create a dataset and resource with key-value parameters "notes=Testing internal URL" and "name=Internal link::url=http://ckan:5000/api/action/status_show" | ||
Then I should see "Testing internal URL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@OpenData | ||
@XLoader | ||
Feature: XLoader | ||
|
||
Scenario: As a publisher, when I visit a resource I control with a datastore entry, I can access the XLoader interface | ||
Given "TestOrgEditor" as the persona | ||
When I log in | ||
And I create a dataset and resource with key-value parameters "notes=Testing XLoader" and "name=test-csv-resource::url=https://people.sc.fsu.edu/~jburkardt/data/csv/addresses.csv::format=CSV" | ||
# Wait for XLoader to run | ||
And I press "test-csv-resource" | ||
And I reload page every 3 seconds until I see an element with xpath "//*[contains(string(), 'DataStore')]" but not more than 6 times | ||
Then I should see "DataStore" | ||
|
||
When I press "DataStore" | ||
And I reload page every 3 seconds until I see an element with xpath "//*[contains(string(), 'Express Load completed')]" but not more than 6 times | ||
Then I should see "Express Load completed" | ||
And I should see "Data Schema" | ||
And I should see "Data Dictionary" | ||
And I should see "Upload to DataStore" | ||
And I should see "Delete from DataStore" | ||
And I should see "Status" | ||
And I should see "Last updated" | ||
And I should see "Upload Log" | ||
And I should see "View resource" | ||
|
||
When I press "Upload to DataStore" | ||
Then I should see "Status" | ||
And I should see "Pending" | ||
And I should see "Delete from DataStore" | ||
|
||
When I press "Delete from DataStore" | ||
And I confirm the dialog containing "delete the DataStore" if present | ||
Then I should see "DataStore and Data Dictionary deleted for resource" | ||
And I should see "Upload to DataStore" | ||
And I should not see "Delete from DataStore" | ||
And I should not see an element with xpath "//a[contains(@href, '/dictionary/')]" |
Binary file not shown.