@@ -182,14 +182,23 @@ describe('Options view & initial setup', () => {
182
182
cy . intercept ( 'https://jira.test.com/rest/api/2/myself' , { displayName : 'Testuser' , key : 'test1' } ) . as ( 'myself2' )
183
183
184
184
cy . contains ( 'div' , 'Authentication Method' ) . find ( 'select' ) . select ( 'Cookie' )
185
- cy . contains ( 'button' , 'Refresh user information' ) . click ( )
186
-
187
- cy . wait ( '@myself2' )
185
+ cy . contains ( 'div' , 'User' ) . find ( 'input' ) . should ( 'have.value' , 'Testuser ()' )
186
+ cy . contains ( 'div' , 'User' ) . find ( 'input' ) . should ( 'have.value' , 'Testuser (test1)' )
188
187
189
188
cy . get ( '@myself2.all' ) . should ( 'have.length' , 1 )
190
189
cy . get ( '@myself2.1' ) . its ( 'request.headers' ) . should ( 'have.property' , 'cookie' , 'test=cookie' )
191
190
cy . get ( '@myself2.1' ) . its ( 'request.headers' ) . should ( 'not.have.property' , 'authorization' , `Bearer ${ testtoken } ` )
192
191
192
+ cy . intercept ( 'https://jira.test.com/rest/api/2/myself' , { displayName : 'Testuser' , key : 'test3' } ) . as ( 'myself2' )
193
+
194
+ cy . contains ( 'button' , 'Refresh user information' ) . click ( )
195
+
196
+ cy . contains ( 'div' , 'User' ) . find ( 'input' ) . should ( 'have.value' , 'Testuser (test3)' )
197
+
198
+ cy . get ( '@myself2.all' ) . should ( 'have.length' , 2 )
199
+ cy . get ( '@myself2.2' ) . its ( 'request.headers' ) . should ( 'have.property' , 'cookie' , 'test=cookie' )
200
+ cy . get ( '@myself2.2' ) . its ( 'request.headers' ) . should ( 'not.have.property' , 'authorization' , `Bearer ${ testtoken } ` )
201
+
193
202
cy . getOptions ( ) . its ( 'token' ) . should ( 'equal' , testtoken )
194
203
195
204
cy . contains ( 'div' , 'Tracked Issues' )
0 commit comments