Skip to content

Commit

Permalink
Merge pull request #236 from qld-gov-au/develop
Browse files Browse the repository at this point in the history
Develop to master
  • Loading branch information
ThrawnCA authored May 10, 2022
2 parents 8b5e862 + fe14958 commit 6169176
Show file tree
Hide file tree
Showing 14 changed files with 282 additions and 315 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Build
run: .circleci/build.sh
timeout-minutes: 15
timeout-minutes: 20

- name: Test
run: .circleci/test.sh
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Build
run: .circleci/build.sh
timeout-minutes: 15
timeout-minutes: 20

- name: Test
run: .circleci/test.sh
Expand All @@ -45,4 +45,4 @@ jobs:
with:
name: ${{ matrix.application }} ${{ matrix.target_environment }} screenshots
path: /tmp/artifacts/behave/screenshots
timeout-minutes: 3
timeout-minutes: 1
3 changes: 1 addition & 2 deletions test/features/data_qld_theme.feature
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Feature: Theme customisations
When I go to homepage
Then I should see an element with xpath "//link[contains(@href,'https://fonts.googleapis.com/css?family=Lato')]"

Scenario: Organisation is in fact spelled Organisation (as opposed to Organization)
Scenario: Organisation is in fact spelled Organisation (as opposed to Organization)
When I go to organisation page
Then I should see "Organisation"
And I should not see "Organization"
Expand Down Expand Up @@ -68,7 +68,6 @@ Feature: Theme customisations
Scenario: As a publisher, when I create a resource with an API entry, I can download it in various formats
Given "TestOrgEditor" as the persona
When I log in
And I resize the browser to 1024x2048
And I create a dataset with license "other-open" and "CSV" resource file "csv_resource.csv"
And I wait for 10 seconds
And I click the link with text that contains "Test Resource"
Expand Down
1 change: 0 additions & 1 deletion test/features/data_usability_rating.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ Feature: Data usability rating
Scenario Outline: As a publisher, when I create a resource with an open license, I can verify the openness score is correct
Given "TestOrgEditor" as the persona
When I log in
And I resize the browser to 1024x2048
And I create a dataset with license "other-open" and "<Format>" resource file "<Filename>"
Then I wait for 10 seconds
When I press the element with xpath "//ol[contains(@class, 'breadcrumb')]//a[starts-with(@href, '/dataset/')]"
Expand Down
6 changes: 3 additions & 3 deletions test/features/dataset_deletion.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Feature: Dataset deletion
Then I select "False" from "private"
Then I fill in "version" with "1"
Then I fill in "author_email" with "[email protected]"
Then I select "NO" from "de_identified_data"
Then I fill in "de_identified_data" with "NO" if present
And I press the element with xpath "//form[contains(@class, 'dataset-form')]//button[contains(@class, 'btn-primary')]"
And I wait for 10 seconds
Then I execute the script "document.getElementById('field-image-url').value='https://example.com'"
Then I fill in "name" with "res1"
Then I fill in "description" with "description"
Then I fill in "size" with "1024"
Then I select "Resource NOT visible/Pending acknowledgement" from "resource_visibility"
Then I fill in "size" with "1024" if present
Then I fill in "resource_visibility" with "Resource NOT visible/Pending acknowledgement" if present
Then I press the element with xpath "//button[@value='go-metadata']"
And I wait for 10 seconds
Then I should see "Data and Resources"
Expand Down
2 changes: 0 additions & 2 deletions test/features/de_identified_data.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ Feature: De-identified data
Then I should see an element with id "field-de_identified_data"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='YES']"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='NO']"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='YES']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='NO']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='']"

Examples: Users
| User |
Expand Down
232 changes: 78 additions & 154 deletions test/features/resource_availability.feature

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions test/features/resources.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ Feature: Resource UI

Scenario Outline: Link resource should create a link to its URL
Given "SysAdmin" as the persona
When I resize the browser to 1024x2048
And I create a resource with name "<name>" and URL "<url>"
When I create a resource with name "<name>" and URL "<url>"
And I press the element with xpath "//a[contains(@title, '<name>') and contains(string(), '<name>')]"
Then I should see "<url>"

Expand All @@ -19,7 +18,6 @@ Feature: Resource UI
@Publications
Scenario: Link resource with missing or invalid protocol should use HTTP
Given "SysAdmin" as the persona
When I resize the browser to 1024x2048
And I create a resource with name "Non-HTTP link" and URL "git+https://github.com/ckan/ckan.git"
When I create a resource with name "Non-HTTP link" and URL "git+https://github.com/ckan/ckan.git"
And I press the element with xpath "//a[contains(@title, 'Non-HTTP link') and contains(string(), 'Non-HTTP link')]"
And I should see "http://git+https://github.com/ckan/ckan.git"
3 changes: 0 additions & 3 deletions test/features/schema_metadata.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Feature: SchemaMetadata
Scenario: When I create a resource without a name or description, I should see errors
Given "SysAdmin" as the persona
When I log in
And I resize the browser to 1024x2048
And I go to "/dataset/new_resource/warandpeace"
And I execute the script "document.getElementById('field-image-url').value='https://example.com'"
And I press the element with xpath "//button[contains(string(), 'Add')]"
Expand All @@ -38,10 +37,8 @@ Feature: SchemaMetadata
Then I should see an element with id "field-de_identified_data"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='YES']"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='NO']"
Then I should see an element with xpath "//select[@id='field-de_identified_data']/option[@value='']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='YES']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='NO']"
Then I should not see an element with xpath "//select[@id='field-de_identified_data']/option[@selected='' and @value='']"

Examples: Users
| User |
Expand Down
Loading

0 comments on commit 6169176

Please sign in to comment.