From 6af3c65f4f7622121b2cbf677f0d7ebf5160c3a3 Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Fri, 6 Mar 2015 08:48:51 +0800 Subject: [PATCH] MDL-49402 behat: Fixed feature file with same scenario name 1. We should not have same scanrio name in 1 feature file As it doesn't explain what is being tested. So modified. 2. Removed empty line, to keep it consistnet with other features --- mod/choice/tests/behat/block_editing.feature | 46 ++++++++++------------------ 1 file changed, 17 insertions(+), 29 deletions(-) diff --git a/mod/choice/tests/behat/block_editing.feature b/mod/choice/tests/behat/block_editing.feature index e4adf70dfd9..5ee5741ff99 100644 --- a/mod/choice/tests/behat/block_editing.feature +++ b/mod/choice/tests/behat/block_editing.feature @@ -4,13 +4,10 @@ Feature: Add choice activity As a teacher or admin I need to add remove block from the choice page -# This tests that the hacky block editing is not borked by legacy forms in choice activity. - + # This tests that the hacky block editing is not borked by legacy forms in choice activity. @javascript - Scenario: Add a choice activity and complete the activity as a student - Given the following "users" exist: - | username | firstname | lastname | email | - And the following "courses" exist: + Scenario: Add a choice activity as admin and check blog menu block should contain link. + Given the following "courses" exist: | fullname | shortname | category | | Course 1 | C1 | 0 | And I log in as "admin" @@ -22,22 +19,19 @@ Feature: Add choice activity | option[0] | Option 1 | | option[1] | Option 2 | And I follow "Choice name 1" - - When I add the "Blog menu" block - Then I should see "View all entries about this Choice" - + And I add the "Blog menu" block + And I should see "View all entries about this Choice" When I configure the "Blog menu" block And I press "Save changes" Then I should see "View all entries about this Choice" - - When I open the "Blog menu" blocks action menu + And I open the "Blog menu" blocks action menu And I click on "Delete" "link" in the "Blog menu" "block" And I press "Yes" - Then I should not see "View all entries about this Choice" + And I should not see "View all entries about this Choice" And I should see "Choice Description 1" @javascript - Scenario: Add a choice activity and complete the activity as a student + Scenario: Add a choice activity as teacher and check blog menu block contain choice link. Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@asd.com | @@ -58,22 +52,19 @@ Feature: Add choice activity | option[0] | Option 1 | | option[1] | Option 2 | And I follow "Choice name 1" - - When I add the "Blog menu" block - Then I should see "View all entries about this Choice" - + And I add the "Blog menu" block + And I should see "View all entries about this Choice" When I configure the "Blog menu" block And I press "Save changes" Then I should see "View all entries about this Choice" - - When I open the "Blog menu" blocks action menu + And I open the "Blog menu" blocks action menu And I click on "Delete" "link" in the "Blog menu" "block" And I press "Yes" - Then I should not see "View all entries about this Choice" + And I should not see "View all entries about this Choice" And I should see "Choice Description 1" @javascript - Scenario: Add a choice activity and complete the activity as a student + Scenario: Add a choice activity as teacher (with dual role) and check blog menu block contain choice link. Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@asd.com | @@ -93,16 +84,13 @@ Feature: Add choice activity | option[0] | Option 1 | | option[1] | Option 2 | And I follow "Choice name 1" - - When I add the "Blog menu" block - Then I should see "View all entries about this Choice" - + And I add the "Blog menu" block + And I should see "View all entries about this Choice" When I configure the "Blog menu" block And I press "Save changes" Then I should see "View all entries about this Choice" - - When I open the "Blog menu" blocks action menu + And I open the "Blog menu" blocks action menu And I click on "Delete" "link" in the "Blog menu" "block" And I press "Yes" - Then I should not see "View all entries about this Choice" + And I should not see "View all entries about this Choice" And I should see "Choice Description 1" -- 2.11.4.GIT