diff --git a/packages/apollo/test/cypress/e2e/features/02-BuildNetwork.feature b/packages/apollo/test/cypress/e2e/features/02-BuildNetwork.feature index 7c89ab44..efbf7343 100644 --- a/packages/apollo/test/cypress/e2e/features/02-BuildNetwork.feature +++ b/packages/apollo/test/cypress/e2e/features/02-BuildNetwork.feature @@ -74,7 +74,7 @@ Feature: Build a network feature And I clicked the button with title 'Select an MSP' And I clicked the div with text 'Org1 MSP' And I clicked the button with title 'Select a Fabric version' - And I clicked the div with text '2.5' + And I clicked the div with text '2.2' And I clicked the button with id 'next' And I clicked the button with title 'Please select an identity from your wallet' And I clicked the div with text 'Org1 MSP Admin' @@ -159,7 +159,7 @@ Feature: Build a network feature And I clicked the button with title 'Select an MSP' And I clicked the dropdown item 'Ordering Service MSP' with class '.cds--list-box__menu-item__option' And I clicked the button with title 'Select a Fabric version' - And I clicked the dropdown item '2.5' with class '.cds--list-box__menu-item__option' + And I clicked the dropdown item '2.2' with class '.cds--list-box__menu-item__option' And I clicked the button with id 'next' Then wait "2" seconds And I clicked the button with title 'Please select an identity from your wallet' diff --git a/packages/apollo/test/cypress/e2e/features/03-JoinANetwork.feature b/packages/apollo/test/cypress/e2e/features/03-JoinANetwork.feature index e8e3c3c3..161a4de6 100644 --- a/packages/apollo/test/cypress/e2e/features/03-JoinANetwork.feature +++ b/packages/apollo/test/cypress/e2e/features/03-JoinANetwork.feature @@ -99,18 +99,21 @@ Feature: Join a network feature And I clicked the button with title 'Create MSP definition' And I provided 'Org2 MSP' for the 'Enter name for the MSP' input And I provided 'org2msp' for the 'Enter the MSP ID' input - And I clicked the span with text 'Next' - And I clicked the button with title 'Select a root Certificate Authority' + # And I clicked the span with text 'Next' + And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the button with title 'Select a root Certificate Authority' And I clicked the div with text 'Org2 CA' And wait "3" seconds - And I clicked the span with text 'Next' + #And I clicked the span with text 'Next' + And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'org2admin' And I clicked the div with text 'org2admin' And I provided 'org2adminpw' for the 'Enter a secret' input And I provided 'Org2 MSP Admin' for the 'Enter name for the identity to be stored in your Wallet' input And I clicked the button with text 'Generate' And I clicked the button with text 'Export' - And I clicked the span with text 'Next' + #And I clicked the span with text 'Next' + And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I click Create MSP definition button Then I should see a success toast with class '.cds--toast-notification__title' which says "MSP Org2 MSP has been created successfully." diff --git a/packages/apollo/test/cypress/e2e/features/04-CreateAndJoin2x_Org1AndOrg2.feature b/packages/apollo/test/cypress/e2e/features/04-CreateAndJoin2x_Org1AndOrg2.feature index c02556eb..db58255f 100644 --- a/packages/apollo/test/cypress/e2e/features/04-CreateAndJoin2x_Org1AndOrg2.feature +++ b/packages/apollo/test/cypress/e2e/features/04-CreateAndJoin2x_Org1AndOrg2.feature @@ -84,12 +84,14 @@ Feature: Create and Join a 2.x channel And I am on the 'channels' page And I clicked the button with title 'Create channel' And I clicked the checkbox with text 'Advanced channel configuration' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I provided 'channel2' for the 'Enter a name for your channel' input And I clicked the button with title 'Select from available ordering services' - And I clicked the div with id 'downshift-0-item-0' + And I clicked the div with text 'Ordering Service' Then wait "3" seconds - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select MSP' And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with text 'Add' @@ -98,28 +100,38 @@ Feature: Create and Join a 2.x channel And I clicked the div with text 'Org2 MSP (org2msp)' And I clicked the button with text 'Add' And I clicked the 'admin' role for 'org2msp' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select policy' And I clicked the div with text '1 out of 2' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select the MSP' And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with title 'Select an identity' And I clicked the div with text 'Org1 MSP Admin' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the div with id 'selectedApplicationCapability' And I clicked the div with text '2.0.0' And I clicked the div with id 'selectedOrdererCapability' - And I clicked element with class '#selectedOrdererCapability > div > div:nth-child(2)' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + And I clicked element with class '#selectedOrdererCapability > ul > li:nth-child(2) > div' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select the MSP' And I clicked the div with text 'Ordering Service MSP (osmsp)' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' Then I clicked Create channel button Then wait "10" seconds Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully initiated a request to create channel2. This request requires the signature of an ordering service MSP. After the request has been signed and submitted, you will see a pending channel tile. Clicking on this tile will allow you to join a peer to the channel." @@ -146,8 +158,10 @@ Feature: Create and Join a 2.x channel 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 span with text 'Peer Org1' - And I clicked the span with text 'Peer Org2' + # And I clicked the span with text 'Peer Org1' + And I click label with property 'for' and value 'joinChannelModal-peer-peerorg1' + # And I clicked the span with text 'Peer Org2' + And I click label with property 'for' and value 'joinChannelModal-peer-peerorg2' When I clicked the button with id 'submit' Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully joined channel2." Then the element div with text 'channel2' should be visible on page diff --git a/packages/apollo/test/cypress/e2e/features/05-Install20SmartContract.feature b/packages/apollo/test/cypress/e2e/features/05-Install20SmartContract.feature index 07f95221..453f3ce3 100644 --- a/packages/apollo/test/cypress/e2e/features/05-Install20SmartContract.feature +++ b/packages/apollo/test/cypress/e2e/features/05-Install20SmartContract.feature @@ -144,23 +144,35 @@ Feature: 2.0 Lifecycle Flow And I clicked the button with title 'Select an identity' And I clicked the div with text 'Org2 MSP Admin' Then wait "1" seconds - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I provided '13' for input field with id 'channelModal-block-params-absolute_max_bytes_mb-input-for-slider' And I provided '510' for input field with id 'channelModal-block-params-max_message_count-input-for-slider' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the button with title 'Select the MSP' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the button with title 'Select the MSP' And I clicked the div with text 'Ordering Service MSP (osmsp)' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Update channel' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the span with text 'Update channel' Then I should see a success toast with class '.cds--toast-notification__title' which says 'You have successfully initiated a request to update channel channel2.' # View channel configuration updates When I clicked the button with id 'ibp-header-signature-collection-icon' diff --git a/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature b/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature index 424e1ea6..71c961b0 100644 --- a/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature +++ b/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature @@ -83,22 +83,29 @@ Feature: Create and Join a 1.x channel Scenario: When creating a channel And I clicked the button with title 'Create channel' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I provided 'channel1' for the 'Enter a name for your channel' input And I clicked the button with title 'Select from available ordering services' - And I clicked the div with id 'downshift-0-item-0' - And I clicked the span with text 'Next' + # And I clicked the div with text 'Ordering Service' + And I clicked element with class '#selectedOrderer > ul > li:nth-child(1)' + # And I clicked the span with text 'Next' + Then wait "1" seconds + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select MSP' And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with text 'Add' And I clicked the 'admin' role for 'org1msp' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select the MSP' And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with title 'Select an identity' And I clicked the div with text 'Org1 MSP Admin' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' Then I clicked Create channel button Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully initiated a request to create channel1. Join a peer to this channel by clicking the pending channel tile below." And the channel with name 'channel1' should have been created @@ -106,6 +113,7 @@ Feature: Create and Join a 1.x channel Scenario: When joining a channel And I clicked the div with text 'channel1' Then wait "5" seconds - And I clicked the span with text 'Peer Org1' + # And I clicked the span with text 'Peer Org1' + And I click label with property 'for' and value 'joinChannelModal-peer-peerorg1' When I clicked the button with id 'submit' Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully joined channel1." diff --git a/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature b/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature index 02674b35..681a41fa 100644 --- a/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature +++ b/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature @@ -32,6 +32,7 @@ Feature: Update channel to add Org2 And the CA admin is set as 'Ordering Service CA Admin' Then the 'admin' user with id 'OSadmin' should be enrolled And the 'orderer' user with id 'OS1' should be enrolled + Then wait "5" seconds And I enroll TLS identity for OS1 with secret 'OS1pw' and name 'TLSOS1' And I am on the 'nodes' page And I clicked the 'Org2 CA' certificate authority @@ -88,19 +89,27 @@ Feature: Update channel to add Org2 And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with title 'Select an identity' And I clicked the div with text 'Org1 MSP Admin' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select MSP' And I clicked the div with text 'Org2 MSP (org2msp)' And I clicked the button with id 'btn-add-org' And I clicked the 'admin' role for 'org2msp' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select policy' And I clicked the div with text '1 out of 2' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the span with text 'Update channel' Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully initiated a request to update channel channel1." diff --git a/packages/apollo/test/cypress/e2e/features/08-InstallInstantiate1xSmartContract.feature b/packages/apollo/test/cypress/e2e/features/08-InstallInstantiate1xSmartContract.feature index fea04575..0e8b5786 100644 --- a/packages/apollo/test/cypress/e2e/features/08-InstallInstantiate1xSmartContract.feature +++ b/packages/apollo/test/cypress/e2e/features/08-InstallInstantiate1xSmartContract.feature @@ -5,7 +5,6 @@ Feature: 1.x Smart Contract flow Given I go to the console And I am logged in And I am ready to get started - And I am on the 'smart_contracts' page # Cypress launches new test runner / browser with clean state and that clears wallet that we store in browser local storage # https://github.com/cypress-io/cypress/issues/28186#issuecomment-1787344347 @@ -82,6 +81,7 @@ Feature: 1.x Smart Contract flow Then wait "2" seconds Scenario: Install 1.x Smart Contract on Org1 and Org2 peers + Given I am on the 'smart_contracts' page And I clicked the button with title 'Install smart contract' And I upload file 'fixtures/test_data/chaincodes/fabcar_go_2.1.1.cds' to 'file-uploader-cds' input And I clicked the button with text 'Next' @@ -92,6 +92,7 @@ Feature: 1.x Smart Contract flow Then I should see button with id 'overflow-installed-fabcar_2.1.1' Scenario: Instantiate 1.x Smart Contract on channel1 + Given I am on the 'smart_contracts' page And I clicked the button with id 'overflow-installed-fabcar_2.1.1' And I clicked the button with id 'instantiate_modal' And I clicked the button with title 'Select channel' diff --git a/packages/apollo/test/cypress/e2e/features/09-BuildANetwork_Without_SysChannel.feature b/packages/apollo/test/cypress/e2e/features/09-BuildANetwork_Without_SysChannel.feature index 87453773..0cb276e7 100644 --- a/packages/apollo/test/cypress/e2e/features/09-BuildANetwork_Without_SysChannel.feature +++ b/packages/apollo/test/cypress/e2e/features/09-BuildANetwork_Without_SysChannel.feature @@ -80,26 +80,29 @@ Feature: Build a network without system channel And I clicked the button with id 'associate_identity' Then wait "2" seconds -# Scenario: Upgrading Peer and Ordering Service node to latest -# And I clicked the 'Peer Org1' peer -# And I clicked the button with id 'ibp-peer-usage' -# And I clicked the button with id 'patch_node' -# And I clicked the checkbox with text 'I understand this is a potentially breaking change. Upgrade anyway.' -# And I clicked the button with id 'next' -# And I provided 'Peer Org1' for the 'Type node name here' input -# And I clicked the button with text 'Upgrade Fabric version' -# Then wait "20" seconds -# And I am on the 'nodes' page -# And I clicked the 'Ordering Service' orderer -# Then wait "10" seconds -# And I clicked the button with id 'ibp-orderer-nodes' -# And I clicked the div with id 'ibp-tile-Ordering Service_1' -# And I clicked the button with text 'Upgrade version' -# And I clicked the button with id 'next' -# And I provided 'Ordering Service_1' for the 'Type node name here' input -# And I clicked the button with text 'Upgrade Fabric version' -# Then wait "10" seconds -# And I am on the 'nodes' page + Scenario: Upgrading Peer and Ordering Service node to latest + And I clicked the 'Peer Org1' peer + # And I clicked the button with id 'ibp-peer-usage' + And I clicked element with class 'div.ibp-details-patch-container' + # And I clicked the button with id 'patch_node' + And I clicked the checkbox with text 'I understand this is a potentially breaking change. Upgrade anyway.' + And I clicked the button with id 'next' + And I provided 'Peer Org1' for the 'Type node name here' input + And I clicked the button with text 'Upgrade Fabric version' + Then wait "20" seconds + Then Text should exist 'You are up to date with the latest version of Hyperledger Fabric' + And I am on the 'nodes' page + And I clicked the 'Ordering Service' orderer + Then wait "10" seconds + And I clicked element whose id ends with ':-tab-1' + And I clicked the div with id 'ibp-tile-Ordering Service_1' + And I clicked the button with text 'Upgrade version' + And I clicked the button with id 'next' + And I provided 'Ordering Service_1' for the 'Type node name here' input + And I clicked the button with text 'Upgrade Fabric version' + Then wait "20" seconds + Then Text should exist 'You are up to date with the latest version of Hyperledger Fabric' + And I am on the 'nodes' page Scenario: When creating an ordering service without system channel And I clicked the button with title 'Add ordering service' @@ -134,12 +137,15 @@ Feature: Build a network without system channel And I am on the 'channels' page And I clicked the button with title 'Create channel' And I clicked the checkbox with text 'Advanced channel configuration' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I provided 'channel5' for the 'Enter a name for your channel' input And I clicked the button with title 'Select from available ordering services' - And I clicked the div with id 'downshift-0-item-0' + # And I clicked the div with id 'downshift-0-item-0' + And I clicked the div with text 'No_SysCh_OS' Then wait "5" seconds - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I clicked the button with title 'Select MSP' And I clicked the div with text 'Org1 MSP (org1msp)' And I clicked the button with text 'Add' @@ -148,26 +154,36 @@ Feature: Build a network without system channel And I clicked the div with text 'Org2 MSP (org2msp)' And I clicked the button with text 'Add' And I clicked the 'admin' role for 'org2msp' - And I clicked the span with text 'Next' - And I clicked the button with title 'Select policy' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the button with title 'Select policy' And I clicked the div with text '1 out of 2' - And I clicked the span with text 'Next' - And I clicked the div with id 'selectedOrg' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the div with id 'selectedOrg' And I clicked the div with text 'Ordering Service MSP (osmsp)' And I clicked the button with text 'Add' And I clicked the 'admin' role for 'osmsp' - And I clicked the span with text 'Next' - And I clicked the div with id 'selectedApplicationCapability' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the div with id 'selectedApplicationCapability' And I clicked the div with text '2.0.0' And I clicked the div with id 'selectedOrdererCapability' - And I clicked element with class '#selectedOrdererCapability > div > div:nth-child(2)' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - Then I clicked Create channel button + # And I clicked element with class '#selectedOrdererCapability > div > div:nth-child(2)' + And I clicked element with class '#selectedOrdererCapability > ul > li:nth-child(2) > div' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + Then I clicked Create channel button Then wait "3" seconds Then I should see Create Genesis screen with message to to join orderer And I clicked the button with text 'Continue' @@ -189,9 +205,11 @@ Feature: Build a network without system channel And I clicked the button with id 'next' And I provided 'channel5' for the 'Enter the channel name' input And I clicked the button with id 'next' - And I clicked the span with text 'Peer Org1' - And I clicked the span with text 'Peer Org2' - When I clicked the button with id 'submit' + # And I clicked the span with text 'Peer Org1' + And I click label with property 'for' and value 'joinChannelModal-peer-peerorg1' + # And I clicked the span with text 'Peer Org2' + And I click label with property 'for' and value 'joinChannelModal-peer-peerorg2' + When I clicked the button with id 'submit' Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully joined channel5." Scenario: Install and Propose 2.0 Smart Contract as Org1 @@ -252,20 +270,29 @@ Feature: Build a network without system channel And I clicked the button with title 'Select an identity' And I clicked the div with text 'Org2 MSP Admin' Then wait "1" seconds - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' And I provided '13' for input field with id 'channelModal-block-params-absolute_max_bytes_mb-input-for-slider' And I provided '510' for input field with id 'channelModal-block-params-max_message_count-input-for-slider' - And I clicked the span with text 'Next' - And I clicked the button with title 'Select the MSP' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the button with title 'Select the MSP' And I clicked the div with text 'Ordering Service MSP (osmsp)' - And I clicked the span with text 'Next' - And I clicked the span with text 'Next' - And I clicked the span with text 'Update channel' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + # And I clicked the span with text 'Next' + And I clicked element with class '#ibp--template-full-page-side-panel > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span' + And I clicked the span with text 'Update channel' Then I should see a success toast with class '.cds--toast-notification__title' which says 'You have successfully initiated a request to update channel channel5.' # View channel configuration updates When I clicked the button with id 'ibp-header-signature-collection-icon' @@ -288,3 +315,44 @@ Feature: Build a network without system channel And I clicked the div with text 'Org2 MSP Admin' And I clicked the button with id 'submit' Then the element div with text 'No approval notifications' should be visible on page + + Scenario: Update MSP Definition + When I am on the 'nodes' page + And I clicked the 'Ordering Service' orderer + Then wait "10" seconds + And I clicked element with class '.ibp-orderer-admin-update.ibp-orderer-admin-single' + And I clicked the button with title 'Select MSP' + Then wait "1" seconds + # And I clicked the div with text 'Ordering Service MSP' + # And I clicked the div with id 'downshift-0-item-0' + And I clicked element with class '#orderingservicemsp > div' + Then wait "1" seconds + And I clicked the button with title 'Select an identity' + # And I clicked the div with text 'Ordering Service MSP Admin' + # And I clicked the div with id 'downshift-1-item-1' + And I clicked element with class '#submit_identity > ul> li:nth-child(2) > div' + And I clicked the button with id 'submit' + Then wait "10" seconds + Then I should see a success toast with class '.cds--toast-notification__title' which says "The MSP definition for osmsp has been updated successfully." + When I am on the 'channels' page + And I clicked the div with id 'ibp-tile-channel2' + Then wait "5" seconds + And I clicked the button with text 'Channel details' + And I clicked the div with id 'ibp-tile-org1msp' + And I clicked the button with title 'Select MSP' + And I clicked the div with text 'Org1 MSP' + Then wait "1" seconds + And I clicked the button with title 'Select an identity' + # And I clicked the div with text 'Org1 MSP Admin' + And I clicked element with class '#submit_identity > ul> li:nth-child(2) > div' + And I clicked the button with id 'submit' + Then wait "10" seconds + Then I should see a success toast with class '.cds--toast-notification__title' which says "The MSP definition for org1msp has been updated successfully." + Then wait "5" seconds + And I clicked the div with id 'ibp-tile-osmsp' + And I clicked the button with title 'Select MSP' + And I clicked the div with text 'Ordering Service MSP' + Then wait "1" seconds + And I clicked the button with id 'submit' + Then wait "10" seconds + Then I should see a success toast with class '.cds--toast-notification__title' which says "The proposal for updating MSP definition for osmsp has been submitted successfully." diff --git a/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature b/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature index cb4b3162..7d2cd3bd 100644 --- a/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature +++ b/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature @@ -2,7 +2,7 @@ Feature: Verify allowed functions for Writer user Background: Login to console - Given I go to the console + When I go to the console And I am logged in as 'writeruser@ibm.com' user And I am ready to get started @@ -24,6 +24,7 @@ Feature: Verify allowed functions for Writer user And I provided 'admin' for the 'Enter an ID' input And I provided 'adminpw' for the 'Enter a secret' input And I provided 'Ordering Service CA Admin' for the 'Enter a name' input + Then wait "5" seconds And I clicked the button with id 'associate_identity' And the CA admin is set as 'Ordering Service CA Admin' Then the 'admin' user with id 'OSadmin' should be enrolled @@ -100,6 +101,7 @@ Feature: Verify allowed functions for Writer user And I am on the 'nodes' page Scenario: Writer is not allowed to modify Access + Then wait "5" seconds And I am on the 'access' page Then Message should be displayed 'Contact a user with the "Manager" role' @@ -109,6 +111,7 @@ Feature: Verify allowed functions for Writer user Then Button should be enabled for id 'data_import_button' Scenario: For Writers registering new user should be enabled + Then wait "5" seconds And I am on the 'nodes' page And I clicked the 'Org1 CA' certificate authority Then Button should be enabled for title 'Register user' @@ -136,7 +139,8 @@ Feature: Verify allowed functions for Writer user 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 button with id 'ibp-orderer-nodes' + And I clicked element whose id ends with ':-tab-1' 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 @@ -145,7 +149,8 @@ Feature: Verify allowed functions for Writer user 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 id 'ibp-orderer-nodes' + And I clicked element whose id ends with ':-tab-1' 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' diff --git a/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature b/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature index 947c30cf..1782e576 100644 --- a/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature +++ b/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature @@ -8,8 +8,10 @@ Feature: Verify miscellaneous cases of console works as expected And I am on the 'nodes' page Scenario: Run mustgather tool - And I am on Help page - Then wait "5" seconds + Then wait "2" seconds + # When I am on Help page + When I clicked element with class '#title_bar > header > div > span' + Then wait "5" seconds And I clicked the button with text 'Start mustgather' Then wait "60" seconds And I clicked the div with text 'Download results' @@ -48,44 +50,6 @@ Feature: Verify miscellaneous cases of console works as expected And I clicked the button with text 'Remove ordering service' Then wait "5" seconds - Scenario: Update MSP Definition - When I am on the 'nodes' page - And I clicked the 'Ordering Service' orderer - Then wait "10" seconds - And I clicked element with class '.ibp-orderer-admin-update.ibp-orderer-admin-single' - And I clicked the button with title 'Select MSP' - Then wait "1" seconds - # And I clicked the div with text 'Ordering Service MSP' - And I clicked the div with id 'downshift-0-item-0' - Then wait "1" seconds - And I clicked the button with title 'Select an identity' - # And I clicked the div with text 'Ordering Service MSP Admin' - And I clicked the div with id 'downshift-1-item-1' - And I clicked the button with id 'submit' - Then wait "10" seconds - Then I should see a success toast with class '.cds--toast-notification__title' which says "The MSP definition for osmsp has been updated successfully." - When I am on the 'channels' page - And I clicked the div with id 'ibp-tile-channel2' - Then wait "5" seconds - And I clicked the button with text 'Channel details' - And I clicked the div with id 'ibp-tile-org1msp' - And I clicked the button with title 'Select MSP' - And I clicked the div with text 'Org1 MSP' - Then wait "1" seconds - And I clicked the button with title 'Select an identity' - And I clicked the div with text 'Org1 MSP Admin' - And I clicked the button with id 'submit' - Then wait "10" seconds - Then I should see a success toast with class '.cds--toast-notification__title' which says "The MSP definition for org1msp has been updated successfully." - Then wait "5" seconds - And I clicked the div with id 'ibp-tile-osmsp' - And I clicked the button with title 'Select MSP' - And I clicked the div with text 'Ordering Service MSP' - Then wait "1" seconds - And I clicked the button with id 'submit' - Then wait "10" seconds - Then I should see a success toast with class '.cds--toast-notification__title' which says "The proposal for updating MSP definition for osmsp has been submitted successfully." - Scenario: Deleting Peer Org1 When I clicked the div with id 'ibp-tile-Peer Org1' And I clicked the button with id 'peerorg1-sticky-delete-button' diff --git a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature index 8dac75a0..b6dc4239 100644 --- a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature +++ b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature @@ -1,4 +1,4 @@ -@support @regression @runonconsole @apicases +@support @runonconsole @apicases @regression Feature: Verify Console APIs works as expected Background: Login to console @@ -51,12 +51,12 @@ Feature: Verify Console APIs works as expected When I clicked the div with id 'test__navigation--item--audit_logs' Then I should see table with id 'table-audit_logs' Then I should see div with id 'audit-logs' - And I provided 'creating api key' for input field with id "1" + And I provided 'creating api key' for input field with class ".cds--search-input" Then I should see audit log row with text 'creating api key' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/permissions/keys' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page - And I provided 'deleting api key' for input field with id "1" + And I provided 'deleting api key' for input field with class ".cds--search-input" Then I should see audit log row with text 'deleting api key' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'DELETE:/api/v3/permissions/{apikey}' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' diff --git a/packages/apollo/test/cypress/e2e/features/16-ConsoleAPIv3.feature b/packages/apollo/test/cypress/e2e/features/16-ConsoleAPIv3.feature index 6e54cac0..9ca0cf8a 100644 --- a/packages/apollo/test/cypress/e2e/features/16-ConsoleAPIv3.feature +++ b/packages/apollo/test/cypress/e2e/features/16-ConsoleAPIv3.feature @@ -1,4 +1,5 @@ -@support @regression @runonconsole @apicases +@support @runonconsole @apicases +# Due to open bugs Console API cases are failing. Hence, moving it out from regression test suit. Feature: Verify Console APIs are working as expected Background: Login to console diff --git a/packages/apollo/test/cypress/package-lock.json b/packages/apollo/test/cypress/package-lock.json index acc6a03f..fe2bca19 100644 --- a/packages/apollo/test/cypress/package-lock.json +++ b/packages/apollo/test/cypress/package-lock.json @@ -326,7 +326,7 @@ "@badeball/cypress-cucumber-preprocessor": "^18.0.5", "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", - "cypress": "^13.3.0", + "cypress": "^13.11.0", "cypress-file-upload": "^5.0.8", "cypress-watch-and-reload": "^1.10.9", "esbuild": "^0.19.2", diff --git a/packages/apollo/test/cypress/package.json b/packages/apollo/test/cypress/package.json index 6b2f4cc7..f161e4d9 100644 --- a/packages/apollo/test/cypress/package.json +++ b/packages/apollo/test/cypress/package.json @@ -11,7 +11,8 @@ "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", - "regression": "cypress run -e TAGS=\"@regression\" --headed --browser chrome --spec 'e2e/features/*.feature'", + "regressionchrome": "cypress run -e TAGS=\"@regression\" --headed --browser chrome --spec 'e2e/features/*.feature'", + "regressionfirefox": "cypress run -e TAGS=\"@regression\" --headed --browser firefox --spec 'e2e/features/*.feature'", "regression-headless": "cypress run -e TAGS=\"@regression\" --browser chrome --spec 'e2e/features/*.feature'", "runonexistingconsole": "cypress run -e TAGS=\"@runonconsole\" --headed --browser chrome --spec 'e2e/features/*.feature'", "buildnetwork": "cypress run --headed --browser chrome --spec 'e2e/features/2-BuildNetwork.feature'" @@ -22,7 +23,7 @@ "@badeball/cypress-cucumber-preprocessor": "^18.0.5", "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", - "cypress": "^13.3.0", + "cypress": "^13.11.0", "cypress-file-upload": "^5.0.8", "cypress-watch-and-reload": "^1.10.9", "esbuild": "^0.19.2", diff --git a/packages/apollo/test/cypress/support/step_definitions/identity_steps.js b/packages/apollo/test/cypress/support/step_definitions/identity_steps.js index 74d86e7a..5c976357 100644 --- a/packages/apollo/test/cypress/support/step_definitions/identity_steps.js +++ b/packages/apollo/test/cypress/support/step_definitions/identity_steps.js @@ -19,7 +19,7 @@ import { Given, Then, When } from "@badeball/cypress-cucumber-preprocessor"; Given(/^the CA admin is set as (?:'|")(.*?)(?:'|")$/, identityName => { // Sometimes it takes time to associate identity after clicking button cy.wait(60000) - cy.get('.ibp-identity-information',{ timeout: 120000 }).contains(identityName) + cy.get('.ibp-identity-information',{ timeout: 180000 }).contains(identityName) }); When(/^the (?:'|")(.*?)(?:'|") user was enrolled with id (?:'|")(.*?)(?:'|") and secret (?:'|")(.*?)(?:'|")$/, (type, enrollId, enrollSecret) => { @@ -63,13 +63,13 @@ When(/^I click Create MSP definition button$/, () => { }); When(/^I enroll TLS identity for OS1 with secret (?:'|")(.*?)(?:'|") and name (?:'|")(.*?)(?:'|")$/, (enrollSecret, enrollName) => { - cy.get('.cds--overflow-menu.cds--overflow-menu--md').first().should('be.visible').click() + cy.get('.cds--overflow-menu.cds--overflow-menu--md',{ timeout: 180000 }).first().should('be.visible').click() cy.wait(500) cy.clickButton('id','generate_cert--menu--item') cy.wait(1000) cy.clickButton('title','Root Certificate Authority') cy.wait(1000) - cy.get('.cds--list-box__menu-item__option').contains('TLS Certificate Authority').click() + cy.get('.cds--list-box__menu-item__option',{ timeout: 180000 }).contains('TLS Certificate Authority').click() cy.enterInput(enrollSecret, 'Enter a secret'); cy.clickButton('id', 'next') cy.wait(60000) diff --git a/packages/apollo/test/cypress/support/step_definitions/login_steps.js b/packages/apollo/test/cypress/support/step_definitions/login_steps.js index 4d0a5890..866b8c7c 100644 --- a/packages/apollo/test/cypress/support/step_definitions/login_steps.js +++ b/packages/apollo/test/cypress/support/step_definitions/login_steps.js @@ -156,7 +156,7 @@ Given(/^I am logged out from console$/, () => { cy.get('button[id="ibp-header-user-profile-icon"]').click() cy.get('button[id="logout"]').click() cy.get('a').contains('click here').click() - cy.wait(1000) + cy.wait(5000) cy.get('p').should(($div) => { expect($div.get(0).innerText).to.eq('Login to Fabric Operations Console') }) diff --git a/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js b/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js index 2b877c40..c034635f 100644 --- a/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js +++ b/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js @@ -20,7 +20,11 @@ Cypress.on('uncaught:exception', (err, runnable) => { return false }) -Given("I go to the console", () => { +Cypress.on('uncaught exception', (err, runnable) => { + return false +}) + + Given("I go to the console", () => { cy.fixture("config.json").then((data) => { cy.visit(data.loginUrl) }) @@ -80,7 +84,7 @@ Given(/^I clicked the checkbox with (text) (?:'|")(.*?)(?:'|")$/, (property, val }); Then(/^I am on Help page$/, () => { - cy.get('#title_bar > header > div > button:nth-child(1)').click() + cy.get('#title_bar > header > div > span').click() cy.wait(1000) }); @@ -99,6 +103,11 @@ Given(/^I clicked element with class (?:'|")(.*?)(?:'|")$/, (className) => { cy.get(className).first().should('be.visible').click() }); +Given(/^I clicked element whose id ends with (?:'|")(.*?)(?:'|")$/, (value) => { +cy.wait(500) +cy.get(`[id$="${value}"]`).first().should('be.visible').click() +}); + Then(/^the table row with id (?:'|")(.*?)(?:'|") does not exist on page$/, value => { cy.wait(1000) cy.get(`tr[id="${value}"]`).should('not.exist');