cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.67k stars 3.16k forks source link

Your tests are loading and never stops loading #29987

Open Enduren opened 1 month ago

Enduren commented 1 month ago

Current behavior

When I have cypress login to salesforce it just has Your Test are loading and it never stops loading. Please help Image salesforceerr

Desired behavior

I want it to open the tests

Test code to reproduce

describe('Login to Salesforce', () => {
  beforeEach(() => {
    // Clear cookies and local storage before each test
    cy.clearCookies();
    cy.clearLocalStorage();
  });

  it('should log in to Salesforce using the UI', () => {
    // Load the username and password from the fixture file

      // Visit the Salesforce login page
      cy.visit('https://test.salesforce.com');

      // Fill in the username and password
        cy.get('#username').type(username);
      cy.get('#password').type(password, { log: false });

      // Submit the login form
       cy.get('#Login').click();

         //click more
    cy.get("body > div.desktop.container.forceStyle.oneOne.navexDesktopLayoutContainer.lafAppLayoutHost.forceAccess.tablet > 
        div.viewport > section > div.none.navexStandardManager > div.slds-no-print.oneAppNavContainer > one-appnav > div > 
       one-app-nav-bar > nav > div > div.more-item.slds-context-bar__item.slds-context-bar__dropdown-trigger.slds-shrink-none 
       > one-app-nav-bar-menu-button > a", {timeout:30000}).click()
    cy.wait(3000);

    //click generate batch file
    cy.get("body > div.desktop.container.forceStyle.oneOne.navexDesktopLayoutContainer.lafAppLayoutHost.forceAccess.tablet > 
             div.viewport > section > div.none.navexStandardManager > div.slds-no-print.oneAppNavContainer > one-appnav > div 
             > one-app-nav-bar > nav > div > div.more-item.slds-context-bar__item.slds-context-bar__dropdown-trigger.slds- 
              shrink-none > one-app-nav-bar-menu-button > div > slot > one-app-nav-bar-menu-item:nth-child(1) > a", 
              {timeout:30000}).click();

  });
});

Cypress Version

13.13.2

Node version

18.13.0

Operating System

windows 10

Debug Logs

No response

Other

No response

jennifer-shehane commented 1 month ago
Enduren commented 1 month ago

@jennifer-shehane after it opens sales force and it only freezes when I go to salesforce

Enduren commented 1 month ago

https://github.com/user-attachments/assets/fbb4a9b6-2089-4fa0-a058-08b599177094

Enduren commented 1 month ago

I tried the same thing with playwright and it works fine

https://github.com/user-attachments/assets/4805fec3-154d-4187-8117-1307d67a82c3

Enduren commented 3 weeks ago

@jennifer-shehane @brian-mann My company is still in conversation of which automation framework(playwright or cypress) to go to depending on this issue please help

jennifer-shehane commented 2 weeks ago

@Enduren I'm unable to recreate the issue with the tests provided, so we're unable to investigate at this point. I haven't seen this issue reported before, but I do know that Salesforce does some very strange things that don't always play nicely with how Cypress is architected.

Enduren commented 2 weeks ago

@jennifer-shehane can you share a video of salesforce working on your end with cypress?

Enduren commented 2 weeks ago

@jennifer-shehane What would cause cypress to continually to load the tests and never stop? Is there a way for us to meet on zoom or teams to troubleshoot this together?

Enduren commented 2 weeks ago

@jennifer-shehane if you look at the cypress record video at 00:22-23 it has a 403 error would that cause cypress to go loading crazy?