-
Notifications
You must be signed in to change notification settings - Fork 599
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13003 from TheRealJon/OCPBUGS-8274-regression
OCPBUGS-8274: Fix copy login command regression
- Loading branch information
Showing
6 changed files
with
42 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
frontend/packages/integration-tests-cypress/tests/app/masthead.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { checkErrors } from '../../support'; | ||
import { masthead } from '../../views/masthead'; | ||
|
||
describe('Masthead', () => { | ||
before(() => { | ||
cy.login(); | ||
}); | ||
|
||
afterEach(() => { | ||
checkErrors(); | ||
}); | ||
|
||
after(() => { | ||
cy.visit('/'); | ||
cy.logout(); | ||
}); | ||
describe('User dropdown', () => { | ||
it('should render the correct copy login command link', () => { | ||
cy.window().then((win: any) => { | ||
if (win.SERVER_FLAGS?.authDisabled) { | ||
cy.log('Skipping test, auth is disabled'); | ||
} else { | ||
masthead.userDropdown().click(); | ||
masthead.copyLoginCommand().should('be.visible').invoke('removeAttr', 'target'); | ||
masthead.copyLoginCommand().click(); | ||
cy.url().should('include', '/oauth/token/display'); | ||
cy.get('body').should('include.text', 'Display Token'); | ||
} | ||
}); | ||
}); | ||
// TODO: Add more tests for user dropdown | ||
}); | ||
// TODO Add more tests for masthead | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters