-
Notifications
You must be signed in to change notification settings - Fork 66
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 #671 from ketulsha/main
removed duplicate step definition and alignment
- Loading branch information
Showing
3 changed files
with
254 additions
and
307 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ Feature: Verify allowed functions for Writer user | |
|
||
Background: Login to console | ||
Given I go to the console | ||
And I am logged in as '[email protected]' user | ||
And I am logged in as '[email protected]' user | ||
And I am ready to get started | ||
|
||
Scenario: Setting up the identities | ||
|
@@ -77,164 +77,136 @@ Feature: Verify allowed functions for Writer user | |
And I clicked the button with id 'associate_identity' | ||
Then wait "2" seconds | ||
|
||
Scenario: Writer should be able to import components, writer is not allowed to create new components | ||
And I am ready to get started | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add peer' | ||
#Then Checkbox should not exist with 'Create a peer' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing peer' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add Certificate Authority' | ||
#Then Checkbox should not exist with 'Create a Certificate Authority' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing Certificate Authority' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add ordering service' | ||
#Then Checkbox should not exist with 'Create an ordering service' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing ordering service' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
|
||
Scenario: Writer is not allowed to modify Access | ||
And I am on the 'access' page | ||
Then Message should be displayed 'Contact a user with the "Manager" role' | ||
|
||
Scenario: On the Settings page Writer is allowed import and export data | ||
And I am on the 'settings' page | ||
Then Button should be enabled for id 'data_export_button' | ||
Then Button should be enabled for id 'data_import_button' | ||
|
||
# Scenario: Enrolling and associating Org1 CA Admin | ||
# And I am on the 'nodes' page | ||
# And I clicked the 'Org1 CA' certificate authority | ||
# And I clicked the button with text 'Associated identity for root CA' | ||
# And I clicked the button with text 'Enroll ID' | ||
# And I provided 'admin' for the 'Enter an ID' input | ||
# And I provided 'adminpw' for the 'Enter a secret' input | ||
# And I provided 'Org1 CA Admin' for the 'Enter a name' input | ||
# And I clicked the button with id 'associate_identity' | ||
# And the CA admin is set as 'Org1 CA Admin' | ||
# Then wait "3" seconds | ||
|
||
Scenario: For Writers registering new user should be enabled | ||
And I am on the 'nodes' page | ||
And I clicked the 'Org1 CA' certificate authority | ||
Then Button should be enabled for title 'Register user' | ||
Then Button should be enabled for id 'btn-ca_users-reenroll' | ||
Scenario: Writer should be able to import components, writer is not allowed to create new components | ||
And I am ready to get started | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add peer' | ||
#Then Checkbox should not exist with 'Create a peer' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing peer' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add Certificate Authority' | ||
#Then Checkbox should not exist with 'Create a Certificate Authority' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing Certificate Authority' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
And I clicked the button with title 'Add ordering service' | ||
#Then Checkbox should not exist with 'Create an ordering service' | ||
Then Checkbox should be hidden with id 'deploy-id' | ||
Then Checkbox should be visible with 'Import an existing ordering service' | ||
And I clicked the button with text 'Cancel' | ||
And I am on the 'nodes' page | ||
|
||
# Scenario: Deleting Org1 CA Admin from wallet | ||
# And I am on the 'wallet' page | ||
# And I clicked the div with text 'Org1 CA Admin' | ||
# And I clicked the button with text 'Remove identity' | ||
# And I provided 'Org1 CA Admin' for the 'Type here' input | ||
# And I clicked the button with text 'Remove identity' | ||
Scenario: Writer is not allowed to modify Access | ||
And I am on the 'access' page | ||
Then Message should be displayed 'Contact a user with the "Manager" role' | ||
|
||
# Writer is allowed to import Ordering Services and Ordering Nodes | ||
Scenario: Renaming 'Ordering Service' to 'Ordering Service Org' | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'orderingservicenode1-sticky-settings-button' | ||
And I provided 'Ordering Service Org' for input field with id 'ordererModal-display_name' | ||
And I clicked the button with id 'update_peer' | ||
Scenario: On the Settings page Writer is allowed import and export data | ||
And I am on the 'settings' page | ||
Then Button should be enabled for id 'data_export_button' | ||
Then Button should be enabled for id 'data_import_button' | ||
|
||
Scenario: Importing Ordering Service | ||
And I navigate to the 'nodes' page | ||
And I clicked the button with title 'Add ordering service' | ||
And I clicked the div with text 'Import an existing ordering service' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
Scenario: For Writers registering new user should be enabled | ||
And I am on the 'nodes' page | ||
And I clicked the 'Org1 CA' certificate authority | ||
Then Button should be enabled for title 'Register user' | ||
Then Button should be enabled for id 'btn-ca_users-reenroll' | ||
|
||
# Writer is allowed to import Ordering Services and Ordering Nodes | ||
Scenario: Renaming 'Ordering Service' to 'Ordering Service Org' | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'orderingservicenode1-sticky-settings-button' | ||
And I provided 'Ordering Service Org' for input field with id 'ordererModal-display_name' | ||
And I clicked the button with id 'update_peer' | ||
|
||
Scenario: Importing Ordering Service | ||
And I navigate to the 'nodes' page | ||
And I clicked the button with title 'Add ordering service' | ||
And I clicked the div with text 'Import an existing ordering service' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
And I upload file 'fixtures/test_data/Import/Ordering_Service_orderer_to_import.json' | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
Then wait "15" seconds | ||
|
||
Scenario: Deleting imported Ordering Service_1 | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'ibp-orderer-nodes' | ||
And I clicked the node 'Ordering Service_1' | ||
And I clicked the button with id 'orderingservice_1-sticky-delete-button' | ||
And I provided 'Ordering Service_1' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
Scenario: Importing Ordering Service_1 | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'ibp-orderer-nodes' | ||
And I clicked the button with title 'Add another node' | ||
And I clicked the div with text 'Import an existing ordering node' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
Then wait "15" seconds | ||
|
||
Scenario: Deleting imported Ordering Service_1 | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'ibp-orderer-nodes' | ||
And I clicked the node 'Ordering Service_1' | ||
And I clicked the button with id 'orderingservice_1-sticky-delete-button' | ||
And I provided 'Ordering Service_1' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
Scenario: Importing Ordering Service_1 | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service' | ||
And I clicked the button with id 'ibp-orderer-nodes' | ||
And I clicked the button with title 'Add another node' | ||
And I clicked the div with text 'Import an existing ordering node' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
And I upload file 'fixtures/test_data/Import/Ordering_Service_1_orderer_to_import.json' | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
|
||
Scenario: Deleting imported Ordering Service | ||
And I navigate to the 'nodes' page | ||
And I clicked the 'Ordering Service' orderer | ||
And I clicked the button with id 'orderingservice_1-sticky-delete-button' | ||
And I provided 'Ordering Service' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
Scenario: Renaming 'Ordering Service Org' to 'Ordering Service' | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service Org' | ||
And I clicked the button with id 'orderingservicenode1-sticky-settings-button' | ||
And I provided 'Ordering Service' for input field with id 'ordererModal-display_name' | ||
And I clicked the button with id 'update_peer' | ||
And I navigate to the 'nodes' page | ||
|
||
Scenario: Writer should be able to export, import and delete imported Peers or CAs | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>-sticky-download-button' | ||
|
||
# Scenario: Renaming Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>-sticky-settings-button' | ||
And I provided '<componentName> Org' for input field with id '<componentId>Modal-display_name' | ||
And I clicked the button with id 'update_<componentId>' | ||
|
||
# Scenario: Importing Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the button with title 'Add <componentTitle>' | ||
And I clicked the div with text 'Import an existing <componentTitle>' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
And I upload file 'cypress/downloads/<componentName>_<componentId>.json' | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
|
||
# Scenario: Deleting imported Peer/CA | ||
When I am logged in | ||
And I am ready to get started | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>_0-sticky-delete-button' | ||
And I provided '<componentName>' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
# Scenario: Renaming Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName> Org' | ||
And I clicked the button with id '<buttonPrefix>-sticky-settings-button' | ||
And I provided '<componentName>' for input field with id '<componentId>Modal-display_name' | ||
And I clicked the button with id 'update_<componentId>' | ||
And I navigate to the 'nodes' page | ||
|
||
# Components created by Ansible | ||
# Examples: | ||
# | componentTitle | componentId | componentName | buttonPrefix | | ||
# | Certificate Authority | ca | Ordering Org CA | orderingorgca | | ||
# | Certificate Authority | ca | Org1 CA | org1ca | | ||
# | Certificate Authority | ca | Org2 CA | org2ca | | ||
# | peer | peer | Org1 Peer | org1peer | | ||
# | peer | peer | Org2 Peer | org2peer | | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
|
||
Scenario: Deleting imported Ordering Service | ||
And I navigate to the 'nodes' page | ||
And I clicked the 'Ordering Service' orderer | ||
And I clicked the button with id 'orderingservice_1-sticky-delete-button' | ||
And I provided 'Ordering Service' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
Scenario: Renaming 'Ordering Service Org' to 'Ordering Service' | ||
And I navigate to the 'nodes' page | ||
And I clicked the node 'Ordering Service Org' | ||
And I clicked the button with id 'orderingservicenode1-sticky-settings-button' | ||
And I provided 'Ordering Service' for input field with id 'ordererModal-display_name' | ||
And I clicked the button with id 'update_peer' | ||
And I navigate to the 'nodes' page | ||
|
||
Scenario: Writer should be able to export, import and delete imported Peers or CAs | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>-sticky-download-button' | ||
|
||
# Scenario: Renaming Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>-sticky-settings-button' | ||
And I provided '<componentName> Org' for input field with id '<componentId>Modal-display_name' | ||
And I clicked the button with id 'update_<componentId>' | ||
|
||
# Scenario: Importing Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the button with title 'Add <componentTitle>' | ||
And I clicked the div with text 'Import an existing <componentTitle>' | ||
And I clicked the button with id 'next' | ||
And I clicked the div with text 'Add file' | ||
And I upload file 'cypress/downloads/<componentName>_<componentId>.json' | ||
Then wait "5" seconds | ||
And I clicked the button with id 'submit' | ||
|
||
# Scenario: Deleting imported Peer/CA | ||
When I am logged in | ||
And I am ready to get started | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName>' | ||
And I clicked the button with id '<buttonPrefix>_0-sticky-delete-button' | ||
And I provided '<componentName>' for the 'Type here' input | ||
And I clicked the button with id 'confirm_remove' | ||
|
||
# Scenario: Renaming Peer/CA | ||
And I navigate to the 'nodes' page | ||
And I clicked the node '<componentName> Org' | ||
And I clicked the button with id '<buttonPrefix>-sticky-settings-button' | ||
And I provided '<componentName>' for input field with id '<componentId>Modal-display_name' | ||
And I clicked the button with id 'update_<componentId>' | ||
And I navigate to the 'nodes' page | ||
|
||
# Components created by Cypress | ||
Examples: | ||
|
@@ -245,12 +217,12 @@ Feature: Verify allowed functions for Writer user | |
# | peer | peer | Peer Org1 | peerorg1 | | ||
# | peer | peer | Peer Org2 | peerorg2 | | ||
|
||
Scenario: For Writers updating chaincodes should be enabled | ||
And I am on the 'channels' page | ||
And I clicked the div with id 'ibp-tile-channel2' | ||
Then wait "5" seconds | ||
And I clicked the div with text 'fabcar' | ||
Then Text should exist 'Update package details' | ||
Then Button should be enabled for id 'update-approval-org1msp' | ||
Then wait "10" seconds | ||
Scenario: For Writers updating chaincodes should be enabled | ||
And I am on the 'channels' page | ||
And I clicked the div with id 'ibp-tile-channel2' | ||
Then wait "5" seconds | ||
And I clicked the div with text 'fabcar' | ||
Then Text should exist 'Update package details' | ||
Then Button should be enabled for id 'update-approval-org1msp' | ||
Then wait "10" seconds | ||
Then I clicked the button with id 'cancel' |
Oops, something went wrong.