Skip to content

Commit

Permalink
Merge pull request openshift#8809 from gouyang/login_with_regular_user
Browse files Browse the repository at this point in the history
add support for login with normal user
  • Loading branch information
openshift-merge-robot authored Apr 29, 2021
2 parents 1d68a14 + 1ff0496 commit a9d4b34
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ declare global {
createUserTemplate(namespace: string): void;
cdiCloner(namespace: string): void;
waitForLoginPrompt(vmName: string, namespace: string): void;
Login(): void;
}
}
}
Expand Down Expand Up @@ -145,3 +146,11 @@ Cypress.Commands.add('waitForLoginPrompt', (vmName: string, namespace: string) =
timeout: 180000,
});
});

Cypress.Commands.add('Login', () => {
if (Cypress.env('IDP')) {
cy.login(Cypress.env('IDP'), Cypress.env('IDP_USERNAME'), Cypress.env('IDP_PASSWORD'));
} else {
cy.login();
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const vmName = `test-devconsole-${testName}`;
describe('test dev console', () => {
before(() => {
cy.viewport(1536, 960);
cy.login();
cy.Login();
cy.visit('/');
cy.createProject(testName);
cy.cdiCloner(testName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Connect to a VM using SSH testing', () => {
sshVMDetailsPageTesting,
];
before(() => {
cy.login();
cy.Login();
cy.visit('');
cy.createProject(testName);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { TEMPLATE_NAME, TEMPLATE_BASE_IMAGE, OS_IMAGES_NS } from '../../const/in

describe('test vm template source image', () => {
before(() => {
cy.login();
cy.Login();
cy.visit('');
cy.createProject(testName);
cy.deleteResource({
Expand Down

0 comments on commit a9d4b34

Please sign in to comment.