Skip to content

Commit

Permalink
NEPT-467: Review / document behat tests for webtools suite feature (#…
Browse files Browse the repository at this point in the history
…1742)

* NEPT-466: Implement behat tests for the forums feature.

* NEPT-445: Improve behat test on contact feature.

* NEPT-445: scenarios from contact contrib module to contact_form feature

* NEPT-445: scenarios from contact contrib module to contact_form feature

* NEPT-467: Review/document behat tests for webtools suite feature.

* NEPT-467: Add @standard_ec_resp tag.

* remove contact and forum test feature from wrong branch
  • Loading branch information
VictorBonasa authored and gillesdeudon committed Mar 25, 2018
1 parent dea08c4 commit 157ca37
Showing 1 changed file with 66 additions and 2 deletions.
68 changes: 66 additions & 2 deletions tests/features/webtools.feature
Expand Up @@ -11,7 +11,7 @@ Feature: Webtools feature
And a valid Smartload Url has been configured
And I am logged in as a user with the 'administrator' role

@api
@api @standard_ec_resp
Scenario: Create and delete a block 'Map'
When I go to "block/add/webtools"
And I fill in "Label" with "Block Map Webtools"
Expand All @@ -28,7 +28,7 @@ Feature: Webtools feature
When I press "Delete"
Then I should see the success message "webtools Block Map Webtools Title has been deleted."

@api @javascript
@api @javascript @standard_ec_resp
Scenario: Insert a webtools block into a content by using the 2 full HTML text formats
Given a map webtools "Block Webtools" exists
And I use device with "1920" px and "1080" px resolution
Expand All @@ -45,3 +45,67 @@ Feature: Webtools feature
Then I should see the success message "Basic page with a Map has been created."
And the response should contain "<script type=\"application/json\">{\"service\":\"map\",\"custom\":\"//europa.eu/webtools/showcase/demo/map/samples/demo.js\"}</script>"
And the response should contain "contextual-links-wrapper"

@api
Scenario: Create and delete a block 'Basic map'
When I go to "block/add/webtools"
And I fill in "Label" with "Block Basic Map Webtools"
And I fill in "Title" with "Block Basic Map Webtools Title"
And I fill in "JSON Object" with "{\"service\": \"map\",\"map\": {\"zoom\": \"15\",\"center\": [\"50.5037\",\"4.2258\"],\"background\": [\"osmec\"]}}"
And I press "Save"
Then I should see the text "webtools Block Basic Map Webtools Title has been created."
And the response should contain "<script type=\"application/json\">{\"service\": \"map\",\"map\": {\"zoom\": \"15\",\"center\": [\"50.5037\",\"4.2258\"],\"background\": [\"osmec\"]}}</script>"
And the response should contain "contextual-links-wrapper"
When I go to "admin/content/blocks"
And I click "delete" in the "Block Basic Map Webtools" row
Then I should see "Are you sure you want to delete Block Basic Map Webtools Title?"
When I press "Delete"
Then I should see the text "webtools Block Basic Map Webtools Title has been deleted."

@api
Scenario: Create and delete a block 'Chart'
When I go to "block/add/webtools"
And I fill in "Label" with "Block Chart Webtools"
And I fill in "Title" with "Block Chart Webtools Title"
And I fill in "JSON Object" with "{\"service\": \"charts\",\"provider\": \"highcharts\",\"data\": \"//europa.eu/webtools/showcase/demo/charts/wikis/airport-transport-of-passenger-in-the-eu-2014-options.json\"}"
And I press "Save"
Then I should see the text "webtools Block Chart Webtools Title has been created."
And the response should contain "<script type=\"application/json\">{\"service\": \"charts\",\"provider\": \"highcharts\",\"data\": \"//europa.eu/webtools/showcase/demo/charts/wikis/airport-transport-of-passenger-in-the-eu-2014-options.json\"}</script>"
And the response should contain "contextual-links-wrapper"
When I go to "admin/content/blocks"
And I click "delete" in the "Block Chart Webtools" row
Then I should see "Are you sure you want to delete Block Chart Webtools Title?"
When I press "Delete"
Then I should see the text "webtools Block Chart Webtools Title has been deleted."

@api
Scenario: Create and delete a block 'Social bookmark'
When I go to "block/add/webtools"
And I fill in "Label" with "Block Social bookmark Webtools"
And I fill in "Title" with "Block Social bookmark Webtools Title"
And I fill in "JSON Object" with "{\"service\": \"sbkm\",\"to\": [\"twitter\",\"facebook\",\"linkedin\",\"googleplus\"],\"selection\": false}"
And I press "Save"
Then I should see the text "webtools Block Social bookmark Webtools Title has been created."
And the response should contain "<script type=\"application/json\">{\"service\": \"sbkm\",\"to\": [\"twitter\",\"facebook\",\"linkedin\",\"googleplus\"],\"selection\": false}</script>"
And the response should contain "contextual-links-wrapper"
When I go to "admin/content/blocks"
And I click "delete" in the "Block Social bookmark Webtools" row
Then I should see "Are you sure you want to delete Block Social bookmark Webtools Title?"
When I press "Delete"
Then I should see the text "webtools Block Social bookmark Webtools Title has been deleted."

@api
Scenario: Create and delete a block 'Social Media Kit'
When I go to "block/add/webtools"
And I fill in "Label" with "Block SMK Webtools"
And I fill in "Title" with "Block SMK Webtools Title"
And I fill in "JSON Object" with "{\"service\": \"twitter\",\"type\": \"user\",\"screen_name\": \"EU_Commission\",\"include_rts\": true}"
And I press "Save"
Then I should see the text "webtools Block SMK Webtools Title has been created."
And the response should contain "<script type=\"application/json\">{\"service\": \"twitter\",\"type\": \"user\",\"screen_name\": \"EU_Commission\",\"include_rts\": true}</script>"
And the response should contain "contextual-links-wrapper"
When I go to "admin/content/blocks"
And I click "delete" in the "Block SMK Webtools" row
Then I should see "Are you sure you want to delete Block SMK Webtools Title?"
When I press "Delete"
Then I should see the text "webtools Block SMK Webtools Title has been deleted."

0 comments on commit 157ca37

Please sign in to comment.