Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
@core @core_courseFeature: We can change the visibility of courses in the management interface.As a moodle adminI need to test hiding and then showing a course.I need to test hiding a course and then hiding and showing the category its within.# Test hiding and showing a course.Scenario: Test toggling course visibility through the management interfaces.Given the following "categories" exist:| name | category | idnumber || Cat 1 | 0 | CAT1 |And the following "courses" exist:| category | fullname | shortname | idnumber || CAT1 | Course 1 | Course 1 | C1 |And I log in as "admin"And I go to the courses management pageAnd I should see the "Course categories and courses" management pageAnd I click on category "Cat 1" in the management interface# Redirect.And I should see the "Course categories and courses" management pageAnd I should see "Cat 1" in the "#category-listing ul" "css_element"And I should see "Course 1" in the "#course-listing ul.course-list" "css_element"And category in management listing should be visible "CAT1"And course in management listing should be visible "C1"And I toggle visibility of course "C1" in management listing# Redirect.And I should see the "Course categories and courses" management page with a course selectedAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of course "C1" in management listing# Redirect.And I should see the "Course categories and courses" management page with a course selectedAnd category in management listing should be visible "CAT1"And course in management listing should be visible "C1"And I toggle visibility of course "C1" in management listing# Redirect.And I should see the "Course categories and courses" management page with a course selectedAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listing# Redirect.And I should see the "Course categories and courses" management pageAnd category in management listing should be dimmed "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listing# Redirect.And I should see the "Course categories and courses" management pageAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listing# Test hiding and showing a course with JS, same as the above test.@javascriptScenario: Test using AJAX to hide a course through the management interfaces.Given the following "categories" exist:| name | category | idnumber || Cat 1 | 0 | CAT1 |And the following "courses" exist:| category | fullname | shortname | idnumber || CAT1 | Course 1 | Course 1 | C1 |And I log in as "admin"And I go to the courses management pageAnd I start watching to see if a new page loadsAnd I should see the "Course categories and courses" management pageAnd I click on category "Cat 1" in the management interfaceAnd a new page should have loaded since I started watchingAnd I start watching to see if a new page loadsAnd I should see the "Course categories and courses" management pageAnd I should see "Cat 1" in the "#category-listing ul" "css_element"And I should see "Course 1" in the "#course-listing ul.course-list" "css_element"And category in management listing should be visible "CAT1"And course in management listing should be visible "C1"And I toggle visibility of course "C1" in management listingAnd a new page should not have loaded since I started watchingAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of course "C1" in management listingAnd a new page should not have loaded since I started watchingAnd category in management listing should be visible "CAT1"And course in management listing should be visible "C1"And I toggle visibility of course "C1" in management listingAnd a new page should not have loaded since I started watchingAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listingAnd a new page should not have loaded since I started watchingAnd category in management listing should be dimmed "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listingAnd a new page should not have loaded since I started watchingAnd category in management listing should be visible "CAT1"And course in management listing should be dimmed "C1"And I toggle visibility of category "CAT1" in management listingAnd I toggle visibility of course "C1" in management listingAnd I select "Courses" from the "Viewing" singleselectAnd a new page should have loaded since I started watchingAnd I start watching to see if a new page loadsAnd I should see "Course 1" in the "#course-listing ul.course-list" "css_element"And I toggle visibility of course "C1" in management listingAnd a new page should not have loaded since I started watchingAnd course in management listing should be dimmed "C1"And I toggle visibility of course "C1" in management listingAnd course in management listing should be visible "C1"And a new page should not have loaded since I started watching