lti.feature 8.92 KB
Newer Older
1
@shard_1 @requires_stub_lti
2
Feature: LMS.LTI component
3 4
  As a student, I want to view LTI component in LMS.

5
  #1
6
  Scenario: LTI component in LMS with no launch_url is not rendered
7
  Given the course has correct LTI credentials with registered Instructor
8 9 10
  And the course has an LTI component with no_launch_url fields:
  | open_in_a_new_page |
  | False              |
11
  Then I view the LTI and error is shown
12

13
  #2
14
  Scenario: LTI component in LMS with incorrect lti_id is rendered incorrectly
15
  Given the course has correct LTI credentials with registered Instructor
16 17 18
  And the course has an LTI component with incorrect_lti_id fields:
  | open_in_a_new_page |
  | False              |
19
  Then I view the LTI but incorrect_signature warning is rendered
20

21
  #3
22 23
  Scenario: LTI component in LMS is rendered incorrectly
  Given the course has incorrect LTI credentials
24 25 26
  And the course has an LTI component with correct fields:
  | open_in_a_new_page |
  | False              |
27
  Then I view the LTI but incorrect_signature warning is rendered
28

29
  #4
30
  Scenario: LTI component in LMS is correctly rendered in new page
31
  Given the course has correct LTI credentials with registered Instructor
32
  And the course has an LTI component with correct fields
33 34
  Then I view the LTI and it is rendered in new page

35
  #5
36
  Scenario: LTI component in LMS is correctly rendered in iframe
37
  Given the course has correct LTI credentials with registered Instructor
38 39 40
  And the course has an LTI component with correct fields:
  | open_in_a_new_page |
  | False              |
41
  Then I view the LTI and it is rendered in iframe
42 43 44

  #6
  Scenario: Graded LTI component in LMS is correctly works
45
  Given the course has correct LTI credentials with registered Instructor
46
  And the course has an LTI component with correct fields:
47
  | open_in_a_new_page | weight | graded    | has_score |
48
  | False              | 10     | True      | True      |
49
  And I submit answer to LTI 1 question
50 51 52 53
  And I click on the "Progress" tab
  Then I see text "Problem Scores: 5/10"
  And I see graph with total progress "5%"
  Then I click on the "Instructor" tab
54 55
  And I click on the "Student Admin" tab
  And I click on the "View Gradebook" link
56 57 58
  And I see in the gradebook table that "HW" is "50"
  And I see in the gradebook table that "Total" is "5"

59
  #7
60 61 62 63 64 65 66 67 68 69 70
  Scenario: Graded LTI component in LMS role's masquerading correctly works
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | open_in_a_new_page | has_score |
  | False              | True      |
  And I view the LTI and it is rendered in iframe
  And I see in iframe that LTI role is Instructor
  And I switch to Student view
  Then I see in iframe that LTI role is Student

  #8
71 72 73
  Scenario: Graded LTI component in LMS is correctly works with beta testers
  Given the course has correct LTI credentials with registered BetaTester
  And the course has an LTI component with correct fields:
74
  | open_in_a_new_page | weight | graded    | has_score |
75
  | False              | 10     | True      | True      |
76
  And I submit answer to LTI 1 question
77 78 79
  And I click on the "Progress" tab
  Then I see text "Problem Scores: 5/10"
  And I see graph with total progress "5%"
80 81

  #9
Minh Tue Vo committed
82
  Scenario: Graded LTI component in LMS is correctly works with LTI2v0 PUT callback
83 84
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
85
  | open_in_a_new_page | weight | graded    | has_score |
86 87 88 89 90 91
  | False              | 10     | True      | True      |
  And I submit answer to LTI 2 question
  And I click on the "Progress" tab
  Then I see text "Problem Scores: 8/10"
  And I see graph with total progress "8%"
  Then I click on the "Instructor" tab
92 93
  And I click on the "Student Admin" tab
  And I click on the "View Gradebook" link
94 95 96 97 98 99 100
  And I see in the gradebook table that "HW" is "80"
  And I see in the gradebook table that "Total" is "8"
  And I visit the LTI component
  Then I see LTI component progress with text "(8.0 / 10.0 points)"
  Then I see LTI component feedback with text "This is awesome."

  #10
Minh Tue Vo committed
101
  Scenario: Graded LTI component in LMS is correctly works with LTI2v0 PUT delete callback
102 103
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
104
  | open_in_a_new_page | weight | graded    | has_score |
105 106 107 108 109 110 111 112 113 114 115 116 117
  | False              | 10     | True      | True      |
  And I submit answer to LTI 2 question
  And I visit the LTI component
  Then I see LTI component progress with text "(8.0 / 10.0 points)"
  Then I see LTI component feedback with text "This is awesome."
  And the LTI provider deletes my grade and feedback
  And I visit the LTI component (have to reload)
  Then I see LTI component progress with text "(10.0 points possible)"
  Then in the LTI component I do not see feedback
  And I click on the "Progress" tab
  Then I see text "Problem Scores: 0/10"
  And I see graph with total progress "0%"
  Then I click on the "Instructor" tab
118 119
  And I click on the "Student Admin" tab
  And I click on the "View Gradebook" link
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
  And I see in the gradebook table that "HW" is "0"
  And I see in the gradebook table that "Total" is "0"

  #11
  Scenario: LTI component that set to hide_launch and open_in_a_new_page shows no button
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | open_in_a_new_page | hide_launch |
  | False              | True        |
  Then in the LTI component I do not see a launch button
  Then I see LTI component module title with text "LTI (EXTERNAL RESOURCE)"

  #12
  Scenario: LTI component that set to hide_launch and not open_in_a_new_page shows no iframe
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | open_in_a_new_page | hide_launch |
  | True               | True        |
  Then in the LTI component I do not see an provider iframe
  Then I see LTI component module title with text "LTI (EXTERNAL RESOURCE)"
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209

  #13
  Scenario: LTI component button text is correctly displayed
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | button_text        |
  | Launch Application |
  Then I see LTI component button with text "Launch Application"

  #14
  Scenario: LTI component description is correctly displayed
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | description             |
  | Application description |
  Then I see LTI component description with text "Application description"

  #15
  Scenario: LTI component requests permission for username and is rejected
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_username |
  | True                 |
  Then I view the permission alert
  Then I reject the permission alert and do not view the LTI
  
  #16
  Scenario: LTI component requests permission for username and displays LTI when accepted
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_username |
  | True                 |
  Then I view the permission alert
  Then I accept the permission alert and view the LTI

  #17
  Scenario: LTI component requests permission for email and is rejected
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_email |
  | True              |
  Then I view the permission alert
  Then I reject the permission alert and do not view the LTI
  
  #18
  Scenario: LTI component requests permission for email and displays LTI when accepted
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_email |
  | True              |
  Then I view the permission alert
  Then I accept the permission alert and view the LTI

  #19
  Scenario: LTI component requests permission for email and username and is rejected
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_email | ask_to_send_username |
  | True              | True                 |
  Then I view the permission alert
  Then I reject the permission alert and do not view the LTI
  
  #20
  Scenario: LTI component requests permission for email and username and displays LTI when accepted
  Given the course has correct LTI credentials with registered Instructor
  And the course has an LTI component with correct fields:
  | ask_to_send_email | ask_to_send_username |
  | True              | True                 |
  Then I view the permission alert
  Then I accept the permission alert and view the LTI