From 6f719b3848f0ea584f7814c0aca02e384a97c33a Mon Sep 17 00:00:00 2001 From: Peter Cenov Date: Thu, 17 Nov 2022 07:22:44 -0800 Subject: [PATCH 1/4] updates --- .../allow-marking-as-complete.feature | 8 ++- .../edit-completion-field.feature | 51 ++++++++++--------- .../edit-learning-level-field.feature | 2 +- ...ultiple-resources-at-the-same-time.feature | 10 ++-- ...eature => edit-requirements-field.feature} | 32 ++++++------ 5 files changed, 56 insertions(+), 47 deletions(-) rename integration_testing/features/wip-studio-edit-modal/{edit-what-you-will-need-field.feature => edit-requirements-field.feature} (55%) diff --git a/integration_testing/features/wip-studio-edit-modal/allow-marking-as-complete.feature b/integration_testing/features/wip-studio-edit-modal/allow-marking-as-complete.feature index 18540109c8..69ecf7f340 100755 --- a/integration_testing/features/wip-studio-edit-modal/allow-marking-as-complete.feature +++ b/integration_testing/features/wip-studio-edit-modal/allow-marking-as-complete.feature @@ -10,7 +10,13 @@ Feature: Allow marking as complete Scenario: Toggle *Allow learners to mark as complete* setting 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 + When I click *FINISH* + Then I see the in the topic tree + And I do not see an error icon + + Scenario: Uncheck the *Allow learners to mark as complete* setting + Given the *Allow marking as complete* checkbox is checked + When I uncheck the selected *Allow marking as complete* checkbox Then I see the *Allow marking as complete* is empty When I click *FINISH* Then I see the in the topic tree diff --git a/integration_testing/features/wip-studio-edit-modal/edit-completion-field.feature b/integration_testing/features/wip-studio-edit-modal/edit-completion-field.feature index 4ae96901ab..1d1965b688 100755 --- a/integration_testing/features/wip-studio-edit-modal/edit-completion-field.feature +++ b/integration_testing/features/wip-studio-edit-modal/edit-completion-field.feature @@ -47,45 +47,49 @@ Feature: Edit completion/duration field Given I am viewing a .ZIP When I click on the *Completion* dropdown Then I see the options: *When time spent is equal to duration*, *Determined by the resource*, and *Reference material* + When I click on the *Duration* dropdown + Then I see the options: *Time to complete*, *Short activity*, and *Long activity* Scenario: Default options for Exercise on content creation Given I am viewing an exercise that I have just added And I see the *Completion* section Then I see the *Completion* is set by default to *When goal is met* - And there is a *goal* dropdown with no default set + And there is a *Goal* dropdown with no default set And *Duration* is not visible for exercises + When I click on the *Duration* dropdown + Then I see the options: *Goal: 100% correct*, *M of N*, *Goal: 10 in a row*, *Goal: 2 in a row*, *Goal: 3 in a row*, *Goal: 5 in a row* Scenario: View options for Practice resources Given I am viewing an exercise When I click on the *Completion* dropdown Then I see the options: *When goal is met* and *Practice quiz* - Scenario: Set completion to *Short activity* - When I click on the *Completion* dropdown + Scenario: Set duration to *Short activity* #not valid for exercises + When I click on the *Duration* dropdown And I select *Short activity* Then I see *Short activity* appear in the text input - And I see a *Minutes* dropdown input field appear next to *Completion* + And I see a *Minutes* dropdown input field appear next to *Duration* And I see *Minutes* is set to 10 by default And I see the maximum option in the menu is 30 minutes - And I see the caption *(Optional) Duration until resource is marked as complete. This value will not be shown to learners* + And I see the caption *(Optional) Time required for the resource to be marked as completed. This value will not be displayed to learners.* Scenario: Adjust time for short activities - Given *Completion* is set to *Short activity* + Given *Duration* is set to *Short activity* When I adjust the value by selecting a different option in the dropdown Then I see the value in the *Minutes* field update - Scenario: Set completion to *Long activity* - When I click on the *Completion* dropdown + Scenario: Set duration to *Long activity* #not valid for exercises + When I click on the *Duration* dropdown And I select *Long activity* Then I see *Long activity* appear in the text input - And I see a *Minutes* dropdown input field appear next to *Completion* + And I see a *Minutes* dropdown input field appear next to *Duration* And I see *Minutes* is set to 50 by default And I see the maximum option in the menu is 120 minutes And I see the maximum option in the menu is 40 minutes - And I see the caption *(Optional) Duration until resource is marked as complete. This value will not be shown to learners* + And I see the caption *(Optional) Time required for the resource to be marked as completed. This value will not be displayed to learners.* Scenario: Adjust time for long activities - Given *Completion* is set to *Long activity* + Given *Duration* is set to *Long activity* When I adjust the value by selecting a different option in the dropdown Then I see the value in the *Minutes* field update @@ -96,11 +100,11 @@ Feature: Edit completion/duration field And I see the caption *Progress will not be tracked on reference material unless learners mark it as complete* And the *Duration* input field is hidden - Scenario: Set completion to *Time to complete* on .MP4 or .MOV + Scenario: Set duration to *Time to complete* on .MP4 or .WEBM Given I am viewing an .MP4 or .MOV - When I click the *Completion* dropdown - When I select *Time to complete* - Then I see the exact duration appear next to the *Duration* field as plain text + When I set the *Completion* dropdown to *When time spent is equal to duration* + Then the *Duration* dropdown is set by default to *Time to complete* + And I see the exact duration appear next to the *Duration* field as plain text And I see that I cannot edit it Scenario: Set completion to *Time to complete* for .PDF, .EPUB, or slides @@ -111,30 +115,29 @@ Feature: Edit completion/duration field Then I see a *Time to complete* appear as an input for *Duration* And I see a *Minutes* text input field appear next to *Duration* When I click the *Minutes* field - And I enter a whole number + And I enter a whole number value And I lose focus on the field - Then I see the number has saved + Then I see the number was 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: Check *Allow learners to mark as complete* - Given I can see the *Allow learners to mark as complete* field in *Completion* - When I click on the checkbox - Then I see that it changes from its current state to the opposite - - Scenario: Set completion to *Practice until goal is met* + Scenario: Set exercise completion to *When goal is met* Given I am viewing an exercise When I click the *Completion* dropdown And I click *When goal is met* Then I see the *Completion* field is set to *When goal is met* - And I see an empty *Goal* text field dropdown appears next to it + And I see the *Goal* dropdown is set to *Goal: 100% correct* 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 + When I fill in the required fields + And I wait for the auto save to complete + Then I see the *Completion* set to the specified criteria + And I don't see any errors Scenario: See that *Completion* field is required Given that a required *Completion* or *Duration* field of is empty diff --git a/integration_testing/features/wip-studio-edit-modal/edit-learning-level-field.feature b/integration_testing/features/wip-studio-edit-modal/edit-learning-level-field.feature index 7d3c2da940..e804deb4a1 100755 --- a/integration_testing/features/wip-studio-edit-modal/edit-learning-level-field.feature +++ b/integration_testing/features/wip-studio-edit-modal/edit-learning-level-field.feature @@ -12,7 +12,7 @@ Feature: Edit *Learning level* field 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* #TO DO - we need a final list with the available checkboxes + And I see the options: *All levels -- basic skills*, *Lower primary*, *Lower secondary*, *Preschool*, *Specialized professional training*, *Tertiary*, *Upper primary*, *Upper secondary*, *All levels -- work skills* Scenario: Select options Given I see the options for *Level* diff --git a/integration_testing/features/wip-studio-edit-modal/edit-multiple-resources-at-the-same-time.feature b/integration_testing/features/wip-studio-edit-modal/edit-multiple-resources-at-the-same-time.feature index db8657662e..d6fcbce847 100755 --- a/integration_testing/features/wip-studio-edit-modal/edit-multiple-resources-at-the-same-time.feature +++ b/integration_testing/features/wip-studio-edit-modal/edit-multiple-resources-at-the-same-time.feature @@ -10,12 +10,12 @@ Feature: Edit multiple resources at the same time in the edit modal Scenario: See which fields are hidden and shown When I select more than one checkbox in the resource panel on the left - Then I see *Editing details for resources* + Then I see *Editing details for folders, resources* And I see text fields and dropdown options that are common to all selected resources And I do not see text fields and dropdown options that are not common to all selected resources And I do not see the resource renderer, *Title*, *Description*, *Preview files*, or *Thumbnail* - Scenario: View mixed settings on a multi-select dropdown + Scenario: View mixed settings on a multi-select dropdown #not implemented, don't test When I select checkboxes in the resource panel on the left And those resources have mixed settings across different dropdown fields Then I see a chip with the *Mixed* label for those dropdowns @@ -23,7 +23,7 @@ Feature: Edit multiple resources at the same time in the edit modal When I click a dropdown that has the *Mixed* label Then I see an indeterminate checkbox for each option that partially applies to all selected resources - Scenario: Select an indeterminate checkbox in a multi-select dropdown + Scenario: Select an indeterminate checkbox in a multi-select dropdown #not implemented, don't test Given has a *Mixed* chip When I click Then I see