https://cypress.io logo
Join DiscordCommunities
Powered by
# e2e-testing
  • a

    acceptable-hamburger-48790

    10/06/2022, 3:09 PM
    or @freezing-piano-2792 might have some answers
  • b

    bitter-fountain-36713

    10/06/2022, 3:10 PM
    No, this is cypress.io
  • n

    nice-bear-8793

    10/06/2022, 3:29 PM
    Thanks for your reply Xavier. I have tried the free tier. I want to try integrating our self-managed Gitlab with Cy dashboard as in Cy Teams. Would like to know if there is any possibility for trial
  • i

    incalculable-agent-76161

    10/06/2022, 5:04 PM
    Hai all, I'm facing an issue in selecting a value from static dropdown(select tag). Please find the issue in code and help me to select India as value.
  • g

    great-london-82425

    10/06/2022, 6:09 PM
    Not sure if this is the right channel. But has anyone run Cypress on CircleCI? I'm trying to add a 120 second wait and not sure of the parameter for that. Am trying to use it within command paramter.
    Copy code
    - cypress/run:
              name: Environment Tests 
              executor: with-chrome
              browser: chrome
              install-command: yarn install --frozen-lockfile && bundle
              command: yarn cypress run --config-file [location] && sleep 120
  • g

    gray-kilobyte-89541

    10/06/2022, 6:13 PM
    wait for what?
  • g

    great-london-82425

    10/06/2022, 6:15 PM
    We have a delay with Netlify so I want to wait 2 minutes before tests run on our staging server. The tests aren't run locally (we have another workflow for that).
  • c

    crooked-zebra-94702

    10/06/2022, 6:18 PM
    Hello. I was pointed here by Customer Service. I have the requirement so a run a test on a web site, simulating a user flow. Basically going through a few pages. I would like to be able to simulate network speeds (3G, 4G,, 5G).. Is that doable? Is this maybe as simple as passing a parameter to cypress run --config ?
  • g

    great-london-82425

    10/06/2022, 6:20 PM
    I see there's a wait-on parameter but wasn't sure if it was that was meant for local servers only.
  • c

    crooked-zebra-94702

    10/06/2022, 6:23 PM
    a "wait-on" would be more of an artificial pause, right? It wouldn't really tell much about performance. I am new to cypress so I wonder if there is a way to do this since on chrome you can toggle between network speeds on the dev tool/inspector
  • g

    great-london-82425

    10/06/2022, 6:46 PM
    Thank you, @crooked-zebra-94702. I am trying to transition away from GitHub Actions. There I used someone's GitHub repo (wait-for-netlify-action) as a customized step for the wait action but I think that was GitHub Actions specific. Not sure if that's needed with Circle CI. Probably not what you're looking for but wonder if you use cy.intercept to get network requests and add cy.wait for specific time periods to simulate the network speeds you want. That'd be great if there was a network speed paramter.
  • m

    mysterious-belgium-25713

    10/06/2022, 8:38 PM
    Wait-on should also wait on deployed services outside of the localhost area. You could see this step as a health checker before your test are ran. I don't know if there is a timeout how long it will wait
  • c

    chilly-queen-22182

    10/06/2022, 8:39 PM
    Hi Guys, Is there any way to check in Cypress that Same Api called have been made n number of times?? Please help
  • f

    flaky-raincoat-53097

    10/06/2022, 8:53 PM
    Hi all! I'm trying to test this site: https://www.businessinsider.com/ikea-nyc-store-planning-studio-tour-2019-4 and I want to test this facebook button.
  • f

    flaky-raincoat-53097

    10/06/2022, 8:53 PM
    the thing is that it opens a pop up window.. like this.
  • f

    flaky-raincoat-53097

    10/06/2022, 8:54 PM
    and I just want to assert that effectively I reached the facebook page. I was thinking to assert the urls but I just don't know how to do it because I can't switch to a child window. can somebody help me with some ideas to test this?
  • f

    flaky-raincoat-53097

    10/06/2022, 8:54 PM
    Thanks
  • j

    jolly-dusk-6729

    10/07/2022, 1:02 AM
    Hello, I'm trying to do salesforce ui automation with Cypress, but the test stops abruptly without any logs or error messages. I suspected it was due to cross-domain, but I'm not sure. Sharing the code as well as the error video.
    Copy code
    login.spec.ts file
    import SalesforceLoginPage from "../../pages/salesforceLogin";
    describe('Logging in to salesforce', () => {
        before('visit the sign in page', () => {
            SalesforceLoginPage.open();
        });
        it('log in to salesforce', () => {
            cy.log(Cypress.env("salesforce_username"));
            SalesforceLoginPage.typeUsername(Cypress.env("salesforce_username"));
            SalesforceLoginPage.typePassword(Cypress.env("salesforce_password"));
            SalesforceLoginPage.pressSignIn();
        });
    });
    ----------------------------------------------------------------------------
    salesforceLogin.ts file
    const USERNAME_FIELD = '#username';
    const PASSWORD_FIELD = '#password';
    const SUBMIT_BUTTON = 'input[type=submit]';
    const APP_LAUNCHER = '.salesforceIdentityAppLauncherHeader';
    class SalesforceLoginPage {
        static open() {
            cy.visit(Cypress.env('salesforce_login_url'));
        }
        static typeUsername(username: string) {
            cy.get(USERNAME_FIELD).type(username)
        }
        static typePassword(password: string) {
            cy.get(PASSWORD_FIELD).type(password)
        }
        static pressSignIn() {
           return cy.get(SUBMIT_BUTTON).click()
        }
        static appLauncher(){
            cy.get(APP_LAUNCHER).click();
        }
    }
    export default SalesforceLoginPage;
    salesforce_login_url is the instanceUrl of the salesforce of my account. I can see the test running until the login happens, and then it just stops abruptly before it gets to the App Launcher button. Please help. https://app.usebubbles.com/gcK8SrcSxvEFeNmKDBkfWz/cypress-salesforce-login-s-video-recording
  • r

    rich-furniture-95354

    10/07/2022, 11:35 AM
    Hi All ...scrolling is not working after changing viewport to (1440,850)
  • r

    rich-furniture-95354

    10/07/2022, 11:42 AM
    Does anyone have experience with this?
  • n

    nutritious-zoo-35798

    10/07/2022, 12:20 PM
    hi there, i have a button which i want to click doing the following : cy.get("#extra-consent").click(); the problem is that the button isnt always there on the journey. so i want to do some conditional rendering and be like if (button is there) { cy.get("#extra-consent").click(); } otherwise dont click and carry on. whatever i have tried has failed. any suggestions please?
  • g

    gray-kilobyte-89541

    10/07/2022, 12:30 PM
    If you search https://cypress.tips/search for conditional testing, you could find a few solutions
  • w

    white-activity-68996

    10/07/2022, 1:53 PM
    Hi, how to close the print dialog in cypress, I have tried code in this link https://stackoverflow.com/questions/58549877/how-can-i-close-a-open-print-window-in-cypress-using-javascript-function @great-london-82425 @gray-kilobyte-89541 @nutritious-zoo-35798 @rich-furniture-95354 @jolly-dusk-6729 @flaky-raincoat-53097 @chilly-queen-22182 @mysterious-belgium-25713 @crooked-zebra-94702
  • g

    great-london-82425

    10/07/2022, 6:29 PM
    Thank you, Xavier! Gonna try wait-on and see how it goes.
  • f

    fierce-easter-87739

    10/07/2022, 8:11 PM
    I had a similar issue and I believe the fix was to make sure you persist whatever cookie your sign-in behavior creates in a beforeEach block after the initial visit. That is if you are visiting urls in different it() blocks. If a single test, my guess would be to make sure to intercept the redirect call and pass creds in the redirect as well. Most likely the creds you feed in the initial visit, are not being sent when navigating back/redirect / or could be the cookie thing again in this scenario as well. Hope this helps!
  • p

    polite-painting-51763

    10/07/2022, 10:28 PM
    I have written a custom command in the end i am trying to return using cy.wrap(elToReturn). If this expression is undefined then I want to execute entire command again. Is there any way in Cypress where we could run entire command again. I gave a try using Cypress recurse plugin, but i don't know how can I supress timedout error.
  • a

    agreeable-scooter-87343

    10/08/2022, 4:41 AM
    Can you please share reason of moving away from GitHub Actions?
  • n

    narrow-artist-87113

    10/08/2022, 8:47 AM
    Any idea on why this might be happening? most of the time, two things happen 1. When type('Testing-7') then first whole thing will be type but after that only certain slice of string will only be present 2. After type('Testing-7') whole string will disappear
  • m

    mysterious-belgium-25713

    10/08/2022, 11:18 AM
    It's the xhr request. You are already typing before the request is done. So you have to create a cy.intercept() on that route. Wait before its done and then start typing. The xhr request causes a refresh on the page because it's fetching the branch name
  • n

    narrow-artist-87113

    10/08/2022, 11:24 AM
    Got it, thanks again @mysterious-belgium-25713, it worked!
1...116117118...192Latest