Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.16 gherkin updates and corrections #12109

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ Feature: Facility admin device management

Background:
Given I am signed into Kolibri as a facility admin user with device permissions for content import
And there are imported channels on the device

Scenario: View all the options for managing content
When I go to *Device > Channels* page
Then I see the list of already imported channels
And I see the *Options* button for each channel
And I see the *Import* and *Export* buttons
When I click the *Options* button
And I select *Import more*
Then I see the *Select a source* modal
And I can select one of the options
When I go to the *Device > Channels* page
Then I see the *Channels* label
And I see the *Options* drop-down and the *Import* button to the right
And I see the list with already imported channels
And I see the *Manage* button for each channel
When I click the *Manage* button for a channel
Then I see the *Manage <channel>* modal
And I see all the available channel details
And I see all the imported channel resources
And I see an *Import more* button
And I see that the *Delete* and *Export* buttons are disabled

# Continue testing content management by using the scenarios for super admins
# Continue testing content management by using the scenarios for super admins
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
Feature: Admin can rearrange channels
Admins need to be able to customize the order channels appear for Learners and Coaches
Admins need to be able to customize the order in which the channels are displayed for Learners and Coaches

Background:
Given I am signed in as an Admin or other user with content management permissions
And I am on the *Device > Rearrange Channels* page
And I am at the *Device > Channels* page

Scenario: User can move a channel
When I move a channel using my mouse or keyboard to a new position
Then I see a success notification
When I click the *Options drop-down*
And I select the *Edit channel order* option
Then I see the *Edit channel order* modal
When I drag a channel using my mouse or keyboard to a new position
Then I see a *Channel order saved* snackbar notification
When I close the modal
Then I am back at the *Device > Channels* page
And I can see that the order of the channels is changes as intended

Scenario: The new channel order is reflected in all parts of the app
When I move a channel
Then I see the new order on the *Rearrange Channels* Page
And ... the *Manage Device Channels* Page
And ... the *Your Channels* Page when exporting to a USB drive
And ... the *Learn > Channels* Page
And ... the *Coach > Create New Quiz* Page
And ... the *Coach > Manage Lesson Resources* Page
Given I've already reordered the channels
When I navigate to any of the following locations: *Device > Channels > Export channels*, *Device > Channels > Delete channels*, *Coach > Create new quiz*, *Coach > Manage lesson resources*, *Learn > Home > Explore channels* and *Learn > Library*
Then I see that the channels are ordered as intended
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Feature: Admin creates classes
And I am on *Facility > Classes* page

Scenario: Create class
When I click on *New class* button
Then I see *Create new class* modal
When I enter class name <class>
And I click *Save* button
When I click on the *New class* button
Then I see the *Create new class* modal
When I enter a class name
And I click the *Save* button
Then the modal closes
And I see the new <class> class on the *Classes* page
And I see the new class in the *Classes* table
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ Feature: Admin can delete classes
Background:
Given I am signed in to Kolibri as a facility admin user
And I am on *Facility > Classes* page
And there is a class <class> created in the facility
And there is a class created in the facility

Scenario: Delete class
When I click on *Delete class* button for the class <class>
Then I see *Delete class* modal
When I click *Delete* button
When I click on the *Delete class* button for a class
Then I see the *Delete class* modal
When I click the *Delete* button
Then the modal closes
# no confirmation that the class has been deleted
And I don't see the deleted class on the *Classes* page anymore
And I see a *Class deleted* snackbar message
And I see that the deleted class is no longer displayed in the *Classes* table
Original file line number Diff line number Diff line change
Expand Up @@ -8,45 +8,46 @@ Feature: Admin enrolls learners and assign coaches to classes
And there are learner and coach users created in the facility

Scenario: Enroll learners to a class
When I click on class <class>
Then I see the class <class> page
When I click on class
Then I see the class page
When I click the *Enroll learners* button
Then I see the *Enroll learners into '<class>'* page
And I see the list of all learners not enrolled in <class>
And I see the *Confirm* button is not active
When I click on the checkbox(es) of the learner(s) I want to enroll
Then I see the *Confirm* button is active
And I see a list with all the learners who are not enrolled in the class yet
When I select a learner or several learners
Then I see that the *Confirm* button is enabled
When I click the *Confirm* button
Then I see the class <class> page again
And I see the selected learner user accounts listed under *Learners*
Then I am back at the class page
And I see a *Learner(s) enrolled* snackbar message
And I see the selected learners listed under *Learners*

Scenario: Remove learner from a class
Given the learner <learner> is enrolled in the class <class>
And I am on class <class> page
When I click the *Remove* button for <learner>
Then I see the *Remove user* modal asking for confirmation
When I click *Remove* button
Scenario: Remove a learner from a class
Given a learner is enrolled in the class
And I am at the class page
When I click the *Remove* button to the right of the learner's username
Then I see the *Remove user* modal
When I click the *Remove* button
Then the modal closes
And I don't see <learner> user account listed under *Learners*
And I see a *Learner removed* snackbar message
And see that the learner is removed from the *Learners* table

Scenario: Assign coaches to a class
When I click on class <class>
Then I see the class <class> page
Given I am at the class page
When I click the *Assign coaches* button
Then I see the *Assign a coach to '<class>'* page
And I see the list of all coaches not assigned to <class>
And I see the *Confirm* button is not active
When I click on the checkbox(es) of the coach(es) I want to assign
Then I see the *Confirm* button is active
And I see the list of all coaches who are not assigned to the class yet
When I select a coach or several coaches
Then I see that the *Confirm* button is enabled
When I click the *Confirm* button
Then I see the class <class> page again
And I see the selected coach user accounts listed under *Coaches*
Then I am back at the class page
And I see a *Coach(es) assigned* snackbar message
And I see the selected coaches listed under *Coaches*

Scenario: Remove coach from a class
Given the coach <coach> is assigned to the class <class>
And I am on class <class> page
When I click the *Remove* button for <coach>
Then I see the *Remove user* modal asking for confirmation
When I click *Remove* button
Scenario: Remove a coach from a class
Given a coach is assigned to the class
And I am at the class page
When I click the *Remove* button to the right of the coach's username
Then I see the *Remove user* modal
When I click the *Remove* button
Then the modal closes
And I don't see <coach> user account listed under *Coaches*
And I see a *Coach removed* snackbar message
And see that the learner is removed from the *Learners* table
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ Feature: Admin bulk export of users and classrooms
And there are learners enrolled in classrooms and coaches assigned to them

Scenario: Export a CSV file containing all users in the facility
When I click on *Export* button under *Import and export users* heading
When I click on *Generate user CSV file* link under the *Import and export users* heading
Then I see the loading indicator
And I am able to open or save or the file 'users_<date>_<time>.csv'
# <date> is current date and <time> current time, for example users_20200420_194415.csv
And I see that the *Download CSV* button becomes enabled
When I click on the *Download CSV* button
And I can open or save the file '<facility>_users.csv'
When I open the CSV file
Then I see that it contains only users from my facility, even if there are more facilities in the device
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Admin bulk export of users and classrooms

Background:
Given I am signed in to Kolibri as a facility admin user
And I am on *Facility > Data* page
And I am at *Facility > Data* page

Scenario: See the CSV file format requirements
When I click the *Import* button under *Import and export users* heading
Expand All @@ -15,20 +15,22 @@ Feature: Admin bulk export of users and classrooms
When I click the *Import* button under *Import and export users* heading
Then I see a new window with a text explaining the consequences of importing
And I see the *Cancel* enabled button
And I see the *Next* disabled button
When I click the *Browse* button
And I see the *Continue* disabled button
When I click the *Choose file* button
And select a CSV file with the right format
Then I see the *Next* button is now enabled
When I click the *Next* button
Then I see the *Continue* button is now enabled
When I click the *Continue* button
Then I see the loading indicator
When the file is processed
Then I see the *Import users* window
And I see the loading indicator
When the file is processed
Then I see a list of the users and classes that are going to be updated and created
And I see a list of the number of users and classes that are going to be updated or created
And I see the list of errors, if any
And I see the *Back* and *Import* buttons
When I click the *Import* button
Then I see the *Success* message
Then I see the loading indicator
When the file is processed
Then I see the *The import succeeded* message
And I see a report with the changes made in the database
When I click the top left X button to close the modal
And I click on the *Classes* top menu
Then I see that classes, enrolled learners and assigned coaches now match what was in the CSV
And I go to *Facility > Classes*
Then I see that the classes, enrolled learners and assigned coaches now match what was in the CSV
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: Admin export usage data
Feature: Admin exports usage data
Admin needs to be able to export session and summary logs for the facility

Background:
Expand All @@ -13,7 +13,7 @@ Feature: Admin export usage data
And I click *Generate*
Then I see a *Download* button displayed to the left of the *Generate log* button
When I click on the *Download* button
Then I see the *Open/Save as* window, or the file 'content_session_logs.csv' is automatically saved on my local drive, depending on the browser defaults
Then I see the *Open/Save as* window, or the file *<facility>_content_session_logs_from_<YY-MM-DD>_to_<YY-MM-DD>.csv* is automatically saved on my local drive, depending on the browser defaults

Scenario: Export summary logs
When I click on the *Generate log* button under *Summary logs* heading
Expand All @@ -22,4 +22,4 @@ Feature: Admin export usage data
And I click *Generate*
Then I see a *Download* button displayed to the left of the *Generate log* button
When I click on the *Download* button
Then I see the *Open/Save as* window, or the file 'content_session_logs.csv' is automatically saved on my local drive, depending on the browser defaults
Then I see the *Open/Save as* window, or the file *<facility>_content_summary_logs_from_<YY-MM-DD>_to_<YY-MM-DD>.csv* is automatically saved on my local drive, depending on the browser defaults
Original file line number Diff line number Diff line change
Expand Up @@ -4,45 +4,50 @@ Feature: Admin registers facility
Background:
Given I am logged in as a Facility admin
And I have access to a Project token on Kolibri Data Portal
And I want to register my facility to Kolibri Data Portal
And I am in the Data tab in the Facility plugin
And I am at *Facility > Data*

Scenario: Register to a Kolibri Data Portal project for the first time
Given my facility has never been registered
And the *Sync* button is disabled
When I click *Register*
Then the register facility modal should appear
When I click *Sync*
Then I see the *Select a source* modal
And I see that *Kolibri Data Portal (online)* is the selected option
When I click the *Continue* button
Then I see the *Register facility* modal
When I enter the project token from Kolibri Data Portal
When I click *Continue*
And I click *Continue*
Then I see a confirmation modal with the project name
When I click *Register*
Then the modal closes
And I see the green checkmark next to the Facility name
And I see the a spinner icon and *Syncing* under the facility name
When the syncing has finished successfully
Then I see a green checkmark icon next to the facility name

Scenario: Register to a second Kolibri Data Portal project
Given my facility has been registered before
And I have access to a different Kolibri Data Portal project token
When I click *Register*
Then the register facility modal should appear
When I click the *Options* button next to the *Sync* button
And I click the *Register* option
Then I see the *Register facility* modal
When I enter the project token from Kolibri Data Portal
When I click *Continue*
And I click *Continue*
Then I see a confirmation modal with the project name
When I click *Register*
Then the modal closes
And I still see the green checkmark next to the Facility name
And I see a green checkmark icon next to the facility name

Scenario: Registration to a Kolibri Data Portal project failed
Given I have an invalid project token from Kolibri Data Portal
When I click *Register*
Then the register facility modal should appear
When I enter the project token from Kolibri Data Portal
When I click *Continue*
Then I see an invalid token error message
When I click the *Options* button next to the *Sync* button
And I click the *Register* option
Then I see the *Register facility* modal
When I enter the invalid project token from Kolibri Data Portal
And I click *Continue*
Then I see an *Invalid token* error message

Scenario: Register to a Kolibri Data Portal project, but already registered
Given my facility has been registered before
When I click *Register*
Then the register facility modal should appear
When I enter the same project token that was used to successfully register the facility before
When I click *Continue*
And I click *Continue*
Then I see a modal that says I am already registered to the project
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ Feature: Admin syncs facility
Admin needs to be able to sync their facility data to Kolibri Data Portal or another Kolibri server on their local network or internet

Background:
Given I am logged in as a Facility admin
Given I am signed in as a Facility admin
And my facility has been registered before
And I want to sync my facility data to Kolibri Data Portal
And I am in the Data tab in the Facility plugin
And I am at *Facility > Data*
And there are other devices with Kolibri on the network

Scenario: Learn what sync does
When I click on *Usage and privacy* in the description of the *Sync facility data* section
Then I see a modal with a description of what sync does
Then I see the *Kolibri data portal* modal with a description of what syncing does
When I click the *Close* button
Then the modal closes
And I am at *Facility > Data*

Scenario: Successful sync to KDP
When I click the *Sync* button
Expand Down