Skip to content

Commit 33c82fc

Browse files
authored
Merge pull request #764 from ketulsha/main
UI automation test update as per carbon library update
2 parents 5b9ba31 + 92aeb8b commit 33c82fc

17 files changed

+254
-159
lines changed

packages/apollo/test/cypress/e2e/features/02-BuildNetwork.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Feature: Build a network feature
7474
And I clicked the button with title 'Select an MSP'
7575
And I clicked the div with text 'Org1 MSP'
7676
And I clicked the button with title 'Select a Fabric version'
77-
And I clicked the div with text '2.5'
77+
And I clicked the div with text '2.2'
7878
And I clicked the button with id 'next'
7979
And I clicked the button with title 'Please select an identity from your wallet'
8080
And I clicked the div with text 'Org1 MSP Admin'
@@ -159,7 +159,7 @@ Feature: Build a network feature
159159
And I clicked the button with title 'Select an MSP'
160160
And I clicked the dropdown item 'Ordering Service MSP' with class '.cds--list-box__menu-item__option'
161161
And I clicked the button with title 'Select a Fabric version'
162-
And I clicked the dropdown item '2.5' with class '.cds--list-box__menu-item__option'
162+
And I clicked the dropdown item '2.2' with class '.cds--list-box__menu-item__option'
163163
And I clicked the button with id 'next'
164164
Then wait "2" seconds
165165
And I clicked the button with title 'Please select an identity from your wallet'

packages/apollo/test/cypress/e2e/features/03-JoinANetwork.feature

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,21 @@ Feature: Join a network feature
9999
And I clicked the button with title 'Create MSP definition'
100100
And I provided 'Org2 MSP' for the 'Enter name for the MSP' input
101101
And I provided 'org2msp' for the 'Enter the MSP ID' input
102-
And I clicked the span with text 'Next'
103-
And I clicked the button with title 'Select a root Certificate Authority'
102+
# And I clicked the span with text 'Next'
103+
And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span'
104+
And I clicked the button with title 'Select a root Certificate Authority'
104105
And I clicked the div with text 'Org2 CA'
105106
And wait "3" seconds
106-
And I clicked the span with text 'Next'
107+
#And I clicked the span with text 'Next'
108+
And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span'
107109
And I clicked the button with title 'org2admin'
108110
And I clicked the div with text 'org2admin'
109111
And I provided 'org2adminpw' for the 'Enter a secret' input
110112
And I provided 'Org2 MSP Admin' for the 'Enter name for the identity to be stored in your Wallet' input
111113
And I clicked the button with text 'Generate'
112114
And I clicked the button with text 'Export'
113-
And I clicked the span with text 'Next'
115+
#And I clicked the span with text 'Next'
116+
And I clicked element with class '#generateMSPModal > div.ibp-button-container.ibp-vertical-panel-button-container > button:nth-child(2) > span'
114117
And I click Create MSP definition button
115118
Then I should see a success toast with class '.cds--toast-notification__title' which says "MSP Org2 MSP has been created successfully."
116119

packages/apollo/test/cypress/e2e/features/04-CreateAndJoin2x_Org1AndOrg2.feature

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,14 @@ Feature: Create and Join a 2.x channel
8484
And I am on the 'channels' page
8585
And I clicked the button with title 'Create channel'
8686
And I clicked the checkbox with text 'Advanced channel configuration'
87-
And I clicked the span with text 'Next'
87+
# And I clicked the span with text 'Next'
88+
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'
8889
And I provided 'channel2' for the 'Enter a name for your channel' input
8990
And I clicked the button with title 'Select from available ordering services'
90-
And I clicked the div with id 'downshift-0-item-0'
91+
And I clicked the div with text 'Ordering Service'
9192
Then wait "3" seconds
92-
And I clicked the span with text 'Next'
93+
# And I clicked the span with text 'Next'
94+
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'
9395
And I clicked the button with title 'Select MSP'
9496
And I clicked the div with text 'Org1 MSP (org1msp)'
9597
And I clicked the button with text 'Add'
@@ -98,28 +100,38 @@ Feature: Create and Join a 2.x channel
98100
And I clicked the div with text 'Org2 MSP (org2msp)'
99101
And I clicked the button with text 'Add'
100102
And I clicked the 'admin' role for 'org2msp'
101-
And I clicked the span with text 'Next'
103+
# And I clicked the span with text 'Next'
104+
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'
102105
And I clicked the button with title 'Select policy'
103106
And I clicked the div with text '1 out of 2'
104-
And I clicked the span with text 'Next'
107+
# And I clicked the span with text 'Next'
108+
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'
105109
And I clicked the button with title 'Select the MSP'
106110
And I clicked the div with text 'Org1 MSP (org1msp)'
107111
And I clicked the button with title 'Select an identity'
108112
And I clicked the div with text 'Org1 MSP Admin'
109-
And I clicked the span with text 'Next'
113+
# And I clicked the span with text 'Next'
114+
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'
110115
And I clicked the div with id 'selectedApplicationCapability'
111116
And I clicked the div with text '2.0.0'
112117
And I clicked the div with id 'selectedOrdererCapability'
113-
And I clicked element with class '#selectedOrdererCapability > div > div:nth-child(2)'
114-
And I clicked the span with text 'Next'
115-
And I clicked the span with text 'Next'
116-
And I clicked the span with text 'Next'
117-
And I clicked the span with text 'Next'
118-
And I clicked the span with text 'Next'
118+
And I clicked element with class '#selectedOrdererCapability > ul > li:nth-child(2) > div'
119+
# And I clicked the span with text 'Next'
120+
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'
121+
# And I clicked the span with text 'Next'
122+
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'
123+
# And I clicked the span with text 'Next'
124+
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'
125+
# And I clicked the span with text 'Next'
126+
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'
127+
# And I clicked the span with text 'Next'
128+
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'
119129
And I clicked the button with title 'Select the MSP'
120130
And I clicked the div with text 'Ordering Service MSP (osmsp)'
121-
And I clicked the span with text 'Next'
122-
And I clicked the span with text 'Next'
131+
# And I clicked the span with text 'Next'
132+
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'
133+
# And I clicked the span with text 'Next'
134+
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'
123135
Then I clicked Create channel button
124136
Then wait "10" seconds
125137
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
146158
And I am on the 'channels' page
147159
And I clicked the div with id 'ibp-tile-channel2'
148160
Then wait "5" seconds
149-
And I clicked the span with text 'Peer Org1'
150-
And I clicked the span with text 'Peer Org2'
161+
# And I clicked the span with text 'Peer Org1'
162+
And I click label with property 'for' and value 'joinChannelModal-peer-peerorg1'
163+
# And I clicked the span with text 'Peer Org2'
164+
And I click label with property 'for' and value 'joinChannelModal-peer-peerorg2'
151165
When I clicked the button with id 'submit'
152166
Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully joined channel2."
153167
Then the element div with text 'channel2' should be visible on page

packages/apollo/test/cypress/e2e/features/05-Install20SmartContract.feature

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,23 +144,35 @@ Feature: 2.0 Lifecycle Flow
144144
And I clicked the button with title 'Select an identity'
145145
And I clicked the div with text 'Org2 MSP Admin'
146146
Then wait "1" seconds
147-
And I clicked the span with text 'Next'
148-
And I clicked the span with text 'Next'
149-
And I clicked the span with text 'Next'
150-
And I clicked the span with text 'Next'
151-
And I clicked the span with text 'Next'
152-
And I clicked the span with text 'Next'
147+
# And I clicked the span with text 'Next'
148+
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'
149+
# And I clicked the span with text 'Next'
150+
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'
151+
# And I clicked the span with text 'Next'
152+
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'
153+
# And I clicked the span with text 'Next'
154+
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'
155+
# And I clicked the span with text 'Next'
156+
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'
157+
# And I clicked the span with text 'Next'
158+
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'
153159
And I provided '13' for input field with id 'channelModal-block-params-absolute_max_bytes_mb-input-for-slider'
154160
And I provided '510' for input field with id 'channelModal-block-params-max_message_count-input-for-slider'
155-
And I clicked the span with text 'Next'
156-
And I clicked the span with text 'Next'
157-
And I clicked the span with text 'Next'
158-
And I clicked the span with text 'Next'
159-
And I clicked the button with title 'Select the MSP'
161+
# And I clicked the span with text 'Next'
162+
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'
163+
# And I clicked the span with text 'Next'
164+
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'
165+
# And I clicked the span with text 'Next'
166+
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'
167+
# And I clicked the span with text 'Next'
168+
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'
169+
And I clicked the button with title 'Select the MSP'
160170
And I clicked the div with text 'Ordering Service MSP (osmsp)'
161-
And I clicked the span with text 'Next'
162-
And I clicked the span with text 'Next'
163-
And I clicked the span with text 'Update channel'
171+
# And I clicked the span with text 'Next'
172+
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'
173+
# And I clicked the span with text 'Next'
174+
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'
175+
And I clicked the span with text 'Update channel'
164176
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.'
165177
# View channel configuration updates
166178
When I clicked the button with id 'ibp-header-signature-collection-icon'

packages/apollo/test/cypress/e2e/features/06-CreateAndJoin1x_Org1.feature

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,29 +83,37 @@ Feature: Create and Join a 1.x channel
8383

8484
Scenario: When creating a channel
8585
And I clicked the button with title 'Create channel'
86-
And I clicked the span with text 'Next'
86+
# And I clicked the span with text 'Next'
87+
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'
8788
And I provided 'channel1' for the 'Enter a name for your channel' input
8889
And I clicked the button with title 'Select from available ordering services'
89-
And I clicked the div with id 'downshift-0-item-0'
90-
And I clicked the span with text 'Next'
90+
# And I clicked the div with text 'Ordering Service'
91+
And I clicked element with class '#selectedOrderer > ul > li:nth-child(1)'
92+
# And I clicked the span with text 'Next'
93+
Then wait "1" seconds
94+
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'
9195
And I clicked the button with title 'Select MSP'
9296
And I clicked the div with text 'Org1 MSP (org1msp)'
9397
And I clicked the button with text 'Add'
9498
And I clicked the 'admin' role for 'org1msp'
95-
And I clicked the span with text 'Next'
96-
And I clicked the span with text 'Next'
99+
# And I clicked the span with text 'Next'
100+
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'
101+
# And I clicked the span with text 'Next'
102+
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'
97103
And I clicked the button with title 'Select the MSP'
98104
And I clicked the div with text 'Org1 MSP (org1msp)'
99105
And I clicked the button with title 'Select an identity'
100106
And I clicked the div with text 'Org1 MSP Admin'
101-
And I clicked the span with text 'Next'
107+
# And I clicked the span with text 'Next'
108+
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'
102109
Then I clicked Create channel button
103110
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."
104111
And the channel with name 'channel1' should have been created
105112

106113
Scenario: When joining a channel
107114
And I clicked the div with text 'channel1'
108115
Then wait "5" seconds
109-
And I clicked the span with text 'Peer Org1'
116+
# And I clicked the span with text 'Peer Org1'
117+
And I click label with property 'for' and value 'joinChannelModal-peer-peerorg1'
110118
When I clicked the button with id 'submit'
111119
Then I should see a success toast with class '.cds--toast-notification__title' which says "You have successfully joined channel1."

packages/apollo/test/cypress/e2e/features/07-UpdateAndJoinChannel_Org2.feature

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Feature: Update channel to add Org2
3232
And the CA admin is set as 'Ordering Service CA Admin'
3333
Then the 'admin' user with id 'OSadmin' should be enrolled
3434
And the 'orderer' user with id 'OS1' should be enrolled
35+
Then wait "5" seconds
3536
And I enroll TLS identity for OS1 with secret 'OS1pw' and name 'TLSOS1'
3637
And I am on the 'nodes' page
3738
And I clicked the 'Org2 CA' certificate authority
@@ -88,19 +89,27 @@ Feature: Update channel to add Org2
8889
And I clicked the div with text 'Org1 MSP (org1msp)'
8990
And I clicked the button with title 'Select an identity'
9091
And I clicked the div with text 'Org1 MSP Admin'
91-
And I clicked the span with text 'Next'
92+
# And I clicked the span with text 'Next'
93+
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'
9294
And I clicked the button with title 'Select MSP'
9395
And I clicked the div with text 'Org2 MSP (org2msp)'
9496
And I clicked the button with id 'btn-add-org'
9597
And I clicked the 'admin' role for 'org2msp'
96-
And I clicked the span with text 'Next'
98+
# And I clicked the span with text 'Next'
99+
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'
97100
And I clicked the button with title 'Select policy'
98101
And I clicked the div with text '1 out of 2'
99-
And I clicked the span with text 'Next'
100-
And I clicked the span with text 'Next'
101-
And I clicked the span with text 'Next'
102-
And I clicked the span with text 'Next'
103-
And I clicked the span with text 'Next'
104-
And I clicked the span with text 'Next'
102+
# And I clicked the span with text 'Next'
103+
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'
104+
# And I clicked the span with text 'Next'
105+
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'
106+
# And I clicked the span with text 'Next'
107+
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'
108+
# And I clicked the span with text 'Next'
109+
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'
110+
# And I clicked the span with text 'Next'
111+
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'
112+
# And I clicked the span with text 'Next'
113+
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'
105114
And I clicked the span with text 'Update channel'
106115
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."

0 commit comments

Comments
 (0)