-
Notifications
You must be signed in to change notification settings - Fork 716
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8300 from pcenov/new-sync-and-import-scenarios
Additional Gherkin scenarios for syncing and importing of facility after Wi-Fi network change
- Loading branch information
Showing
2 changed files
with
144 additions
and
107 deletions.
There are no files selected for viewing
114 changes: 68 additions & 46 deletions
114
...ng/features/super-admin/device/super-admin-import-facility-from-a-peer-post-setup.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 |
---|---|---|
@@ -1,55 +1,77 @@ | ||
Feature: Import facility from a peer (post-setup) | ||
Super admin is able to import another facility to their device at any time after device setup | ||
Super admin is able to import another facility to their device at any time after device setup | ||
|
||
Background: | ||
Given I am signed in as a super admin | ||
And I am in *Device > Facilities* | ||
Background: | ||
Given I am signed in as a super admin | ||
And I am in *Device > Facilities* | ||
|
||
Scenario: Select peer device | ||
When I click the *Import facility* button | ||
Then I see the *Select network address* modal | ||
And I see a list of peer devices | ||
And I see the network address of each device | ||
When I select a <peer> device | ||
And I click *Continue* | ||
Then I see the *Select facility* modal | ||
And I see one or more facilities on that device | ||
Scenario: Select peer device | ||
When I click the *Import facility* button | ||
Then I see the *Select network address* modal | ||
And I see a list of peer devices | ||
And I see the network address of each device | ||
When I select a <peer> device | ||
And I click *Continue* | ||
Then I see the *Select facility* modal | ||
And I see one or more facilities on that device | ||
|
||
Scenario: Import facility from a peer with a single facility | ||
Given there is only the <facility> facility on the <peer> device | ||
And I am on the *Enter admin credentials* modal | ||
When I enter the <username> and <password> of a facility admin for the <facility> or a super admin for the <peer> | ||
And I click *Continue* | ||
Then I see the <facility> appear in my *Facilities* list | ||
And I see an indeterminate spinner | ||
And I see the status message *Syncing* | ||
And I see the *task manager* has a new task | ||
When the <facility> is done syncing | ||
Then I see a message under the new facility name *Last synced: just now* | ||
Scenario: Import facility from a peer with a single facility | ||
Given there is only the <facility> facility on the <peer> device | ||
And I am on the *Enter admin credentials* modal | ||
When I enter the <username> and <password> of a facility admin for the <facility> or a super admin for the <peer> | ||
And I click *Continue* | ||
Then I see the <facility> appear in my *Facilities* list | ||
And I see an indeterminate spinner | ||
And I see the status message *Syncing* | ||
And I see the *task manager* has a new task | ||
When the <facility> is done syncing | ||
Then I see a message under the new facility name *Last synced: just now* | ||
|
||
Scenario: Import facility from a peer with multiple facilities | ||
Given there is more than one facility on the <peer> device | ||
And I am on *Select facility* modal | ||
And I see two or more facilities on that device | ||
When I select the facility I want to import | ||
And I click *Continue* | ||
Then I am on the *Enter admin credentials* modal | ||
When I enter the <username> and <password> of a facility admin for the <facility> or a super admin for the <peer> | ||
And I click *Continue* | ||
Then I see the *Tasks* page | ||
And I see the status message *Syncing '<facility>'* | ||
And I see an indeterminate spinner | ||
When the <facility> import is finished | ||
And I click *Back to facilities* | ||
Then I see the <facility> appear in my *Facilities* list | ||
And I see a message under the new <facility> *Last synced: just now* | ||
Scenario: Import facility from a peer with multiple facilities | ||
Given there is more than one facility on the <peer> device | ||
And I am on *Select facility* modal | ||
And I see two or more facilities on that device | ||
When I select the facility I want to import | ||
And I click *Continue* | ||
Then I am on the *Enter admin credentials* modal | ||
When I enter the <username> and <password> of a facility admin for the <facility> or a super admin for the <peer> | ||
And I click *Continue* | ||
Then I see the *Tasks* page | ||
And I see the status message *Syncing '<facility>'* | ||
And I see an indeterminate spinner | ||
When the <facility> import is finished | ||
And I click *Back to facilities* | ||
Then I see the <facility> appear in my *Facilities* list | ||
And I see a message under the new <facility> *Last synced: just now* | ||
|
||
Scenario: Import facility from a peer failed | ||
Given a sync task is running | ||
When the sync fails for a <facility> | ||
Then I see *Failed sync: just now* under the <facility> name | ||
And I see *Last successful sync: <X> <time> ago under the failed sync message | ||
Scenario: Import facility from a peer failed | ||
Given a sync task is running | ||
When the sync fails for a <facility> | ||
Then I see *Failed sync: just now* under the <facility> name | ||
And I see *Last successful sync: <X> <time> ago under the failed sync message | ||
|
||
Scenario: Ensure you can import a facility after Wi-Fi network change | ||
Given there are at least two Kolibri instances running in the same network | ||
When I connect both devices to a different Wi-Fi network #check in the logs that you see a log entry for zerocnf network registration for example: Registering ourselves to zeroconf network with id 'f770b209237d550fb8cc34ee00d93719' and port '8080' | ||
And as a Super Admin I go to Device>Facilities | ||
And I click the *Import facility* button | ||
Then I see the *Select network address* modal | ||
And I see the peer device name and network address | ||
When I select the peer device | ||
And I click *Continue* | ||
Then I see the *Select facility* modal | ||
When I select a facility | ||
And I click *Continue* | ||
Then I see the *Enter admin credentials* modal | ||
When I enter a *Username* and a *Password* | ||
And I click *Continue* | ||
Then I see the *Tasks* page | ||
And I can see that the import has finished | ||
When I click the *Back to facilities* link | ||
Then I see the list with facilities | ||
And I can see the newly imported facility | ||
And I can see a message stating when it was last synced | ||
|
||
Examples: | ||
| facility | peer | | ||
| facility | peer | | ||
| MySchool | MyPeer | |
137 changes: 76 additions & 61 deletions
137
..._testing/features/super-admin/device/super-admin-sync-facility-with-a-peer-device.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