Skip to content

Commit

Permalink
chore: update command
Browse files Browse the repository at this point in the history
remove setid and use login directly
  • Loading branch information
jlangy committed Jan 29, 2024
1 parent 870e6c1 commit 6198b55
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions testing/cypress/e2e/github-bcgov-idp.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ const fillInPlayground = (client, url = 'https://dev.sandbox.loginproxy.gov.bc.c
describe('Github BCGov intergration', () => {
let req = new Request();
req.populateCreateContent(githubBCGovIDP);
const cssUser = Cypress.env('users').find((user) => user.type === 'default');

it('Can create the Github BCGov integration', () => {
cy.setid('default');
cy.login(null, null, null, null);
cy.login(cssUser.username, cssUser.password, null, null);
req.createRequest();
cy.logout(null);
});
Expand Down Expand Up @@ -63,7 +63,7 @@ describe('Github BCGov intergration', () => {
});

it('Can delete the BCGov Github integration', () => {
cy.login(null, null, null, null);
cy.login(cssUser.username, cssUser.password, null, null);
req.deleteRequest(Cypress.env('test'));
cy.logout(null);
});
Expand All @@ -73,13 +73,10 @@ describe('Github public intergration', () => {
let req = new Request();
req.populateCreateContent(githubPublicIDP);

// Creating a bcgov public integration requires admin account
const username = Cypress.env('adminUsername');
const password = Cypress.env('adminPassword');
const cssUser = Cypress.env('users').find((user) => user.type === 'admin');

it('Can create the Github BCGov integration', () => {
cy.setid('admin');
cy.login(null, null, null, null);
cy.login(cssUser.username, cssUser.password, null, null);
req.createRequest();
cy.logout(null);
});
Expand All @@ -103,7 +100,7 @@ describe('Github public intergration', () => {
});

it('Can delete the BCGov Github integration', () => {
cy.login(null, null, null, null);
cy.login(cssUser.username, cssUser.password, null, null);
req.deleteRequest(Cypress.env('test'));
cy.logout(null);
});
Expand Down

0 comments on commit 6198b55

Please sign in to comment.