Skip to content

Commit

Permalink
MDL-49402 behat: Fixed feature file with same scenario name
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rajesh Taneja committed Mar 6, 2015
1 parent b90f98d commit d7fec59
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions mod/choice/tests/behat/block_editing.feature
Expand Up @@ -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"
Expand All @@ -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 |
Expand All @@ -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 |
Expand All @@ -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"

0 comments on commit d7fec59

Please sign in to comment.