Skip to content

Commit 277866f

Browse files
committed
moar fixes
1 parent 4b06414 commit 277866f

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cypress/e2e/01-options.cy.ts

+12-3
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,23 @@ describe('Options view & initial setup', () => {
182182
cy.intercept('https://jira.test.com/rest/api/2/myself', { displayName: 'Testuser', key: 'test1' }).as('myself2')
183183

184184
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)')
188187

189188
cy.get('@myself2.all').should('have.length', 1)
190189
cy.get('@myself2.1').its('request.headers').should('have.property', 'cookie', 'test=cookie')
191190
cy.get('@myself2.1').its('request.headers').should('not.have.property', 'authorization', `Bearer ${testtoken}`)
192191

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+
193202
cy.getOptions().its('token').should('equal', testtoken)
194203

195204
cy.contains('div', 'Tracked Issues')

0 commit comments

Comments
 (0)