Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_wiki
2
Feature: Edited wiki pages may be previewed before saving
3
  In order to avoid silly mistakes
4
  As a user
5
  I need to preview pages before saving changes
6
 
7
  Background:
8
    Given the following "users" exist:
9
      | username | firstname | lastname | email |
10
      | teacher1 | Teacher | 1 | teacher1@example.com |
11
      | student1 | Student | 1 | student1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | category |
14
      | Course 1 | C1 | 0 |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    And the following "activity" exists:
20
      | activity      | wiki                  |
21
      | course        | C1                    |
22
      | name          | Test wiki name        |
23
      | wikimode      | collaborative         |
24
    And I am on the "Test wiki name" "wiki activity" page logged in as student1
25
    When I press "Create page"
26
    And I set the following fields to these values:
27
      | HTML format | Student page contents to be previewed |
28
    And I press "Preview"
29
    Then I expand all fieldsets
30
    And I should see "This is a preview. Changes have not been saved yet"
31
    And I should see "Student page contents to be previewed"
32
    And I press "Save"
33
    And I should see "Student page contents to be previewed"
34
    And I select "Edit" from the "jump" singleselect
35
 
36
  @javascript
37
  Scenario: Page contents preview before saving with Javascript enabled
38
    Then the field "HTML format" matches value "Student page contents to be previewed"
39
    And I press "Cancel"
40
 
41
  Scenario: Page contents preview before saving with Javascript disabled
42
    Then the field "HTML format" matches value "Student page contents to be previewed"
43
    And I press "Cancel"