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
Integration test gherkin story for automatic device provisioning #9587
Merged
radinamatic
merged 1 commit into
learningequality:release-v0.15.x
from
pcenov:automatic-device-provisioning-scenarios
Aug 3, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
...n_testing/features/super-admin/commands/super-admin-automatic-device-provisioning.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
Feature: Super admin can provision a device in the same way the setup wizard would | ||
Super admin needs to be able to customize the Kolibri settings by modifying the options.ini file and pointing to a JSON file in Paths -> AUTOMATIC_PROVISION_FILE | ||
|
||
Background: | ||
Given that the Kolibri server is not running | ||
And I have opened the "options.ini" file which is located inside the ".kolibri" folder | ||
And there are the following sections: [Cache], [Database], [Server], [Paths], [Urls], [Deployment], [Python], [Tasks], [Learn] | ||
And I have created a JSON file with the following format: { | ||
"facility_name": "My Facility", | ||
"preset": "formal", | ||
"facility_settings": { | ||
"learner_can_edit_username": true, | ||
"learner_can_edit_name": true, | ||
"learner_can_edit_password": true, | ||
"learner_can_sign_up": true, | ||
"learner_can_delete_account": true, | ||
"learner_can_login_with_no_password": false, | ||
"show_download_button_in_learn": true | ||
}, | ||
"device_settings": { | ||
"language_id": "en", | ||
"landing_page": "learn", | ||
"allow_guest_access": true, | ||
"allow_peer_unlisted_channel_import": true, | ||
"allow_learner_unassigned_resource_access": true, | ||
"name": "My Device", | ||
"allow_other_browsers_to_connect": true | ||
}, | ||
"superuser": { | ||
"username": "superuser", | ||
"password": "password" | ||
} | ||
} | ||
|
||
Scenario: Setup a device by modifying the AUTOMATIC_PROVISION_FILE setting in the options.ini file | ||
When I add "AUTOMATIC_PROVISION_FILE = <file path>" under the [Paths] section | ||
And I save my changes | ||
And I run the "kolibri start" command in the terminal or command prompt | ||
Then I see in the terminal that a facility with name 'My Facility' has been created | ||
And I see that all the other presets and settings are updated as specified in the JSON file | ||
And I see that the automatic provisioning file is removed from the directory after successful provisioning | ||
And I see that the Kolibri server is running | ||
When I open Kolibri in a web browser | ||
Then I am at the *Library* page as was specified in the JSON file | ||
When I go to the *Sign in* page | ||
And I enter the credentials specified in the JSON file | ||
Then I am at the *Device > Channels* page | ||
And I see the *Welcome to Kolibri!* message | ||
When I close the message | ||
And I go to *Device > Settings* | ||
Then I see the *Default language* is set to *English* | ||
And I see the *Allow other computers on this network to import my unlisted channels* option is checked | ||
And I see the *Default landing page* is set to *Learn page* | ||
When I go to *Facility > Settings* | ||
Then I see that the facility name is set to *My facility* | ||
And I see that all of the available checkboxes are checked | ||
|
||
|
||
Examples: | ||
| file path | | ||
| /home/user/.kolibri/automatic_device_provisioning.json | |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it display the output even without running the
kolibri start
command with the flag--foreground
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It probably won't, but the output would be in the logs, at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspected as much, thank you!