From 157ca37774ab0920595f737be1ad7fbbeab88ffa Mon Sep 17 00:00:00 2001 From: Victor Bonasa Soriano Date: Sun, 25 Mar 2018 21:41:49 +0200 Subject: [PATCH] NEPT-467: Review / document behat tests for webtools suite feature (#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 --- tests/features/webtools.feature | 68 ++++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 2 deletions(-) diff --git a/tests/features/webtools.feature b/tests/features/webtools.feature index 12c966c180..f16e48885d 100644 --- a/tests/features/webtools.feature +++ b/tests/features/webtools.feature @@ -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" @@ -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 @@ -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 "" 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 "" + 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 "" + 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 "" + 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 "" + 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."