-
Notifications
You must be signed in to change notification settings - Fork 28
Creating new provider #1565
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Creating new provider #1565
Conversation
8f7c1aa
to
91646eb
Compare
Signed-off-by: Ameen Barakat <[email protected]>
testing/cypress/support/login.ts
Outdated
// Cypress.Commands.add('logout', () => { | ||
// // Check if auth is disabled (for a local development environment). | ||
// cy.window().then((win: any) => { | ||
// if (win.SERVER_FLAGS?.authDisabled) { | ||
// cy.task('log', ' skipping logout, console is running with auth disabled'); | ||
// return; | ||
// } | ||
// cy.task('log', ' Logging out'); | ||
// cy.byTestID('user-dropdown').click(); | ||
// cy.byTestID('log-out').should('be.visible'); | ||
// // eslint-disable-next-line cypress/no-force | ||
// cy.byTestID('log-out').click(); | ||
// cy.byLegacyTestID('login').should('be.visible'); | ||
// }); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comment out code
testing/cypress.config.cjs
Outdated
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u sure its needed?
testing/cypress/support/login.ts
Outdated
const KUBEADMIN_USERNAME = 'kubeadmin'; | ||
const KUBEADMIN_IDP = 'kube:admin'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract to a const file
testing/cypress/support/login.ts
Outdated
console.log('Password value:', password, Cypress.env('BRIDGE_KUBEADMIN_PASSWORD')); | ||
console.log('Password value:', password, Cypress.env('VMWARE_URL')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for console log
const KUBEADMIN_USERNAME = 'kubeadmin'; | ||
const KUBEADMIN_IDP = 'kube:admin'; | ||
|
||
Cypress.Commands.add('login', (provider: string, username: string, password: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont see u ssend params to this fun when u use it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since i can't expose the user/password/..etc
atm i'm using
Cypress.env('BRIDGE_KUBEADMIN_PASSWORD'
which i'm manually export in the shell
cy.get('.forklift-create-provider-edit-section') | ||
.should('contain.text', 'Provider details') | ||
.should('contain.text', 'Provider type'); | ||
cy.get('.pf-v5-c-text-input-group__text-input').should('have.value', 'openshift-mtv'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is theren't any ID or data test ID we can use instead of classnames? classnames are changed often, so they will break the test often
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No there is no ID or test ID unfortunately, i'm just verifying that 'Provider details" & 'Provider type" does exist in the page and we are using 'openshift-mtv' as NS
|
📝 Links
📝 Description
🎥 Demo
📝 CC://