Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions integration_testing/features/allow-marking-as-complete.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Feature: Allow marking as complete
This feature allows learners to manually mark a resource as complete in the learning platform. This option is available on all file types.

# Comment here

Background:
Given I am signed into Studio
And I am in an editable channel
And I see the *Edit* modal for <resource>

Scenario: Toggle *Allow learners to mark as complete* setting
Given the *Allow marking as complete* checkbox is empty
When I click the *Allow marking as complete* checkbox
Then I see the *Allow marking as complete* is selected
When I click the selected *Allow marking as complete* checkbox
Then I see the *Allow marking as complete* is empty

Scenario: See that *Allow learners to mark as complete* is optional
Given the *Allow marking as complete* checkbox of <resource> is empty
When I click *FINISH*
Then I see <resource> in the topic tree
And I do not see an error icon
124 changes: 124 additions & 0 deletions integration_testing/features/edit-category-field.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
Feature: Edit *Category* field
Across all file types.

# Comment here

Background:
Given I am signed into Studio
And I am in an editable channel
When I right click <resource>
When I click *Edit details*
Then I see the edit modal for <resource>
And I see the *Category* dropdown in the *Basic information* section

Scenario: View category options
When I click the *Category* dropdown
Then I see a nested checkbox list of all categories
And I see that children checkboxes are aligned with the text of the parent category
When I scroll through the category list
Then I see a gray divider between top-level categories

Scenario: Select first-level category option
Given that <first-level category> checkbox is empty
When I click <first-level category>
Then I see that <first-level category> is determinately selected
And I see that children categories are not selected
And I see a chip with <first-level category> in the *Category* text field

Scenario: Select second-level category option
Given that <first-level category> checkbox is empty
When I select <second-level category> under <first-level category>
Then I see that <second-level category> is determinately selected
And I see that <first-level category> is determinately selected
And I see that children categories are not selected
And I see that <second-level category> is represented as a chip in the *Category* text field
And I do not see <first-level category> represented as a chip in the *Category* text field
When I hover my mouse over the <second-level category> chip
Then I see *<first-level category> - <second-level category>* in a tooltip

Scenario: Select third-level category option
Given that <first-level category> checkbox is empty
And <second-level category> under <first-level category> is empty
When I select <third-level category> under <second-level category>
Then I see that <third-level category> is determinately selected
And I see that <second-level category> is determinately selected
And I see that <first-level category> is determinately selected
And I see that <third-level category> is represented as a chip in the *Category* text field
And I do not see <second-level category> represented as a chip in the *Category* text field
And I do not see <first-level category> represented as a chip in the *Category* text field
When I hover my mouse over the <third-level category> chip
Then I see *<first-level category> - <second-level category> - <third-level category>* in a tooltip

Scenario: Select child category while a parent category is selected
Given that <first-level category> checkbox is selected
And <first-level category> is a chip in the *Category* text field
When I click <second-level category> under <first-level category>
then I see that <second-level category> is determinately selected
And <first-level category> is still determinately selected
And I see the chip in the *Category* text field changed to <second-level category>
And I do not see <first-level category> as a chip in the *Category* text field

Scenario: Select a parent category while a child category is selected
Given that <third-level category> is selected
And <third-level category> is a chip in the *Category* text field
When I click <second-level category>, the parent of <third-level category>
Then I see <third-level category> is not selected
And I see <second-level category> is not selected
And I see <first-level category> is determinately selected
And I see <first-level category> is represented as a chip in the *Category* text field

Scenario: Select categories through text input
When I click on the *Category* dropdown
Then I see that the text input is active
When I start entering text
And the text I enter appears in the categories
Then I see matching options appear as a flat list
And I do not see nested categories
And I see an *X* icon on the right side of the text input
When I click on the <category> checkbox from the flat list
Then I see <category> appear as a chip in the text input
And I see that my text input has cleared
And I see the full nested category list

Scenario: No results when inputting text
When I click on the *Category* dropdown
Then I see that the text input is active
When I start entering text
And the text I enter does not appear in the categories
Then I see *Category not found*
And I do not see any selectable categories

Scenario: Chips overflow in the text field
When I click <X> checkboxes in the *Category* dropdown
And the length of the chips exceeds the width of the dropdown
Then I see the chips go to the next line
And the height of the *Category* dropdown grows to contain it

Scenario: Remove category selection
Given I <option> is selected in *Category*
When I click the selected checkbox for <option>
Then I see that the checkbox for <option> is empty
And I do not see the chip in the textbox

Scenario: Clear all category selections
Given there is more than one option selected in *Category
When I click the *X* in the text input of *Category*
Then I do not see any chips in the *Category* textbox

Scenario: Clear all category selections while inputting text
Given there is more than one option selected in *Category*
When I click on *Category*
Then I see I can input text
When I start inputting text
When I click the *X* on the *Category* dropdown
Then I do not see any chips in the *Category* textbox
And I do not see the text that I started inputting

Scenario: See that *Category* is optional
Given the *Category* field of <resource> is empty
When I click *FINISH*
Then I see <resource> in the topic tree
And I do not see an error icon
When I left-click <resource>
Then I see the previewer for <resource>
And I see the *Category* field is empty
141 changes: 141 additions & 0 deletions integration_testing/features/edit-completion-field.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
Feature: Edit completion field
Across all file types

# Comment here

Background:
Given I am signed into Studio
And I am in an editable channel
When I right click <resource>
When I click *Edit details*
Then I see the edit modal for <resource>
And I see the *Completion* section underneath the *Basic information* section

Scenario: View options for .MP4
Given I am viewing an .MP4 file
When I click the *Completion* dropdown
Then I see the options: *Short activity*, *Long activity*, *Reference*, and *Exact time to complete*

Scenario: View options for .PDF or .EPUB
Given I am viewing a .PDF or .EPUB file
When I click the *Completion* dropdown
Then I see the options: *All content viewed*, *Short activity*, *Long activity*, *Reference*, and *Exact time to complete*

Scenario: View options for .MP3
Given I am viewing an .MP3 file
When I click the *Completion* dropdown
Then I see the options: *Short activity*, *Long activity*, *Reference*, and *Exact time to complete*

Scenario: View options for .ZIP
Given I am viewing a .ZIP
When I click on the *Completion* dropdown
Then I see the options: *Short activity*, *Long activity*, *Reference*, *Exact time to complete*

Scenario: View options for Practice resources
Given I am viewing an exercise
When I click on the *Completion* dropdown
Then I see the options: *Practice until goal is met*, *Short activity*, *Long activity*, *Reference*, *Exact time to complete*

Scenario: Set completion to *Short activity*
When I click on the *Completion* dropdown
When I select *Short activity*
Then I see *Short activity* appear in the text input
And I see a *Minutes* text input field appear next to *Completion*
And I see a slider appear next to *Minutes*
And I see *Minutes* is set to 10 by default
And I see the maximum value of the slider is 30 minutes
And I see the caption *(Optional) Duration until resource is marked as complete. This value will not be shown to learners*

Scenario: Adjust time for short activities
Given *Completion* is set to *Short activity*
When I adjust the slider
Then I see the value in the *Minutes* field change to match the slider
When I type in a new value into *Minutes*
When I lose focus on *Minutes*
Then I see the slider changes to match the value in *Minutes*
When I enter a value above 30 minutes into *Minutes*
Then I see the value in *Minutes* is set to 30 minutes
And I see the slider is set to 30 minutes

Scenario: Set completion to *Long activity*
When I click on the *Completion* dropdown
When I select *Long activity*
Then I see *Long activity* appear in the text input
And I see a *Minutes* text input field appear next to *Completion*
And I see a slider appear next to *Minutes*
And I see *Minutes* is set to 45 by default
And I see the maximum value of the slider is 120 minutes
And I see the caption *(Optional) Duration until resource is marked as complete. This value will not be shown to learners*

Scenario: Adjust time for long activities
Given *Completion* is set to *Long activity*
When I adjust the slider
Then I see the value in the *Minutes* field change to match the slider
When I type in a new value into *Minutes*
When I lose focus on *Minutes*
Then I see the slider changes to match the value in *Minutes*
When I enter a value above 120 minutes into *Minutes*
Then I see the value in *Minutes* is set to 120 minutes
And I see the slider is set to 120 minutes
When I enter a value below 45 minutes into *Minutes*
Then I see the value in *Minutes* is set to 45 minutes
And I see the slider is set to 45 minutes

Scenario: Set completion to *Reference*
When I click on the *Completion* dropdown
When I select *Reference*
Then I see *Reference* appear as an input for *Completion*
And I see the caption *Progress will not be tracked on reference material unless learners mark it as complete*
And I see an info icon next to the *Completion* field
When I hover over the info icon
Then I see the tooltip *Textbooks, dictionaries, indexes, and other similar resources*

Scenario: Set completion to *Exact time to complete* on .MP4 or .MOV
Given I am viewing an .MP4 or .MOV
When I click the *Completion* dropdown
When I select *Exact time to complete*
Then I see the exact duration <XX:XX> appear next to the *Completion* field as plain text
And I see that I cannot edit it

Scenario: Set completion to *Exact time to complete* for non- .MP4 or .MOV
Given I am viewing a resource that is not an .MP4 or .MOV
When I click the *Completion* dropdown
When I select *Exact time to complete*
Then I see a *Exact time to complete* appear as an input for *Completion*
And I see a *Minutes* text input field appear next to *Completion*
And I see it is empty by default
When I click the *Minutes* field
When I enter a whole number
When I lose focus on the field
Then I see the number has saved

Scenario: Enter whole numbers only to *Minutes* field
Given I can see the *Minutes* field in *Completion*
When I try to enter a non-numeric input or non-whole number
Then I see that I am blocked from entering that input

Scenario: Set completion to *Practice until goal is met*
Given I am viewing an exercise
When I click the *Completion* dropdown
When I click *Practice until goal is met*
Then I see the *Completion* field is set to *Practice until goal is met*
And I see an empty *Goal* text field dropdown appears next to it
When I click the *Goal* dropdown
Then I see the options: *100% correct*, *M of N*, *10 in a row*, *2 in a row*, *3 in a row*, *5 in a row*
When I select *M of N*
Then I see an empty*Correct answers needed* text field, */*, and empty *Recent answers* text field appear

Scenario: See that *Completion* field is required
Given the *Completion* field of <resource> is empty
When I click the *Completion* text field
When I lose focus on the *Completion* text field
Then I see *Completion* is in an error state
And I see *Completion is required*
When I click *FINISH*
Then I see <resource> in the topic tree
And I see a red error icon on <resource>
When I left-click <resource>
Then I see the previewer for <resource>
And I see there is no learning activity label at the top left
And I see the *Completion* field has a red error icon
And I see the message *Missing completion criteria* in red text
59 changes: 59 additions & 0 deletions integration_testing/features/edit-learnin- level-field.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Feature: Edit *Learning level* field
Across all file types

# Comment here

Background:
Given I am signed into Studio
And I am in an editable channel
When I right click <resource>
When I click *Edit details*
Then I see the edit modal for <resource>
And I see the *Level* dropdown in the *Basic information* section

Scenario: View learning level options
When I click the *Level* dropdown
Then I see multi-select checkboxes
And I see the options: *Preschool/Nursery*, *Lower primary*, *Upper primary*, *Lower secondary*, *Upper secondary*, *Tertiary*, *Specialized professional training*, *All levels -- basic skills*, *All levels -- work skills*

Scenario: Select options
Given I see the options for *Level*
When I click on the checkbox for <option>
Then I see <option> has a determinate checkbox
And I see the chip for <option> appear in the textbox
And I see an *X* in the text field

Scenario: Remove an option
Given I see the options for *Level*
And <option> is selected
When I click the selected checkbox for <option>
Then I see that the checkbox for <option> is empty
And I do not see the chip in the textbox

Scenario: Remove an option through chip
Given I see the options for *Level*
And <option> is selected
When I click the *X* in the chip
Then I do not see the chip for <option> in the textbox
And I do not see <option> selected in the *Level* dropdown

Scenario: Clear all options in the text field
Given I see that several options for *Level* are selected
When I click the *X* in the text field
Then I do not see any *Level* options in the text field
And I do not see the *X* in the text field

Scenario: Chips overflow in the text field
When I click <X> checkboxes in the *Level* dropdown
And the length of the chips exceeds the width of the dropdown
Then I see the chips go to the next line
And the height of the *Level* dropdown grows to contain it

Scenario: See that learning level field is optional
Given the *Level* field of <resource> is empty
When I click *FINISH*
Then I see <resource> in the topic tree
And I do not see an error icon
When I left-click <resource>
Then I see the previewer for <resource>
And I see the level field is empty
Loading