Skip to content
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

Dependency updates #4728

Merged
merged 5 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions backend/cypress/support/login-gov.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function testLoginGovLogin(
cy.get('button.usa-button.sign-in-button')
.should('contain.text', 'Authenticate with Login.gov')
.click();

cy.origin(
'https://idp.int.identitysandbox.gov/',
{
Expand All @@ -26,16 +27,23 @@ export function testLoginGovLogin(
cy.get('input.one-time-code-input__input').type(token);
});
cy.get('lg-submit-button > .usa-button').click();
cy.url().then((url) => {
if (url.match(/\/login\/piv_cac_recommended$/)) {
// Handle the case where the page redirects to piv_cac_recommended
cy.get('button.usa-button.usa-button--unstyled[type="submit"]:contains("Skip")').click();
} else if (url.match(/\/sign_up\/completed$/)) {
// Login's additional data sharing consent
cy.get('button:contains("Agree and continue")').click();
}
});

// We can't wrap all of this in a cy.origin because it will error if it made
// it back to localhost already, which is the typical case
cy.url().then((url) => {
if (url.match(/\/login\/piv_cac_recommended$/)) {
// Handle the case where the page redirects to piv_cac_recommended
cy.origin('https://idp.int.identitysandbox.gov/', () => {
cy.get('button.usa-button.usa-button--unstyled[type="submit"]:contains("Skip")').click();
});
} else if (url.match(/\/sign_up\/completed$/)) {
// Login's additional data sharing consent
cy.origin('https://idp.int.identitysandbox.gov/', () => {
cy.get('button:contains("Agree and continue")').click();
});
}
);
});

cy.url().should('match', /\/audit\/$/);
};
Loading