Skip to content

Commit

Permalink
punch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janette committed Feb 12, 2018
1 parent d266eaa commit a144862
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 23 deletions.
13 changes: 12 additions & 1 deletion test/features/datastore.feature
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ Feature: Datastore

@api @noworkflow @javascript @datastore
Scenario: Import a csv tab delimited file.
Given I am logged in as a user with the "site manager" role
Given I disable the module "dkan_data_story"
And I disable the module "dkan_sitewide_menu"
And I disable the module "admin_menu_toolbar"
And I disable the module "admin_menu_source"
And I disable the module "admin_menu"
And I am logged in as a user with the "site manager" role
And I am on "dataset/dataset-02"
When I click "Resource 03"
And I click "Edit"
Expand All @@ -116,3 +121,9 @@ Feature: Datastore
When I click "View"
And I wait for "5" seconds
Then I should see exactly "30" ".slick-cell" in region "recline preview"
And I enable the module "admin_menu"
And I enable the module "admin_menu_source"
And I enable the module "admin_menu_toolbar"
And I enable the module "dkan_sitewide_menu"
And I enable the module "dkan_data_story"

11 changes: 10 additions & 1 deletion test/features/leaflet_draw_widget.feature
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ Feature: Leaflet Map Widget
And the "textarea" element with id set to "leaflet-widget_field-spatial-geojson-textarea" in the "dataset spatial" region should not be visible
And the "input" element with id set to "leaflet-widget_field-spatial-points-input" in the "dataset spatial" region should not be visible
# GeoJSON tab
And I wait for "GeoJSON"
And I disable the module "dkan_data_story"
And I disable the module "dkan_sitewide_menu"
And I disable the module "admin_menu_toolbar"
And I disable the module "admin_menu_source"
And I disable the module "admin_menu"
When I click "GeoJSON" in the "dataset spatial" region
Then I should see "Enter GeoJSON" in the "dataset spatial" region
And the "textarea" element with id set to "leaflet-widget_field-spatial-geojson-textarea" in the "dataset spatial" region should be visible
Expand All @@ -41,3 +45,8 @@ Feature: Leaflet Map Widget
Then the "div" element with id set to "leaflet-widget_field-spatial" in the "dataset spatial" region should be visible
And the "input" element with id set to "leaflet-widget_field-spatial-points-input" in the "dataset spatial" region should be visible
And I should see the link "Add Points" in the "dataset spatial" region
And I enable the module "admin_menu"
And I enable the module "admin_menu_source"
And I enable the module "admin_menu_toolbar"
And I enable the module "dkan_sitewide_menu"
And I enable the module "dkan_data_story"
13 changes: 11 additions & 2 deletions test/features/theme.admin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,25 @@ Feature: Theme

@noworkflow
Scenario: Add custom logo
Given I am logged in as "John"
Given I disable the module "dkan_data_story"
And I disable the module "dkan_sitewide_menu"
And I disable the module "admin_menu_toolbar"
And I disable the module "admin_menu_source"
And I disable the module "admin_menu"
And I am logged in as "John"
And I am on "Settings" page
Then I should see "Logo image settings"
And I wait for "Use the default logo"
And I uncheck "Use the default logo"
And I attach the drupal file "dkan/dkan_logo.png" to "files[logo_upload]"
And I wait for the file upload to finish
When I press "Save configuration"
Then I wait for "3" seconds
Then I should see "The configuration options have been saved"
And I enable the module "admin_menu"
And I enable the module "admin_menu_source"
And I enable the module "admin_menu_toolbar"
And I enable the module "dkan_sitewide_menu"
And I enable the module "dkan_data_story"

@noworkflow @customizable
Scenario: Add custom hero image
Expand Down
24 changes: 5 additions & 19 deletions test/features/user.all.feature
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,18 @@ Feature: User
Given users:
| name | mail | roles | pass |
| John | john@example.com | site manager | johnpass |
| Badmin | admin@example.com | site manager | pass |
| Gabriel | gabriel@example.com | content creator | pass |
| Jaz | jaz@example.com | editor | pass |
| Katie | katie@example.com | content creator | pass |
| Martin | martin@example.com | editor | pass |
| Celeste | celeste@example.com | editor | pass |
Given groups:
| title | author | published |
| Group 01 | Badmin | Yes |
| Group 02 | Badmin | Yes |
| Group 03 | Badmin | No |
| Group 01 | John | Yes |
And group memberships:
| user | group | role on group | membership status |
| Gabriel | Group 01 | administrator member | Active |
| John | Group 01 | administrator member | Active |
| Katie | Group 01 | member | Active |
| Jaz | Group 01 | member | Pending |
| Admin | Group 02 | administrator member | Active |
| Celeste | Group 02 | member | Active |
And "Tags" terms:
| name |
| world |
| results |
And datasets:
| title | publisher | author | published | tags | description |
| Dataset 01 | Group 01 | Katie | Yes | world | Test |
| Dataset 02 | Group 01 | Katie | Yes | world | Test |
| title | publisher | author | published | description |
| Dataset 01 | Group 01 | Katie | Yes | Test |
| Dataset 02 | Group 01 | Katie | Yes | Test |

@user_all_01 @login
Scenario: Login
Expand Down

0 comments on commit a144862

Please sign in to comment.