Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Creating new provider #1565

wants to merge 3 commits into from

Conversation

AmenB
Copy link

@AmenB AmenB commented Apr 8, 2025

📝 Links

📝 Description

🎥 Demo

📝 CC://

@AmenB AmenB force-pushed the creatnewprovider branch 2 times, most recently from 8f7c1aa to 91646eb Compare April 10, 2025 07:37
@AmenB AmenB force-pushed the creatnewprovider branch from 9643c3c to 542584e Compare April 14, 2025 11:51
Comment on lines 44 to 58
// 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');
// });
// });
Copy link
Collaborator

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

Comment on lines 10 to 12
setupNodeEvents(on, config) {
// implement node event listeners here
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

u sure its needed?

Comment on lines 11 to 12
const KUBEADMIN_USERNAME = 'kubeadmin';
const KUBEADMIN_IDP = 'kube:admin';
Copy link
Collaborator

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

Comment on lines 18 to 19
console.log('Password value:', password, Cypress.env('BRIDGE_KUBEADMIN_PASSWORD'));
console.log('Password value:', password, Cypress.env('VMWARE_URL'));
Copy link
Collaborator

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) => {
Copy link
Collaborator

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

Copy link
Author

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');
Copy link
Collaborator

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

Copy link
Author

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

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 Security Hotspots
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants