Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_block
2
Feature: Block removal via modal
3
  In order to remove blocks
4
  As a teacher
5
  I need to use a modal to confirm the block to delete
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category |
10
      | Course 1 | C1 | 0 |
11
    And the following "blocks" exist:
12
      | blockname     | contextlevel | reference | pagetypepattern | defaultregion |
13
      | search_forums | Course       | C1        | course-view-*   | side-pre      |
14
    And I log in as "admin"
15
    And I am on "Course 1" course homepage with editing mode on
16
 
17
  @javascript
18
  Scenario: Removing a block via modal should remove the block on the page
19
    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
    Then "Delete block?" "dialogue" should exist
22
    And I click on "Delete" "button" in the "Delete block?" "dialogue"
23
    And I wait to be redirected
24
    And "Search forums" "block" should not exist
25
 
26
  @javascript
27
  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"
30
    Then "Delete block?" "dialogue" should exist
31
    And I click on "Cancel" "button" in the "Delete block?" "dialogue"
32
    And I should not see "Delete block?"
33
    And "Search forums" "block" should exist