advanced_settings.feature 3.09 KB
Newer Older
1
@shard_1
2
Feature: CMS.Advanced (manual) course policy
cahrens committed
3
  In order to specify course policy settings for which no custom user interface exists
Will Daly committed
4
  I want to be able to manually enter JSON key /value pairs
cahrens committed
5

6

7 8 9 10
  Scenario: A course author sees default advanced settings
    Given I have opened a new course in Studio
    When I select the Advanced Settings
    Then I see default advanced settings
cahrens committed
11

12 13 14
  Scenario: Add new entries, and they appear alphabetically after save
    Given I am on the Advanced Course Settings page in Studio
    Then the settings are alphabetized
15

16
  # Sauce labs does not play nicely with CodeMirror
17
  @skip_sauce
18 19 20 21 22 23 24
  Scenario: Test cancel editing key value
    Given I am on the Advanced Course Settings page in Studio
    When I edit the value of a policy key
    And I press the "Cancel" notification button
    Then the policy key value is unchanged
    And I reload the page
    Then the policy key value is unchanged
25

26
  # Sauce labs does not play nicely with CodeMirror
27
  @skip_sauce
28 29
  Scenario: Test editing key value
    Given I am on the Advanced Course Settings page in Studio
30
    When I edit the value of a policy key and save
31
    Then the policy key value is changed
32 33 34
    And I reload the page
    Then the policy key value is changed

35
  # Sauce labs does not play nicely with CodeMirror
36
  @skip_sauce
37
  Scenario: Test how multi-line input appears
38
    Given I am on the Advanced Course Settings page in Studio
39
    When I create a JSON object as a value for "Discussion Topic Mapping"
40 41 42 43
    Then it is displayed as formatted
    And I reload the page
    Then it is displayed as formatted

44
  # Sauce labs does not play nicely with CodeMirror
45
  @skip_sauce
46 47
  Scenario: Test error if value supplied is of the wrong type
    Given I am on the Advanced Course Settings page in Studio
48
    When I create a JSON object as a value for "Course Display Name"
49
    Then I get an error on save
cahrens committed
50 51
    And I reload the page
    Then the policy key value is unchanged
52

53
  # This feature will work in Firefox only when Firefox is the active window
54
  # Sauce labs does not play nicely with CodeMirror
55
  @skip_sauce
56
  Scenario: Test automatic quoting of non-JSON values
57
    Given I am on the Advanced Course Settings page in Studio
58
    When I create a non-JSON value not in quotes
59 60 61
    Then it is displayed as a string
    And I reload the page
    Then it is displayed as a string
62

63
  # Sauce labs does not play nicely with CodeMirror
64
  @skip_sauce
65 66 67 68 69
  Scenario: Confirmation is shown on save
    Given I am on the Advanced Course Settings page in Studio
    When I edit the value of a policy key
    And I press the "Save" notification button
    Then I see a confirmation that my changes have been saved
70 71 72 73 74 75 76 77 78 79 80

  Scenario: Deprecated Settings are not shown by default
    Given I am on the Advanced Course Settings page in Studio
    Then deprecated settings are not shown

  Scenario: Deprecated Settings can be toggled
    Given I am on the Advanced Course Settings page in Studio
    When I toggle the display of deprecated settings
    Then deprecated settings are then shown
    And I toggle the display of deprecated settings
    Then deprecated settings are not shown