Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
@core @core_courseformat
2
Feature: Validate some activity editing has a non-ajax alternative
3
  In order to edit the course activities faster
4
  As a teacher
5
  I need to be able use some edit tools without ajax.
6
 
7
  Background:
8
    Given the following "course" exists:
9
      | fullname     | Course 1 |
10
      | shortname    | C1       |
11
      | category     | 0        |
12
      | numsections  | 3        |
13
      | initsections | 1        |
14
    And the following "activities" exist:
15
      | activity | name              | intro                       | course | idnumber | section |
16
      | assign   | Activity sample 1 | Test assignment description | C1     | sample1  | 1       |
17
    And the following "users" exist:
18
      | username | firstname | lastname | email                |
19
      | teacher1 | Teacher   | 1        | teacher1@example.com |
20
    And the following "course enrolments" exist:
21
      | user     | course | role           |
22
      | teacher1 | C1     | editingteacher |
23
 
24
  Scenario: Activity settings can be accessed without ajax
25
    Given I log in as "teacher1"
26
    And I am on "Course 1" course homepage with editing mode on
27
    When I click on "Edit settings" "link" in the "Activity sample 1" "activity"
28
    Then I should see "Assignment name"
29
    And I set the field "Assignment name" to "New name"
30
    And I press "Save and return to course"
31
    And I should see "New name"
32
 
33
  Scenario: Indent an activity can be done without ajax
34
    Given I log in as "teacher1"
35
    And I am on "Course 1" course homepage with editing mode on
36
    And I should not see "Move left"
37
    When I click on "Move right" "link" in the "Activity sample 1" "activity"
38
    Then I should see "Move left"
39
    And I should not see "Move right"
40
    And I click on "Move left" "link" in the "Activity sample 1" "activity"
41
    And I should not see "Move left"
42
    And I should see "Move right"
43
 
44
  Scenario: Hide and show an activity can be done without ajax
45
    Given I log in as "teacher1"
46
    And I am on "Course 1" course homepage with editing mode on
47
    And I should not see "Show" in the ".cm_action_menu" "css_element"
48
    When I click on "Hide" "link" in the "Activity sample 1" "activity"
49
    Then I should see "Show" in the ".cm_action_menu" "css_element"
50
    And I should not see "Hide" in the ".cm_action_menu" "css_element"
51
    And I click on "Show" "link" in the "Activity sample 1" "activity"
52
    And I should not see "Show" in the ".cm_action_menu" "css_element"
53
    And I should see "Hide" in the ".cm_action_menu" "css_element"
54
 
55
  Scenario: Activity visibility with stealth option can be changed without ajax
56
    Given the following config values are set as admin:
57
      | allowstealth | 1 |
58
    And I log in as "teacher1"
59
    And I am on "Course 1" course homepage with editing mode on
60
    And I should see "Show on course page"
61
    And I should see "Hide on course page"
62
    And I should see "Make available but don't show on course page"
63
    And ".activity-badges" "css_element" should not exist
64
    When I click on "Hide on course page" "link" in the "Activity sample 1" "activity"
65
    Then I should see "Hidden from students" in the "Activity sample 1" "core_courseformat > Activity visibility"
66
    And I should not see "Available but not shown on course page" in the "Activity sample 1" "core_courseformat > Activity visibility"
67
    And I click on "Make available but don't show on course page" "link" in the "Activity sample 1" "activity"
68
    And I should not see "Hidden from students" in the "Activity sample 1" "core_courseformat > Activity visibility"
69
    And I should see "Available but not shown on course page" in the "Activity sample 1" "core_courseformat > Activity visibility"
70
    And I click on "Show on course page" "link" in the "Activity sample 1" "activity"
71
    And ".activity-badges" "css_element" should not exist
72
 
73
  Scenario: Duplicate activity can be done without ajax
74
    Given I log in as "teacher1"
75
    And I am on "Course 1" course homepage with editing mode on
76
    When I click on "Duplicate" "link" in the "Activity sample 1" "activity"
77
    Then I should see "Activity sample 1 (copy)"
78
 
79
  Scenario: Delete activity can be done without ajax
80
    Given I log in as "teacher1"
81
    And I am on "Course 1" course homepage with editing mode on
82
    When I click on "Delete" "link" in the "Activity sample 1" "activity"
83
    And I should see "Delete activity?"
84
    And I should see "This will delete Activity sample 1 and any user data it contains"
85
    And I click on "Delete" "button"
86
    Then I should not see "Activity sample 1"
87
 
88
  Scenario: The activity groupmode can be changed without ajax
89
    Given the following "groups" exist:
90
      | name | course | idnumber |
91
      | G1   | C1     | GI1      |
92
    And I log in as "teacher1"
93
    And I am on "Course 1" course homepage with editing mode on
94
    And "No groups" "icon" should exist in the "Activity sample 1" "activity"
95
    And "Visible groups" "icon" should not exist in the "Activity sample 1" "activity"
96
    And "Separate groups" "icon" should not exist in the "Activity sample 1" "activity"
97
    When I click on "Separate groups" "link" in the "Activity sample 1" "activity"
98
    And "No groups" "icon" should not exist in the "Activity sample 1" "activity"
99
    And "Visible groups" "icon" should not exist in the "Activity sample 1" "activity"
100
    And "Separate groups" "icon" should exist in the "Activity sample 1" "activity"
101
    And I click on "Visible groups" "link" in the "Activity sample 1" "activity"
102
    And "No groups" "icon" should not exist in the "Activity sample 1" "activity"
103
    And "Visible groups" "icon" should exist in the "Activity sample 1" "activity"
104
    And "Separate groups" "icon" should not exist in the "Activity sample 1" "activity"
105
    And I click on "No groups" "link" in the "Activity sample 1" "activity"
106
    And "No groups" "icon" should exist in the "Activity sample 1" "activity"
107
    And "Visible groups" "icon" should not exist in the "Activity sample 1" "activity"
108
    And "Separate groups" "icon" should not exist in the "Activity sample 1" "activity"