problem-editor.feature 5.28 KB
Newer Older
1
@shard_1
2
Feature: CMS.Problem Editor
cahrens committed
3
  As a course author, I want to be able to create problems and edit their settings.
cahrens committed
4 5

  Scenario: User can view metadata
Julian Arni committed
6
    Given I have created a Blank Common Problem
7
    When I edit and select Settings
8
    Then I see the advanced settings and their expected values
cahrens committed
9 10
    And Edit High Level Source is not visible

JonahStanley committed
11 12
  # Safari is having trouble saving the values on sauce
  @skip_safari
cahrens committed
13 14
  Scenario: User can modify String values
    Given I have created a Blank Common Problem
15
    When I edit and select Settings
cahrens committed
16 17 18
    Then I can modify the display name
    And my display name change is persisted on save

JonahStanley committed
19 20
  # Safari is having trouble saving the values on sauce
  @skip_safari
21 22
  Scenario: User can specify special characters in String values
    Given I have created a Blank Common Problem
23
    When I edit and select Settings
24 25 26
    Then I can specify special characters in the display name
    And my special characters and persisted on save

cahrens committed
27 28
  Scenario: User can revert display name to unset
    Given I have created a Blank Common Problem
29
    When I edit and select Settings
cahrens committed
30 31 32
    Then I can revert the display name to unset
    And my display name is unset on save

33 34 35 36 37 38
  Scenario: User can specify html in display name and it will be escaped
    Given I have created a Blank Common Problem
    When I edit and select Settings
    Then I can specify html in the display name and save
    And the problem display name is "<script>alert('test')</script>"

JonahStanley committed
39 40
  # IE will not click the revert button properly
  @skip_internetexplorer
cahrens committed
41 42
  Scenario: User can select values in a Select
    Given I have created a Blank Common Problem
43
    When I edit and select Settings
cahrens committed
44 45 46 47
    Then I can select Per Student for Randomization
    And my change to randomization is persisted
    And I can revert to the default value for randomization

JonahStanley committed
48 49
  # Safari will input it as 35.
  @skip_safari
cahrens committed
50 51
  Scenario: User can modify float input values
    Given I have created a Blank Common Problem
52
    When I edit and select Settings
53
    Then I can set the weight to "3.5"
cahrens committed
54 55 56 57 58
    And my change to weight is persisted
    And I can revert to the default value of unset for weight

  Scenario: User cannot type letters in float number field
    Given I have created a Blank Common Problem
59
    When I edit and select Settings
60
    Then if I set the weight to "abc", it remains unset
cahrens committed
61

JonahStanley committed
62 63
  # Safari will input it as 234.
  @skip_safari
cahrens committed
64 65
  Scenario: User cannot type decimal values integer number field
    Given I have created a Blank Common Problem
66
    When I edit and select Settings
67
    Then if I set the max attempts to "2.34", it will persist as a valid integer
cahrens committed
68

JonahStanley committed
69 70
  # Safari will input it incorrectly
  @skip_safari
cahrens committed
71 72
  Scenario: User cannot type out of range values in an integer number field
    Given I have created a Blank Common Problem
73
    When I edit and select Settings
74
    Then if I set the max attempts to "-3", it will persist as a valid integer
cahrens committed
75

JonahStanley committed
76 77
  # Safari will input it as 35.
  @skip_safari
cahrens committed
78 79
  Scenario: Settings changes are not saved on Cancel
    Given I have created a Blank Common Problem
80
    When I edit and select Settings
81
    Then I can set the weight to "3.5"
cahrens committed
82 83 84 85 86
    And I can modify the display name
    Then If I press Cancel my changes are not persisted

  Scenario: Edit High Level source is available for LaTeX problem
    Given I have created a LaTeX Problem
87
    When I edit and select Settings
cahrens committed
88
    Then Edit High Level Source is visible
89

90 91 92 93 94
  Scenario: Cheat sheet visible on toggle
    Given I have created a Blank Common Problem
    And I can edit the problem
    Then I can see cheatsheet

95 96 97 98 99 100 101 102 103 104
  Scenario: Reply on Annotation and Return to Annotation link works for Annotation problem
    Given I have created a unit with advanced module "annotatable"
    And I have created an advanced component "Annotation" of type "annotatable"
    And I have created an advanced problem of type "Blank Advanced Problem"
    And I edit first blank advanced problem for annotation response
    When I mouseover on "annotatable-span"
    Then I can see Reply to Annotation link
    And I see that page has scrolled "down" when I click on "annotatable-reply" link
    And I see that page has scrolled "up" when I click on "annotation-return" link

105 106 107 108 109
  # Disabled 11/13/2013 after failing in master
  # The screenshot showed that the LaTeX editor had the text "hi",
  # but Selenium timed out waiting for the text to appear.
  # It also caused later tests to fail with "UnexpectedAlertPresent"
  #
110
  # This feature will work in Firefox only when Firefox is the active window
JonahStanley committed
111
  # IE will not interact with the high level source in sauce labs
112 113 114 115 116 117
  #@skip_internetexplorer
  #Scenario: High Level source is persisted for LaTeX problem (bug STUD-280)
  #  Given I have created a LaTeX Problem
  #  When I edit and compile the High Level Source
  #  Then my change to the High Level Source is persisted
  #  And when I view the High Level Source I see my changes
118

Will Daly committed
119 120 121 122 123 124 125 126 127
    # Disabled 10/28/13 due to flakiness observed in master
    #  Scenario: Exceptions don't cause problem to be uneditable (bug STUD-786)
    #Given I have an empty course
    #And I go to the import page
    #And I import the file "get_html_exception_test.tar.gz"
    #When I go to the unit "Probability and BMI"
    #And I click on "edit a draft"
    #Then I see a message that says "We're having trouble rendering your component"
    #And I can edit the problem