Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust tests to work given client config #2427

Merged
merged 10 commits into from
Apr 27, 2018
26 changes: 17 additions & 9 deletions test/features/dataset.all.feature
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ Feature: Dataset Features
| user | group | role on group | membership status |
| John | Group 01 | administrator member | Active |
And "Tags" terms:
| name |
| Health 2 |
| Gov 2 |
| name |
| gobbledygook |
| gibberish |
And "Format" terms:
| name |
| csv 2 |
| html 2 |
And datasets:
| title | publisher | author | published | tags | description |
| DKANTest Dataset 01 | Group 01 | John | Yes | Health 2 | Test |
| DKANTest Dataset 02 | Group 01 | John | Yes | Gov 2 | Test |
| title | publisher | author | published | tags | description |
| DKANTest Dataset 01 | Group 01 | John | Yes | gobbledygook | Test |
| DKANTest Dataset 02 | Group 01 | John | Yes | gibberish | Test |
And resources:
| title | publisher | format | author | published | dataset | description |
| Resource 01 | Group 01 | csv 2 | John | Yes | DKANTest Dataset 01 | |
Expand Down Expand Up @@ -127,11 +127,19 @@ Feature: Dataset Features
@dataset_all_8
Scenario: View available tag filters for datasets
When I am on "Datasets Search" page
# Sites with long lists of tags will fail unless you filter first.
And I fill in "gobbledygook" for "Search" in the "datasets" region
And I press "Apply"
## Uncomment this if you wanna use selenium.
# Then I click on the text "Tags"
# And I wait for "1" seconds
Then I should see "gobbledygook (1)" in the "filter by tag" region
And I fill in "gibberish" for "Search" in the "datasets" region
And I press "Apply"
## Uncomment this if you wanna use selenium.
# Then I click on the text "Tags"
# And I wait for "1" seconds
Then I should see "Health 2 (1)" in the "filter by tag" region
Then I should see "Gov 2 (1)" in the "filter by tag" region
Then I should see "gibberish (1)" in the "filter by tag" region

# TODO: make sure it works when we don't have default content on.
@dataset_all_9
Expand All @@ -155,7 +163,7 @@ Feature: Dataset Features
And I should see "2" items in the "datasets" region
## Uncomment this if you wanna use selenium.
# Then I click on the text "Tags"
When I click "Health 2" in the "filter by tag" region
When I click "gobbledygook" in the "filter by tag" region
Then I should see "1 results"
And I should see "1" items in the "datasets" region

Expand Down
4 changes: 2 additions & 2 deletions test/features/dataset.author.feature
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ Feature: Dataset Features
@dataset_author_7 @noworkflow
Scenario: Add a dataset to group that I am a member of
Given datasets:
| title | author | published | description |
| Dataset 01 | Katie | Yes | |
| title | author | published | description | publisher |
| Dataset 01 | Katie | Yes | | Group 02 |
Given I am logged in as "Katie"
And I am on "Dataset 01" page
When I click "Edit"
Expand Down
4 changes: 2 additions & 2 deletions test/features/home.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Feature: Homepage
| Add dataset | /node/add/dataset |
| Rebuild perms | /admin/reports/status/rebuild |

@api @javascript
@api @javascript @exceeds30seconds
Scenario: Rebuild Permissions
Given I am logged in as a user with the "administrator" role
Given I am logged in as a user with the "administrator" role
Given I am on the "Rebuild perms" page
And I press "Rebuild permissions"
And I wait for "Status report"
Expand Down
2 changes: 2 additions & 0 deletions test/features/panels.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Feature: Panels
And I fill in "edit-body-value" with "Custom item body."
And I press "Finish"
And I wait and press "Save"
# Avoid unexpected alert open: with next two lines.
And I wait for "5" seconds
And I wait for "New Custom Item"

@api @javascript
Expand Down
6 changes: 3 additions & 3 deletions test/features/topics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Feature: Topics
| Add Topic | /admin/structure/taxonomy/dkan_topics/add |
| Rebuild perms | /admin/reports/status/rebuild |

@api @javascript
@api @javascript @exceeds30seconds
Scenario: Rebuild Permissions
Given I am logged in as a user with the "administrator" role
Given I am logged in as a user with the "administrator" role
Given I am on the "Rebuild perms" page
And I press "Rebuild permissions"
And I wait for "Status report"
Expand Down Expand Up @@ -52,4 +52,4 @@ Feature: Topics
And I check the box "edit-field-topic-icon-und-xe909"
And I press "Save"
Then I should see "Created new term Abibliophobia."

4 changes: 2 additions & 2 deletions test/features/workflow.feature
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ Feature:
| Administrator | admin@fakeemail.com | 1 | administrator |
And The "source_one" source is harvested
And the content "Florida Bike Lanes Harvest" should be "published"

@workflow_21 @ok @globalUser
Scenario: As a Workflow Moderator, I should be able to see Stale Needs Review datasets I did not author, but which belongs to my Group, in 'Needs Review'
Given users:
Expand All @@ -468,7 +468,7 @@ Feature:
Given I am logged in as "Moderator"
And I am on "Stale Reviews" page
Then I should see the text "Not My Dataset"

@workflow_22 @api @javascript @globalUser
Scenario: As a user I should be able to see my content back on "My Drafts" section if it was rejected
# Submit a dataset to Needs Review
Expand Down