Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 7... Línea 7...
7
  Background:
7
  Background:
8
    Given the following "courses" exist:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
9
      | fullname | shortname | category |
10
      | Course 1 | C1 | 0 |
10
      | Course 1 | C1 | 0 |
11
    And the following "blocks" exist:
11
    And the following "blocks" exist:
12
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
12
      | blockname     | contextlevel | reference | pagetypepattern | showinsubcontexts | defaultregion |
13
      | search_forums | Course       | C1        | course-view-*   | side-pre      |
13
      | search_forums | Course       | C1        | course-view-*   | 0                 | side-pre      |
-
 
14
      | myprofile     | System       |           | *               | 1                 | side-pre      |
14
    And I log in as "admin"
15
    And I log in as "admin"
15
    And I am on "Course 1" course homepage with editing mode on
16
    And I am on "Course 1" course homepage with editing mode on
Línea 16... Línea 17...
16
 
17
 
17
  @javascript
18
  @javascript
18
  Scenario: Removing a block via modal should remove the block on the page
19
  Scenario: Removing a block via modal should remove the block on the page
19
    Given I open the "Search forums" blocks action menu
20
    Given I open the "Search forums" blocks action menu
20
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
21
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
21
    Then "Delete block?" "dialogue" should exist
22
    And I should see "This will delete the block Search forums." in the "Delete block?" "dialogue"
22
    And I click on "Delete" "button" in the "Delete block?" "dialogue"
23
    And I click on "Delete" "button" in the "Delete block?" "dialogue"
23
    And I wait to be redirected
24
    And I wait to be redirected
-
 
25
    Then "Search forums" "block" should not exist
-
 
26
    And I open the "Logged in user" blocks action menu
-
 
27
    And I click on "Delete Logged in user block" "link" in the "Logged in user" "block"
-
 
28
    And I should see "You are about to delete a block that appears elsewhere" in the "Delete block?" "dialogue"
-
 
29
    And I should see "Original block location: System" in the "Delete block?" "dialogue"
-
 
30
    And I should see "Display on page types: Any page" in the "Delete block?" "dialogue"
-
 
31
    And I should see "Are you sure you want to continue?" in the "Delete block?" "dialogue"
-
 
32
    And I click on "Delete" "button" in the "Delete block?" "dialogue"
-
 
33
    And I wait to be redirected
Línea 24... Línea 34...
24
    And "Search forums" "block" should not exist
34
    And "Logged in user" "block" should not exist
25
 
35
 
26
  @javascript
36
  @javascript
27
  Scenario: Cancel removing a block via modal should retain the block on the page
37
  Scenario: Cancel removing a block via modal should retain the block on the page
28
    Given I open the "Search forums" blocks action menu
-
 
29
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
38
    Given I open the "Search forums" blocks action menu
30
    Then "Delete block?" "dialogue" should exist
39
    When I click on "Delete Search forums block" "link" in the "Search forums" "block"
31
    And I click on "Cancel" "button" in the "Delete block?" "dialogue"
40
    And I click on "Cancel" "button" in the "Delete block?" "dialogue"