https://cypress.io logo
Join Discord
Powered by
# help
  • h

    helpful-truck-53930

    08/26/2022, 8:12 AM
    Yeah for me it is possible. And i also can execute the tests. But the tests should also be execute from not developers. So this kind of people doest have any dev tools. They only should execute it. Nothing more. And if i work with the package they get a problem.
  • s

    stale-optician-85950

    08/26/2022, 8:20 AM
    Yikes, not being able to utilise great npm packages makes coding difficult. You could use https://docs.cypress.io/guides/core-concepts/conditional-testing example:
    Copy code
    cy.get('submit button').click();
            cy.get('body').then($body => {
              // check if you need to repeat the click
              if ($body.find('new site selector').length < 0) {
                cy.get('submit button').click();
              }
            });
  • r

    rapid-jackal-81751

    08/26/2022, 8:55 AM
    Hello, I just started with component testing and came across a small issue regarding positioning of the tested component. The component under test is now aligned top, left. Is it possible in component testing to center the component in the viewport via some global config or setting? I now wrapped my component with a div and some inline styling, which I'm not too fond of. (I had to test a dialog that pops up). Thanks!
  • c

    colossal-beard-47656

    08/26/2022, 9:06 AM
    Hello, I am working on cypress+percy implementation. Percy is used for visual-diff testing in our project. Managed to integrate them, execute them and get those results on percy dashboard. I am facing some issues as follows: 1) I get an 413 Payload too large error. I get this when I upload to the percy dashboard. Also understand that the payload cannot be more than 15 MB. is there any way by which we can increase the size of this 2) I want to view the snapshots locally on my Mac. with this https://docs.percy.io/docs/percy-specific-css I might reduce the problem of payload being loo large, by making sure that I get the needed CSS Thanks in advance!
  • r

    red-lifeguard-41652

    08/26/2022, 9:24 AM
    Hi all i am getting login error in cypress from my laptop but when i run the same code in vm system of client it works, can anyone help me with this
  • s

    stale-optician-85950

    08/26/2022, 9:26 AM
    There is a configuration file for overriding Percy default configuration, as documented here https://docs.percy.io/docs/cli-configuration I don't see a value for increasing the payload, so you might need to reach out to Percy's support about that. But you can also use --verbose logging to give you more of an idea of whats happening https://docs.percy.io/docs/debugging-sdks#debugging-sdks
  • c

    colossal-beard-47656

    08/26/2022, 9:28 AM
    @stale-optician-85950 I will try them and let you know the outcome
  • s

    stale-optician-85950

    08/26/2022, 9:37 AM
    Also Percy just introduced specific element capture https://docs.percy.io/docs/screenshot-a-single-element Noting that a 15mb webpage would be considered fairly large. Single element capture could reduce your snapshots size significantly. "I want to view the snapshots locally on my Mac" there is no download button in Percy dashboard, as best you use the browser right click > save image as.
  • c

    calm-fish-12826

    08/26/2022, 9:43 AM
    Hi all, I have an issue with loading a tests in GUI mode. To load single test with 160LoC cypress needs 2-7s, is a way to check what is going on, which thinks take so long there?
  • r

    red-lifeguard-41652

    08/26/2022, 10:53 AM
    Hi All, i am getting timeout error and login is failing when i execute cypress test from my laptop but the same scripts works for virtual machine with same setup. could you please help with this
  • a

    acceptable-hamburger-48790

    08/26/2022, 11:09 AM
    Did you check if you are able to browse that URL/Endpoint in your laptop manually in browser
  • l

    lemon-refrigerator-5269

    08/26/2022, 11:16 AM
    Hi. Can someone help me with how to setup different fixtures for different envioronments. For example, I have two different test environtments and a ci/cd pipeline. All of them have different data on them for various reasons so running the same test on all three would fail. Is there a way to create fixtures that would be automatically used with some custom command? I set up in the cypress.config.js for different envs and that fine but is there a way to, depending on the environment, use different fixtures?
  • n

    nutritious-honey-65632

    08/26/2022, 11:54 AM
    I use this one https://dev.to/poponuts/using-config-files-for-multiple-environment-variables-in-cypress-hn3
  • a

    acceptable-hamburger-48790

    08/26/2022, 11:55 AM
    This is what i do File name under fixture : someetestdata-environmentName.json //Reading fixture file based on environment const resolvedFileName =
    ${fileName}-${Cypress.env("ENVIRONMENT")}
    cy.fixture(resolvedFileName).then((data) => { //Do what you want with data here }) I set the the ENVIRONMENT via --env property
  • c

    colossal-beard-47656

    08/26/2022, 12:01 PM
    Had mailed the percy support, and it seems that they have the 15 MB limitation. this is quite annoying! and the only way do fix it through the code. and regd snapshots , dont think it's a possibility to view them locally.
  • e

    early-librarian-87296

    08/26/2022, 1:38 PM
    Hey, I'm looking for some help with a problem I'm having when logging in using Microsoft login using
    cy.origin()
    on 10.6.0. I have the following code```cy.visit('/'); // Visit a login page hosted by Microsoft on e.g. 'https://x.b2clogin.com' (different to the BASE_URL) cy.origin('b2clogin.com', () => { cy.get('#AzureADExchange').click(); // click button to redirect to login.microsoftonline.com });``` The problem I'm seeing is that 99% of the time this works fine. When it fails the test never ends and we get
    Copy code
    A cross-origin request for <x> was detected
    A command that triggers cross-origin navigation must be immediately followed by a `cy.origin()` command:
    
    `cy.origin('https://b2clogin.com', () => {`
    `  <commands targeting https://<x>b2clogin.com go here>`
    `})`
    Any thoughts/ideas appreciated. TIA
  • l

    limited-agency-13286

    08/26/2022, 1:49 PM
    Does anyone write test cases in cypress for spreadjs/ grape city spread sheet?
  • d

    dry-london-24879

    08/26/2022, 4:49 PM
    Hello. Is it a way to skip test from beforeEach based on some logic without failing test?
    Copy code
    beforeEach(function() {
      if (!shouldRunTest()) {
        this.skip()
      }
    })
  • f

    flaky-intern-13440

    08/26/2022, 5:28 PM
    Hello everyone. Is anyone is able to help me please on a message I posted a week ago? https://discord.com/channels/755913899261296641/763105090679865354/1010356562419777618 Thank you.
  • s

    stale-optician-85950

    08/26/2022, 6:51 PM
    I think you got a tumbleweed response because your scenario is a very edge case. My two cents would be: GitHub Actions runs on Azure and all servers seem to be located in USA regions https://github.com/orgs/community/discussions/24969#discussioncomment-3246032. You can add a build step with curl command
    curl https://ipinfo.io
    to your build steps to see where the server is actually running. So I don't think it will be possible via GitHub Actions. As your client's requirements are to test from a specific geo-location that has strict adherence to the IP, then I would expect the client to pay for VPN or VPS services. A VPN would be enabled on a local machine for mimicking tests being in Canada. Or rent a VPS machine located in Canada and trigger your tests to run there.
  • s

    square-keyboard-75775

    08/26/2022, 7:34 PM
    Hello guys! #763105090679865354 I'm starting with Cypress and I'm having trouble updating the version, the following error happens: Could someone help me, please?
  • p

    powerful-gigabyte-69168

    08/26/2022, 8:23 PM
    My team is trying to set up cypress in AWS Codepipeline and we're having trouble installing dependencies. Per the docs (), we're trying to run
    Copy code
    apt-get install -y libgtk2.0-0 libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 xvfb
    but we're getting an error that it
    apt-get
    can't find
    libgtk2.0-0
    . Has anyone seen this before?
  • f

    flaky-intern-13440

    08/27/2022, 12:58 AM
    Thank you for your input 👍🏾
  • s

    stale-optician-85950

    08/27/2022, 5:33 AM
    One more option is using New Relic synthetics tool to create your tests (only Selenium supported) and select the location as Québec (see attached image).
  • v

    victorious-midnight-45836

    08/27/2022, 12:30 PM
    is there a big difference in executing test on different browsers (electron vs chrome)? tried to dig google search, but I couldnt find clear comparison between those 2 browers (CI/CD workflows)
  • a

    acoustic-printer-33265

    08/28/2022, 4:00 AM
    I'm getting a
    Webpack Compilation Error
    with the
    firebase-admin
    package. I've tried different configurations from my Google searches. Here is the
    pastebin
    for the error: https://pastebin.com/z7GWamcC
  • f

    faint-tiger-98881

    08/28/2022, 8:22 AM
    Hi everyone! I'd like to use cypress API in a .js file that out of cypress directory but I'm getting
    "ReferenceError: Cypress is not defined"
    error. For example, I need to get
    Cypress.browser.version
    property value. How do I fix it?
  • b

    bitter-fountain-36713

    08/28/2022, 2:06 PM
    Your test might be working faster than your app. Having assertions helps avoid this. Have you checked for that?
  • c

    cold-nail-59111

    08/28/2022, 3:29 PM
    hi everyone , is possible to click on google ads using cypress , i tried multiple way but nothing work with me
  • f

    freezing-wall-7568

    08/28/2022, 5:26 PM
    Hello, for those of you who are using Cucumber/BDD with cypress, I have a quick question about using cypress with cucumber and webpack/typescript. If I am using cypress version < 10.0 does that mean I have to use "cypress-cucumber-preprocessor" that used to be maintained by Brain family? or can I use "@freezing-piano-2792/cypress-cucumber-preprocessor" with cypress version < 10.0 too?
1...136137138...252Latest