Closed ggaabe closed 1 year ago
I'm getting the same problem with Cypress 12.17.1 on GHA
I'm seeing a similar issue with v12.2.0 on GHA with Cypress Cloud.
Hi everyone, thank you for raising this issue. Is there any further details or information anyone on this thread can share that could possibly shed light on when this happens / what is causing it? Have you tried with a very simple test and built it up until you start seeing these types of behaviors?
@ggaabe I understand you can't share your salesforce credentials but can you share the test code you are running? That would help us be able to replicate this behavior.
Also, are you also using the cypress github-action as others in this thread have mentioned they are?
@nagash77 Yeah this is the login flow:
Cypress.Commands.add('loginSalesforce', (userType: Roles) => {
const { username, password } = UserTypes[userType];
cy.session(
`${userType}-SF`,
() => {
cy.visit('https://wealthaccessdev-dev-ed.my.salesforce.com/');
cy.get('#username').type(username);
cy.get('#password').type(password, { timeout: 50, delay: 300 });
cy.get('#Login').click({ timeout: 100 });
// first redirect
cy.origin('https://wealthaccessdev-dev-ed.file.force.com/', () => {
cy.location('pathname', { timeout: 10000 }).should(
'include',
'/one/one.app'
);
});
// second
cy.origin('https://wealthaccessdev-dev-ed.lightning.force.com/', () => {
cy.log('Finished redirecting');
cy.url().should('include', 'lightning');
});
},
{
cacheAcrossSpecs: true,
validate: () => {
cy.log('Validate');
cy.url().should(
'not.equal',
`https://wealthaccessdev-dev-ed.my.salesforce.com/`
);
},
}
);
});
@ggaabe have you tried running with experimentalModifyObstructiveThirdPartyCode set to true? Also can you specify which version of salesforce you are testing against?
Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.
Current behavior
I'm trying to store and save some session cookies from a login on salesforce. During the login, the website redirects from .salesforce.com to a .force.com site.
After this redirection it redirects back to a *.salesforce.com site. At this point, the in-browser cypress test UI completely disappears and the browser turns into a regular web browser. When I run this same test headlessly (
cypress:run
), the test simply hangs infinitely and never exits.Desired behavior
Throw an error or simply continue the test without exiting.
Test code to reproduce
Unfortunately I can't do this without giving out salesforce credentials
Cypress Version
12.16.0
Node version
18.16.1
Operating System
Windows 11 Pro Build 22621.1992
Debug Logs
Logs seem to show an infinite stream of stuff like below. These logs indicate that the cypress run is still tracking everything that is happening on the page after successfully logging in but it seems to have lost control of the browser and isn't catching that the test run is dead.
Other
No response