Skip to content

Commit

Permalink
Merge branch '48425-48374-27' of git://github.com/samhemelryk/moodle …
Browse files Browse the repository at this point in the history
…into MOODLE_27_STABLE
  • Loading branch information
stronk7 committed Dec 4, 2014
2 parents 71b1aef + 1c86ce8 commit daa212d
Show file tree
Hide file tree
Showing 5 changed files with 129 additions and 77 deletions.
44 changes: 26 additions & 18 deletions course/tests/behat/category_change_visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ Feature: We can change the visibility of categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
And category in management listing should be visible "CAT1"
And I toggle visibility of category "CAT1" in management listing
# AJAX updated.
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And I toggle visibility of category "CAT1" in management listing
# AJAX updated.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"

# Tests hiding and then showing a subcategory.
Expand Down Expand Up @@ -91,20 +92,21 @@ Feature: We can change the visibility of categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element"
And category in management listing should be visible "CAT1"
And I click to expand category "CAT1" in the management interface
# AJAX loads sub category.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And I toggle visibility of category "CAT2" in management listing
# AJAX hides the subcategory.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be dimmed "CAT2"
And I toggle visibility of category "CAT2" in management listing
# AJAX reveals the subcategory.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"

Expand Down Expand Up @@ -199,9 +201,11 @@ Feature: We can change the visibility of categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I click on category "Cat 1" in the management interface
# Redirect.
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element"
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element"
Expand All @@ -218,13 +222,13 @@ Feature: We can change the visibility of categories in the management interface.
And course in management listing should be visible "C2"
And course in management listing should be visible "C3"
And I toggle visibility of course "C2" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element"
And course in management listing should be visible "C1"
And course in management listing should be dimmed "C2"
And course in management listing should be visible "C3"
And I toggle visibility of category "CAT3" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be dimmed "CAT3"
Expand All @@ -233,7 +237,7 @@ Feature: We can change the visibility of categories in the management interface.
And course in management listing should be dimmed "C2"
And course in management listing should be visible "C3"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be dimmed "CAT3"
Expand All @@ -242,7 +246,7 @@ Feature: We can change the visibility of categories in the management interface.
And course in management listing should be dimmed "C2"
And course in management listing should be dimmed "C3"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be dimmed "CAT3"
Expand All @@ -264,46 +268,50 @@ Feature: We can change the visibility of categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I click on category "Cat 1" in the management interface
# Redirect
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 2" in the management interface
# Redirect
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on category "Cat 3" in the management interface
# Redirect
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be visible "C1"
And I toggle visibility of course "C1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be dimmed "CAT1"
And category in management listing should be dimmed "CAT2"
And category in management listing should be dimmed "CAT3"
And course in management listing should be dimmed "C1"
And I toggle visibility of category "CAT1" in management listing
# AJAX action - no redirect.
And a new page should not have loaded since I started watching
And category in management listing should be visible "CAT1"
And category in management listing should be visible "CAT2"
And category in management listing should be visible "CAT3"
Expand Down
15 changes: 10 additions & 5 deletions course/tests/behat/category_resort.feature
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,15 @@ Feature: Test we can resort categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I click on "Master cat" category in the management category listing
# Redirect.
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I click on <sortby> action for "Master cat" in management category listing
# Redirect.
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I should see category listing <cat1> before <cat2>
And I should see category listing <cat2> before <cat3>
Expand Down Expand Up @@ -178,22 +181,24 @@ Feature: Test we can resort categories in the management interface.

And I log in as "admin"
And I go to the courses management page
And I start watching to see if a new page loads
And I should see the "Course categories" management page
And I click on category "Cat 1" in the management interface
# Redirect.
And a new page should have loaded since I started watching
And I start watching to see if a new page loads
And I should see the "Course categories and courses" management page
And I should see category listing "Cat 1" before "Cat 1a"
And I should see category listing "Cat 1a" before "Cat 1b"
And I should see category listing "Cat 1b" before "Cat 1c"
And I should see category listing "Cat 1c" before "Cat 2"
And I click to move category "CATA" down one
# AJAX request. No redirect.We should a 1, 1b, 1a, 1c, 2.
And a new page should not have loaded since I started watching
And I should see category listing "Cat 1" before "Cat 1b"
And I should see category listing "Cat 1b" before "Cat 1a"
And I should see category listing "Cat 1a" before "Cat 1c"
And I should see category listing "Cat 1c" before "Cat 2"
And I click to move category "CATC" up one
# AJAX request. No redirect. We should a 1, 1b, 1c, 1a, 2.
And a new page should not have loaded since I started watching
And I should see category listing "Cat 1" before "Cat 1b"
And I should see category listing "Cat 1b" before "Cat 1c"
And I should see category listing "Cat 1c" before "Cat 1a"
Expand Down
Loading

0 comments on commit daa212d

Please sign in to comment.