From 8817c607bf85a94f7bc6478021db204ff5af6dd2 Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Wed, 12 Jun 2024 14:15:40 +0530 Subject: [PATCH 1/7] enable execution on multiple browser, console fixes Signed-off-by: Ketul Shah --- .../e2e/features/02-BuildNetwork.feature | 4 +- .../07-UpdateAndJoinChannel_Org2.feature | 1 + ...9-BuildANetwork_Without_SysChannel.feature | 78 ++++++++++++++----- .../e2e/features/11-TestWriter.feature | 1 + .../e2e/features/13-Misc Cases.feature | 40 +--------- .../cypress/e2e/features/14-AuditLog.feature | 78 +++++++++---------- .../apollo/test/cypress/fixtures/config.json | 8 +- .../apollo/test/cypress/package-lock.json | 2 +- packages/apollo/test/cypress/package.json | 5 +- .../step_definitions/identity_steps.js | 10 +-- .../step_definitions/navigation_steps.js | 6 +- 11 files changed, 120 insertions(+), 113 deletions(-) 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/07-UpdateAndJoinChannel_Org2.feature b/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature index 02674b35..801c884f 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 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..ca642e8f 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,26 @@ 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 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: When creating an ordering service without system channel And I clicked the button with title 'Add ordering service' @@ -288,3 +288,41 @@ 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' + 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." diff --git a/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature b/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature index cb4b3162..3f180add 100644 --- a/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature +++ b/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature @@ -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 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..7c9aecdc 100644 --- a/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature +++ b/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature @@ -8,7 +8,7 @@ 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 + When I am on Help page Then wait "5" seconds And I clicked the button with text 'Start mustgather' Then wait "60" seconds @@ -48,44 +48,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/14-AuditLog.feature b/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature index 44daa919..35ef5346 100644 --- a/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature +++ b/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature @@ -10,12 +10,12 @@ Feature: Verify Audit Log functionality 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' #Login entry - And I provided 'user logging in - local' for input field with class ".cds--search-input" + And I provided 'user logging in - local' for input field with class ".bx--search-input" Then I should see audit log row with text 'user logging in - local' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/auth/login' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #Change password entry - When I provided 'user is changing their password' for input field with class ".cds--search-input" + When I provided 'user is changing their password' for input field with class ".bx--search-input" Then I should see audit log row with text 'user is changing their password' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'PUT:/api/v3/permissions/users/password' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -25,10 +25,10 @@ Feature: Verify Audit Log functionality works as expected Then I should see table with id 'table-audit_logs' Then I reload the page #Adding Org1 CA and Org2 CA - When I provided 'adding new fabric-ca "org2ca"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-ca "org2ca"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-ca "org2ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' - When I provided 'adding new fabric-ca "org1ca"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-ca "org1ca"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-ca "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -38,7 +38,7 @@ Feature: Verify Audit Log functionality works as expected Then I reload the page # adding new fabric-peer "peerorg1" Then I reload the page - When I provided 'adding new fabric-peer "peerorg1"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-peer "peerorg1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-peer "peerorg1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -47,30 +47,30 @@ Feature: Verify Audit Log functionality works as expected Then I should see table with id 'table-audit_logs' Then I reload the page # adding identity to user's wallet - When I provided "adding identity to user's wallet" for input field with class ".cds--search-input" + When I provided "adding identity to user's wallet" for input field with class ".bx--search-input" Then I should see audit log row with text "adding identity to user's wallet" and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # registering identity "org1admin" on CA "org1ca" - When I provided 'registering identity "org1admin" on CA "org1ca"' for input field with class ".cds--search-input" + When I provided 'registering identity "org1admin" on CA "org1ca"' for input field with class ".bx--search-input" Then I should see audit log row with text 'registering identity "org1admin" on CA "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # registering identity "peer1" on CA "org1ca" -- POST:/api/v1/identities - When I provided 'registering identity "peer1" on CA "org1ca"' for input field with class ".cds--search-input" + When I provided 'registering identity "peer1" on CA "org1ca"' for input field with class ".bx--search-input" Then I should see audit log row with text 'registering identity "peer1" on CA "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v1/identities' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # exporting component "Org1 MSP Admin" -- Then I reload the page - When I provided 'exporting component "Org1 MSP Admin"' for input field with class ".cds--search-input" + When I provided 'exporting component "Org1 MSP Admin"' for input field with class ".bx--search-input" Then I should see audit log row with text 'exporting component "Org1 MSP Admin"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new msp "org1msp" -- POST:/api/v3/components - When I provided 'adding new msp "org1msp"' for input field with class ".cds--search-input" + When I provided 'adding new msp "org1msp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new msp "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-orderer "orderingservicenode1" - When I provided 'adding new fabric-orderer "orderingservicenode1"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-orderer "orderingservicenode1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-orderer "orderingservicenode1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I am logged out from console @@ -79,31 +79,31 @@ Feature: Verify Audit Log functionality 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' # peers"Peer Org1", "Peer Org2" havejoined the channel "channel2" - When I provided 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' for input field with class ".cds--search-input" + When I provided 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' for input field with class ".bx--search-input" Then I should see audit log row with text 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # updating channel "testchainid" - MSP "osmsp" - When I provided 'updating channel "testchainid" - MSP "osmsp"' for input field with class ".cds--search-input" + When I provided 'updating channel "testchainid" - MSP "osmsp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'updating channel "testchainid" - MSP "osmsp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # creating channel "channel2" - MSP "org1msp" - When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".cds--search-input" + When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'creating channel "channel1" - MSP "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # creating channel "channel1" - MSP "org1msp" - When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".cds--search-input" + When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'creating channel "channel1" - MSP "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # creating a config block doc - channel "channel5" - POST:/api/v3/configblocks - When I provided 'creating a config block doc - channel "channel5"' for input field with class ".cds--search-input" + When I provided 'creating a config block doc - channel "channel5"' for input field with class ".bx--search-input" Then I should see audit log row with text 'creating a config block doc - channel "channel5"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/configblocks' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # archiving a config block doc - channel "channel5" -- PUT:/api/v3/configblocks/8df504bac7bf7f9616627e91470a0253 - When I provided 'archiving a config block doc - channel "channel5"' for input field with class ".cds--search-input" + When I provided 'archiving a config block doc - channel "channel5"' for input field with class ".bx--search-input" Then I should see audit log row with text 'archiving a config block doc - channel "channel5"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -111,37 +111,37 @@ Feature: Verify Audit Log functionality 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' # creating a signature collection for channel "channel2" -- POST:/api/v3/signature_collections - When I provided 'creating a signature collection for channel "channel2" ' for input field with class ".cds--search-input" + When I provided 'creating a signature collection for channel "channel2" ' for input field with class ".bx--search-input" Then I should see audit log row with text 'creating a signature collection for channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/signature_collections' 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 # editing a signature collection for channel "channel2" -- PUT:/api/v3/signature_collections/sc_7bc9843a-02d7-4f04-94ac-763241c1a949 - When I provided 'editing a signature collection for channel "channel2"' for input field with class ".cds--search-input" + When I provided 'editing a signature collection for channel "channel2"' for input field with class ".bx--search-input" Then I should see audit log row with text 'editing a signature collection for channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'PUT:/api/v3/signature_collections' 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 # updating channel "channel2" - MSP "org2msp" - When I provided 'updating channel "channel2" - MSP "org2msp"' for input field with class ".cds--search-input" + When I provided 'updating channel "channel2" - MSP "org2msp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'updating channel "channel2" - MSP "org2msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # installing chaincode "fabcar" @ "2.1.1" on peer - When I provided 'installing chaincode "fabcar" @ "2.1.1" on peer' for input field with class ".cds--search-input" + When I provided 'installing chaincode "fabcar" @ "2.1.1" on peer' for input field with class ".bx--search-input" Then I should see audit log row with text 'installing chaincode "fabcar" @ "2.1.1" on peer' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1" - When I provided 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' for input field with class ".cds--search-input" + When I provided 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # editing component "peerorg1" - "version", "replicas", "ignore_warnings" - When I provided 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' for input field with class ".cds--search-input" + When I provided 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' for input field with class ".bx--search-input" Then I should see audit log row with text 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # editing component "orderingservicenode1" - "version", "replicas" Then I reload the page - When I provided 'editing component "orderingservicenode1" - "version", "replicas"' for input field with class ".cds--search-input" + When I provided 'editing component "orderingservicenode1" - "version", "replicas"' for input field with class ".bx--search-input" Then I should see audit log row with text 'editing component "orderingservicenode1" - "version", "replicas"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -149,11 +149,11 @@ Feature: Verify Audit Log functionality 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' # bulk export of 10 components - When I provided 'bulk export of 10 components' for input field with class ".cds--search-input" + When I provided 'bulk export of 10 components' for input field with class ".bx--search-input" Then I should see audit log row with text 'bulk export of 10 components' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # importing 4 items from zip - When I provided 'importing 4 items from zip' for input field with class ".cds--search-input" + When I provided 'importing 4 items from zip' for input field with class ".bx--search-input" Then I should see audit log row with text 'importing 4 items from zip' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -161,22 +161,22 @@ Feature: Verify Audit Log functionality 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' # adding new msp "ca_importmsp" - POST:/api/v3/components - When I provided 'adding new msp "ca_importmsp"' for input field with class ".cds--search-input" + When I provided 'adding new msp "ca_importmsp"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new msp "ca_importmsp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-peer "peer_import" -- POST:/api/v3/components - When I provided 'adding new fabric-peer "peer_import"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-peer "peer_import"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-peer "peer_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-orderer "os_import_1"-- POST:/api/v3/components - When I provided 'adding new fabric-orderer "os_import_1"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-orderer "os_import_1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-orderer "os_import_1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-ca "ca_import" -- POST:/api/v3/components - When I provided 'adding new fabric-ca "ca_import"' for input field with class ".cds--search-input" + When I provided 'adding new fabric-ca "ca_import"' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new fabric-ca "ca_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -185,32 +185,32 @@ Feature: Verify Audit Log functionality 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' # deleting fabric-orderer "os_import_1" - DELETE:/api/v3/components/os_import_1 - When I provided 'removing fabric-orderer "os_import_1"' for input field with class ".cds--search-input" + When I provided 'removing fabric-orderer "os_import_1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'removing fabric-orderer "os_import_1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/os_import_1' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # deleting fabric-ca "ca_import" - DELETE:/api/v3/components/ca_import - When I provided 'removing fabric-ca "ca_import"' for input field with class ".cds--search-input" + When I provided 'removing fabric-ca "ca_import"' for input field with class ".bx--search-input" Then I should see audit log row with text 'removing fabric-ca "ca_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/ca_import' 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 # deleting fabric-peer "peer_import" =- DELETE:/api/v3/components/peer_import - When I provided 'removing fabric-peer "peer_import"' for input field with class ".cds--search-input" + When I provided 'removing fabric-peer "peer_import"' for input field with class ".bx--search-input" Then I should see audit log row with text 'removing fabric-peer "peer_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/peer_import' and id 'audit-logs-api_title-0' #delete org1ca - When I provided 'removing fabric-ca "org1ca"' for input field with class ".cds--search-input" + When I provided 'removing fabric-ca "org1ca"' for input field with class ".bx--search-input" Then I should see audit log row with text 'removing fabric-ca "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #delete peerOrg1 Then I reload the page - When I provided 'removing fabric-peer "peerorg1"' for input field with class ".cds--search-input" + When I provided 'removing fabric-peer "peerorg1"' for input field with class ".bx--search-input" Then I should see audit log row with text 'removing fabric-peer "peerorg1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #delete ordering service - When I provided 'deleting ordering service: "Ordering Service"' for input field with class ".cds--search-input" + When I provided 'deleting ordering service: "Ordering Service"' for input field with class ".bx--search-input" Then I should see audit log row with text 'deleting ordering service: "Ordering Service"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/kubernetes/components/tags' and id 'audit-logs-api_title-0' @@ -219,12 +219,12 @@ Feature: Verify Audit Log functionality 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' #adding new user - adding new user w********r@ibm.com - When I provided 'adding new user w********r@ibm.com' for input field with class ".cds--search-input" + When I provided 'adding new user w********r@ibm.com' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new user w********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'POST:/api/v3/permissions/users' and id 'audit-logs-api_title-0' #adding new user - adding new user adding new user r********r@ibm.com - When I provided 'adding new user r********r@ibm.com' for input field with class ".cds--search-input" + When I provided 'adding new user r********r@ibm.com' for input field with class ".bx--search-input" Then I should see audit log row with text 'adding new user r********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'POST:/api/v3/permissions/users' and id 'audit-logs-api_title-0' @@ -264,7 +264,7 @@ Feature: Verify Audit Log functionality 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' #delete user - deleting users w********r@ibm.com, r********r@ibm.com - When I provided 'deleting users w********r@ibm.com, r********r@ibm.com' for input field with class ".cds--search-input" + When I provided 'deleting users w********r@ibm.com, r********r@ibm.com' for input field with class ".bx--search-input" Then I should see audit log row with text 'deleting users w********r@ibm.com, r********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/permissions/users' and id 'audit-logs-api_title-0' diff --git a/packages/apollo/test/cypress/fixtures/config.json b/packages/apollo/test/cypress/fixtures/config.json index c9a59655..f9d01709 100644 --- a/packages/apollo/test/cypress/fixtures/config.json +++ b/packages/apollo/test/cypress/fixtures/config.json @@ -1,6 +1,6 @@ { - "loginUrl": "https://ibmsupport-ibm-hlfsupport-console-console.localho.st:443", - "loginUserName": "admin", - "loginDefaultPassword": "password", - "loginPassword": "Console@123" + "loginUrl": "https://Your-Consoles-URL-Here", + "loginUserName": "Username-Here", + "loginDefaultPassword": "Password-Here", + "loginPassword": "Password-Here" } diff --git a/packages/apollo/test/cypress/package-lock.json b/packages/apollo/test/cypress/package-lock.json index 242d51f8..a6c0023d 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.10.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 b88d89c6..187a07a1 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..86b55974 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) => { @@ -28,9 +28,9 @@ When(/^the (?:'|")(.*?)(?:'|") user was enrolled with id (?:'|")(.*?)(?:'|") and cy.clickButton('id', 'btn-ca_users-register_user') cy.enterInput(enrollId, 'Enter an ID') cy.enterInput(enrollSecret, 'Enter a secret') - cy.get('.cds--list-box__field').click() + cy.get('.bx--list-box__field').click() cy.wait(500) - cy.get('.cds--list-box__menu-item__option').contains(type).should('be.visible').click() + cy.get('.bx--list-box__menu-item__option').contains(type).should('be.visible').click() cy.clickButton('id', 'next') cy.wait(500) cy.clickButton('id', 'submit') @@ -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('.bx--overflow-menu.bx--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('.bx--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/navigation_steps.js b/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js index 2b877c40..6099cd97 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) }) From 01fc5f7db3e73487ff7301325b38af8c5e90d91f Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Thu, 13 Jun 2024 11:21:18 +0530 Subject: [PATCH 2/7] renamed class from bx to cds Signed-off-by: Ketul Shah --- .../cypress/e2e/features/14-AuditLog.feature | 78 +++++++++---------- .../step_definitions/identity_steps.js | 8 +- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature b/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature index 35ef5346..44daa919 100644 --- a/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature +++ b/packages/apollo/test/cypress/e2e/features/14-AuditLog.feature @@ -10,12 +10,12 @@ Feature: Verify Audit Log functionality 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' #Login entry - And I provided 'user logging in - local' for input field with class ".bx--search-input" + And I provided 'user logging in - local' for input field with class ".cds--search-input" Then I should see audit log row with text 'user logging in - local' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/auth/login' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #Change password entry - When I provided 'user is changing their password' for input field with class ".bx--search-input" + When I provided 'user is changing their password' for input field with class ".cds--search-input" Then I should see audit log row with text 'user is changing their password' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'PUT:/api/v3/permissions/users/password' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -25,10 +25,10 @@ Feature: Verify Audit Log functionality works as expected Then I should see table with id 'table-audit_logs' Then I reload the page #Adding Org1 CA and Org2 CA - When I provided 'adding new fabric-ca "org2ca"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-ca "org2ca"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-ca "org2ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' - When I provided 'adding new fabric-ca "org1ca"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-ca "org1ca"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-ca "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -38,7 +38,7 @@ Feature: Verify Audit Log functionality works as expected Then I reload the page # adding new fabric-peer "peerorg1" Then I reload the page - When I provided 'adding new fabric-peer "peerorg1"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-peer "peerorg1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-peer "peerorg1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -47,30 +47,30 @@ Feature: Verify Audit Log functionality works as expected Then I should see table with id 'table-audit_logs' Then I reload the page # adding identity to user's wallet - When I provided "adding identity to user's wallet" for input field with class ".bx--search-input" + When I provided "adding identity to user's wallet" for input field with class ".cds--search-input" Then I should see audit log row with text "adding identity to user's wallet" and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # registering identity "org1admin" on CA "org1ca" - When I provided 'registering identity "org1admin" on CA "org1ca"' for input field with class ".bx--search-input" + When I provided 'registering identity "org1admin" on CA "org1ca"' for input field with class ".cds--search-input" Then I should see audit log row with text 'registering identity "org1admin" on CA "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # registering identity "peer1" on CA "org1ca" -- POST:/api/v1/identities - When I provided 'registering identity "peer1" on CA "org1ca"' for input field with class ".bx--search-input" + When I provided 'registering identity "peer1" on CA "org1ca"' for input field with class ".cds--search-input" Then I should see audit log row with text 'registering identity "peer1" on CA "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v1/identities' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # exporting component "Org1 MSP Admin" -- Then I reload the page - When I provided 'exporting component "Org1 MSP Admin"' for input field with class ".bx--search-input" + When I provided 'exporting component "Org1 MSP Admin"' for input field with class ".cds--search-input" Then I should see audit log row with text 'exporting component "Org1 MSP Admin"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new msp "org1msp" -- POST:/api/v3/components - When I provided 'adding new msp "org1msp"' for input field with class ".bx--search-input" + When I provided 'adding new msp "org1msp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new msp "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-orderer "orderingservicenode1" - When I provided 'adding new fabric-orderer "orderingservicenode1"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-orderer "orderingservicenode1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-orderer "orderingservicenode1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I am logged out from console @@ -79,31 +79,31 @@ Feature: Verify Audit Log functionality 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' # peers"Peer Org1", "Peer Org2" havejoined the channel "channel2" - When I provided 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' for input field with class ".bx--search-input" + When I provided 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' for input field with class ".cds--search-input" Then I should see audit log row with text 'peers "Peer Org1", "Peer Org2" have joined the channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # updating channel "testchainid" - MSP "osmsp" - When I provided 'updating channel "testchainid" - MSP "osmsp"' for input field with class ".bx--search-input" + When I provided 'updating channel "testchainid" - MSP "osmsp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'updating channel "testchainid" - MSP "osmsp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # creating channel "channel2" - MSP "org1msp" - When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".bx--search-input" + When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'creating channel "channel1" - MSP "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # creating channel "channel1" - MSP "org1msp" - When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".bx--search-input" + When I provided 'creating channel "channel1" - MSP "org1msp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'creating channel "channel1" - MSP "org1msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # creating a config block doc - channel "channel5" - POST:/api/v3/configblocks - When I provided 'creating a config block doc - channel "channel5"' for input field with class ".bx--search-input" + When I provided 'creating a config block doc - channel "channel5"' for input field with class ".cds--search-input" Then I should see audit log row with text 'creating a config block doc - channel "channel5"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/configblocks' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # archiving a config block doc - channel "channel5" -- PUT:/api/v3/configblocks/8df504bac7bf7f9616627e91470a0253 - When I provided 'archiving a config block doc - channel "channel5"' for input field with class ".bx--search-input" + When I provided 'archiving a config block doc - channel "channel5"' for input field with class ".cds--search-input" Then I should see audit log row with text 'archiving a config block doc - channel "channel5"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -111,37 +111,37 @@ Feature: Verify Audit Log functionality 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' # creating a signature collection for channel "channel2" -- POST:/api/v3/signature_collections - When I provided 'creating a signature collection for channel "channel2" ' for input field with class ".bx--search-input" + When I provided 'creating a signature collection for channel "channel2" ' for input field with class ".cds--search-input" Then I should see audit log row with text 'creating a signature collection for channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/signature_collections' 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 # editing a signature collection for channel "channel2" -- PUT:/api/v3/signature_collections/sc_7bc9843a-02d7-4f04-94ac-763241c1a949 - When I provided 'editing a signature collection for channel "channel2"' for input field with class ".bx--search-input" + When I provided 'editing a signature collection for channel "channel2"' for input field with class ".cds--search-input" Then I should see audit log row with text 'editing a signature collection for channel "channel2"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'PUT:/api/v3/signature_collections' 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 # updating channel "channel2" - MSP "org2msp" - When I provided 'updating channel "channel2" - MSP "org2msp"' for input field with class ".bx--search-input" + When I provided 'updating channel "channel2" - MSP "org2msp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'updating channel "channel2" - MSP "org2msp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # installing chaincode "fabcar" @ "2.1.1" on peer - When I provided 'installing chaincode "fabcar" @ "2.1.1" on peer' for input field with class ".bx--search-input" + When I provided 'installing chaincode "fabcar" @ "2.1.1" on peer' for input field with class ".cds--search-input" Then I should see audit log row with text 'installing chaincode "fabcar" @ "2.1.1" on peer' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I reload the page # instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1" - When I provided 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' for input field with class ".bx--search-input" + When I provided 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'instantiating chaincode "fabcar" @ "2.1.1" on channel "channel1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # editing component "peerorg1" - "version", "replicas", "ignore_warnings" - When I provided 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' for input field with class ".bx--search-input" + When I provided 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' for input field with class ".cds--search-input" Then I should see audit log row with text 'editing component "peerorg1" - "version", "replicas", "ignore_warnings"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # editing component "orderingservicenode1" - "version", "replicas" Then I reload the page - When I provided 'editing component "orderingservicenode1" - "version", "replicas"' for input field with class ".bx--search-input" + When I provided 'editing component "orderingservicenode1" - "version", "replicas"' for input field with class ".cds--search-input" Then I should see audit log row with text 'editing component "orderingservicenode1" - "version", "replicas"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -149,11 +149,11 @@ Feature: Verify Audit Log functionality 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' # bulk export of 10 components - When I provided 'bulk export of 10 components' for input field with class ".bx--search-input" + When I provided 'bulk export of 10 components' for input field with class ".cds--search-input" Then I should see audit log row with text 'bulk export of 10 components' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # importing 4 items from zip - When I provided 'importing 4 items from zip' for input field with class ".bx--search-input" + When I provided 'importing 4 items from zip' for input field with class ".cds--search-input" Then I should see audit log row with text 'importing 4 items from zip' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -161,22 +161,22 @@ Feature: Verify Audit Log functionality 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' # adding new msp "ca_importmsp" - POST:/api/v3/components - When I provided 'adding new msp "ca_importmsp"' for input field with class ".bx--search-input" + When I provided 'adding new msp "ca_importmsp"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new msp "ca_importmsp"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-peer "peer_import" -- POST:/api/v3/components - When I provided 'adding new fabric-peer "peer_import"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-peer "peer_import"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-peer "peer_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-orderer "os_import_1"-- POST:/api/v3/components - When I provided 'adding new fabric-orderer "os_import_1"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-orderer "os_import_1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-orderer "os_import_1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # adding new fabric-ca "ca_import" -- POST:/api/v3/components - When I provided 'adding new fabric-ca "ca_import"' for input field with class ".bx--search-input" + When I provided 'adding new fabric-ca "ca_import"' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new fabric-ca "ca_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'POST:/api/v3/components' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' @@ -185,32 +185,32 @@ Feature: Verify Audit Log functionality 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' # deleting fabric-orderer "os_import_1" - DELETE:/api/v3/components/os_import_1 - When I provided 'removing fabric-orderer "os_import_1"' for input field with class ".bx--search-input" + When I provided 'removing fabric-orderer "os_import_1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'removing fabric-orderer "os_import_1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/os_import_1' and id 'audit-logs-api_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' # deleting fabric-ca "ca_import" - DELETE:/api/v3/components/ca_import - When I provided 'removing fabric-ca "ca_import"' for input field with class ".bx--search-input" + When I provided 'removing fabric-ca "ca_import"' for input field with class ".cds--search-input" Then I should see audit log row with text 'removing fabric-ca "ca_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/ca_import' 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 # deleting fabric-peer "peer_import" =- DELETE:/api/v3/components/peer_import - When I provided 'removing fabric-peer "peer_import"' for input field with class ".bx--search-input" + When I provided 'removing fabric-peer "peer_import"' for input field with class ".cds--search-input" Then I should see audit log row with text 'removing fabric-peer "peer_import"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/components/peer_import' and id 'audit-logs-api_title-0' #delete org1ca - When I provided 'removing fabric-ca "org1ca"' for input field with class ".bx--search-input" + When I provided 'removing fabric-ca "org1ca"' for input field with class ".cds--search-input" Then I should see audit log row with text 'removing fabric-ca "org1ca"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #delete peerOrg1 Then I reload the page - When I provided 'removing fabric-peer "peerorg1"' for input field with class ".bx--search-input" + When I provided 'removing fabric-peer "peerorg1"' for input field with class ".cds--search-input" Then I should see audit log row with text 'removing fabric-peer "peerorg1"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' #delete ordering service - When I provided 'deleting ordering service: "Ordering Service"' for input field with class ".bx--search-input" + When I provided 'deleting ordering service: "Ordering Service"' for input field with class ".cds--search-input" Then I should see audit log row with text 'deleting ordering service: "Ordering Service"' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/kubernetes/components/tags' and id 'audit-logs-api_title-0' @@ -219,12 +219,12 @@ Feature: Verify Audit Log functionality 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' #adding new user - adding new user w********r@ibm.com - When I provided 'adding new user w********r@ibm.com' for input field with class ".bx--search-input" + When I provided 'adding new user w********r@ibm.com' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new user w********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'POST:/api/v3/permissions/users' and id 'audit-logs-api_title-0' #adding new user - adding new user adding new user r********r@ibm.com - When I provided 'adding new user r********r@ibm.com' for input field with class ".bx--search-input" + When I provided 'adding new user r********r@ibm.com' for input field with class ".cds--search-input" Then I should see audit log row with text 'adding new user r********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'POST:/api/v3/permissions/users' and id 'audit-logs-api_title-0' @@ -264,7 +264,7 @@ Feature: Verify Audit Log functionality 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' #delete user - deleting users w********r@ibm.com, r********r@ibm.com - When I provided 'deleting users w********r@ibm.com, r********r@ibm.com' for input field with class ".bx--search-input" + When I provided 'deleting users w********r@ibm.com, r********r@ibm.com' for input field with class ".cds--search-input" Then I should see audit log row with text 'deleting users w********r@ibm.com, r********r@ibm.com' and id 'audit-logs-log_title-0' Then I should see audit log row with text 'success' and id 'audit-logs-outcome_title-0' Then I should see audit log row with text 'DELETE:/api/v3/permissions/users' and id 'audit-logs-api_title-0' 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 86b55974..5c976357 100644 --- a/packages/apollo/test/cypress/support/step_definitions/identity_steps.js +++ b/packages/apollo/test/cypress/support/step_definitions/identity_steps.js @@ -28,9 +28,9 @@ When(/^the (?:'|")(.*?)(?:'|") user was enrolled with id (?:'|")(.*?)(?:'|") and cy.clickButton('id', 'btn-ca_users-register_user') cy.enterInput(enrollId, 'Enter an ID') cy.enterInput(enrollSecret, 'Enter a secret') - cy.get('.bx--list-box__field').click() + cy.get('.cds--list-box__field').click() cy.wait(500) - cy.get('.bx--list-box__menu-item__option').contains(type).should('be.visible').click() + cy.get('.cds--list-box__menu-item__option').contains(type).should('be.visible').click() cy.clickButton('id', 'next') cy.wait(500) cy.clickButton('id', 'submit') @@ -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('.bx--overflow-menu.bx--overflow-menu--md',{ timeout: 180000 }).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('.bx--list-box__menu-item__option',{ timeout: 180000 }).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) From a7bd6c733c0ed08b672246ac2e1fd92b7910dc44 Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Wed, 26 Jun 2024 13:05:24 +0530 Subject: [PATCH 3/7] update test case for carbon ui changes Signed-off-by: Ketul Shah --- .../e2e/features/03-JoinANetwork.feature | 11 +- .../04-CreateAndJoin2x_Org1AndOrg2.feature | 46 +++++--- .../05-Install20SmartContract.feature | 40 ++++--- .../features/06-CreateAndJoin1x_Org1.feature | 19 +++- .../07-UpdateAndJoinChannel_Org2.feature | 24 ++-- ...9-BuildANetwork_Without_SysChannel.feature | 103 +++++++++++------- .../e2e/features/11-TestWriter.feature | 10 +- .../e2e/features/13-Misc Cases.feature | 3 +- .../apollo/test/cypress/package-lock.json | 2 +- .../support/step_definitions/login_steps.js | 2 +- .../step_definitions/navigation_steps.js | 7 +- 11 files changed, 175 insertions(+), 92 deletions(-) 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..8727a0d4 100644 --- a/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature +++ b/packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature @@ -86,19 +86,25 @@ Feature: Create and Join a 1.x channel And I clicked the span with text 'Next' 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 +112,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 801c884f..681a41fa 100644 --- a/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature +++ b/packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature @@ -89,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/09-BuildANetwork_Without_SysChannel.feature b/packages/apollo/test/cypress/e2e/features/09-BuildANetwork_Without_SysChannel.feature index ca642e8f..09097158 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 @@ -82,23 +82,26 @@ Feature: Build a network without system channel 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 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 the button with id 'ibp-orderer-nodes' + 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 "10" seconds + 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 @@ -137,9 +140,11 @@ Feature: Build a network without system channel And I clicked the span with text 'Next' 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 +153,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 +204,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 +269,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' @@ -297,11 +323,13 @@ Feature: Build a network without system channel 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 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 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." @@ -314,7 +342,8 @@ Feature: Build a network without system channel 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 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." diff --git a/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature b/packages/apollo/test/cypress/e2e/features/11-TestWriter.feature index 3f180add..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 @@ -101,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' @@ -110,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' @@ -137,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 @@ -146,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 7c9aecdc..755fab3d 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,9 @@ Feature: Verify miscellaneous cases of console works as expected And I am on the 'nodes' page Scenario: Run mustgather tool + Then wait "2" seconds When I am on Help page - Then wait "5" seconds + 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' diff --git a/packages/apollo/test/cypress/package-lock.json b/packages/apollo/test/cypress/package-lock.json index 240c6733..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.10.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/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 6099cd97..c034635f 100644 --- a/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js +++ b/packages/apollo/test/cypress/support/step_definitions/navigation_steps.js @@ -84,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) }); @@ -103,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'); From e760df6e45237d9b29f1d5b9a9170370e3dd1473 Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Wed, 26 Jun 2024 20:53:07 +0530 Subject: [PATCH 4/7] UI element changes and failre fixes Signed-off-by: Ketul Shah --- .../test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature | 3 ++- .../apollo/test/cypress/e2e/features/13-Misc Cases.feature | 3 ++- .../apollo/test/cypress/e2e/features/15-ConsoleAPI.feature | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) 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 8727a0d4..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,7 +83,8 @@ 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 text 'Ordering Service' 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 755fab3d..1782e576 100644 --- a/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature +++ b/packages/apollo/test/cypress/e2e/features/13-Misc Cases.feature @@ -9,7 +9,8 @@ Feature: Verify miscellaneous cases of console works as expected Scenario: Run mustgather tool Then wait "2" seconds - When I am on Help page + # 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 diff --git a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature index 8dac75a0..4664e9be 100644 --- a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature +++ b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature @@ -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' From 26103320a129aa7157ced6d5f22d60085518e88d Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Thu, 27 Jun 2024 12:23:24 +0530 Subject: [PATCH 5/7] moving Console API out from regression test suite Signed-off-by: Ketul Shah --- .../apollo/test/cypress/e2e/features/15-ConsoleAPI.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature index 4664e9be..a4f6c4f9 100644 --- a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature +++ b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.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 works as expected Background: Login to console From 010c96a6d7f2bd1bc50a445348e8f9ff9cb6a052 Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Thu, 27 Jun 2024 16:21:33 +0530 Subject: [PATCH 6/7] failure fixes Signed-off-by: Ketul Shah --- .../e2e/features/08-InstallInstantiate1xSmartContract.feature | 3 ++- .../apollo/test/cypress/e2e/features/15-ConsoleAPI.feature | 3 +-- .../apollo/test/cypress/e2e/features/16-ConsoleAPIv3.feature | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) 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/15-ConsoleAPI.feature b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature index a4f6c4f9..b6dc4239 100644 --- a/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature +++ b/packages/apollo/test/cypress/e2e/features/15-ConsoleAPI.feature @@ -1,5 +1,4 @@ -@support @runonconsole @apicases -# Due to open bugs Console API cases are failing. Hence, moving it out from regression test suit. +@support @runonconsole @apicases @regression Feature: Verify Console APIs works as expected Background: Login to console 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 From 92aeb8b1cd7417760982c782a27b3b4c1de719b3 Mon Sep 17 00:00:00 2001 From: Ketul Shah Date: Thu, 27 Jun 2024 19:00:04 +0530 Subject: [PATCH 7/7] replaced command due to carbon library update Signed-off-by: Ketul Shah --- .../e2e/features/09-BuildANetwork_Without_SysChannel.feature | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 09097158..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 @@ -137,7 +137,8 @@ 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'