Skip to content

Commit

Permalink
Merge branch 'wip-mdl-49402-m28' of https://github.com/rajeshtaneja/m…
Browse files Browse the repository at this point in the history
…oodle into MOODLE_28_STABLE
  • Loading branch information
danpoltawski committed Mar 10, 2015
2 parents dd8b332 + 8b215b4 commit f09cb26
Showing 1 changed file with 17 additions and 29 deletions.
46 changes: 17 additions & 29 deletions mod/choice/tests/behat/block_editing.feature
Original file line number Diff line number Diff line change
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 f09cb26

Please sign in to comment.