https://cypress.io logo
Join Discord
Powered by
# general-chat
  • f

    faint-energy-74313

    04/25/2022, 11:07 AM
    Hello Everyone can anyone tell me i'm stuck at one point i opened the any product from www.amazon.in , new tab gets opened and Cypress get failed i tried "RemoveAttr" but nothing is happened - Solution will help all of us
  • p

    powerful-gigabyte-69168

    04/25/2022, 1:24 PM
    Are you talking about how cypress tests don't let you test across separate tabs?
  • f

    faint-energy-74313

    04/25/2022, 1:25 PM
    Yes i dnt want to test in separate tabs , but when specific website www.amazon.in used then it always regret to new tab
  • f

    fresh-doctor-14925

    04/25/2022, 1:37 PM
    Cypress isn't going to get multiple tab support, they've said as much in their docs: https://docs.cypress.io/guides/references/trade-offs#Multiple-tabs If you want to continue using Cypress for your use case, you'll need to think of some ways to refactor. For example: do you need to click on the product on the homepage? You could have one spec making assertions on the links on the homepage, and another spec that goes directly to the product URL. That will enable you to carry out your steps in the single tab
  • d

    dry-furniture-93469

    04/25/2022, 8:34 PM
    Replace window.open:
    Copy code
    js
    const main = window.open;
    
    window.open = (a, b) => main(a, b);
  • s

    silly-dentist-68907

    04/25/2022, 8:36 PM
    In case you all missed it, check out our #958013993425960971 channel for our most recent and exciting update about cy.origin. https://discord.com/channels/755913899261296641/958013993425960971/968247417080270859
  • s

    sparse-insurance-21987

    04/26/2022, 11:13 AM
    Hello Everyone, I am getting error message for browser version outdated when trying to execute the test case on cypress. I have cross checked that I am using the latest browser in my machine. Can anyone let me know what can be the reason for the same
  • m

    microscopic-wall-16983

    04/26/2022, 8:47 PM
    Hey everyone! I just joined your community and need help:) I’m working on to creation of a Cypress Cucumber framework with pom design. It’s my first time using Cypress. I have 4 feature files for now that I want to run in sequence, and one of features should run on different url, so I have 2 urls. It’s a chat and I’m trying to have 2 users connected 🙂 So my first question, how can I have my features running in sequence in a browser, and second - how can I open a new window for 2nd url to see the output
  • c

    colossal-table-17032

    04/26/2022, 11:09 PM
    Hey all! Is there a way to interact with Cypress Dashboard via API commands? My use case is: I'd like to get the Cypress Run Url right after trigerring a run, without waiting for the run to be completed towards the very end
  • s

    strong-fountain-30659

    04/28/2022, 8:37 AM
    this does not look like a message coming from cypress. looks like some script on your site thinks the browser is outdated - might be the Chrome Version "100" or other bad User Agent Sniffing Code… https://9to5google.com/2021/12/28/google-chrome-100-break-websites-solutions/ Do you see the same popup when you visit the website in Chrome directly (without using Cypress) - might want to open an Incognito Session 😉
  • a

    able-monkey-72947

    04/28/2022, 2:49 PM
    This is a pretty weird question, but do you all test your custom
    cy
    commands? And if so, how? Do you use Cypress to test Cypress? Or something like Jest?
  • r

    rough-monitor-85122

    04/28/2022, 3:00 PM
    I'd say it depends on your purpose. If it's for redistribution / as a library, it would make sense to test it, and I'd probably do it directly in Cy, testing 'real uses'. Custom commands for my own project... probably not. The usage of the command would be implicitly testing it, and tests directed at the command itself probably wouldn't add much value.
  • a

    able-monkey-72947

    04/28/2022, 3:01 PM
    It's for a thing at work, so I feel like its important to make sure it works lol. But yeah, not for a library, which is why I'm kind of up in the air about whether this needs a test. If you were going to test a command though, you'd do it from within Cypress and not another testing tool?
  • r

    rough-monitor-85122

    04/28/2022, 3:04 PM
    Yeah. Cypress itself has a ton of tests over its built in commands, could look there for inspiration. https://github.com/cypress-io/cypress/blob/develop/packages/driver/cypress/integration/commands/actions/selectFile_spec.js as a random example.
  • a

    able-monkey-72947

    04/28/2022, 3:06 PM
    Ah, that, that's a great start. I've got some unit tests running in Cypress for a personal project and I was going to start there but this is much better. The frustration I'm running into going the Jest route is that I can't really get the
    cy
    object from anywhere so I'm having to mock every method from scratch.
    const { _, $ } = Cypress
    in that test you linked already looks like that's going to be super helpful.
  • r

    rough-monitor-85122

    04/28/2022, 3:07 PM
    I always consider mocks to be something of a code smell. Occasionally necessary, but the more of them there are, the bigger a sign something's gone wrong.
  • r

    rough-monitor-85122

    04/28/2022, 3:08 PM
    (I'm very opinionated about mockingl 🤣 )
  • a

    able-monkey-72947

    04/28/2022, 3:09 PM
    No, I agree. Jest has
    jest.createMockFromModule('...')
    , which is a great way to spy on package code... but I'm doing SO MUCH mocking in my test is why I thought it was a good time to step back and ask some higher level questions.
  • g

    gifted-lizard-256

    04/29/2022, 8:40 AM
    Hello i've a requirement, it goes like this i want my cypress application to use certain amount of ram size for which i need to set max-old-space-size but how to set to below command? cmd /c npx cypress run *****************
  • g

    gifted-lizard-256

    04/29/2022, 8:42 AM
    @mysterious-analyst-56660 you guys might be having an existing option to set max-old-space-size, let me knowif there are any!
  • s

    stale-optician-85950

    04/29/2022, 10:21 AM
    You do it via a CI step:
    Copy code
    - name: Some step
            run: |
              cd your/project/path
              export NODE_OPTIONS="--max-old-space-size=8192"
              cmd /c npx cypress run *
  • g

    gifted-lizard-256

    04/29/2022, 12:53 PM
    Basically by doing that you are applying max-old-space-size to parent process, i've verified, parent process max-old-space-size is respected by child process as well, so this works. i've one question in similar lines, we can verify ram size alloted for child process by using "v8" library, how can we check in browser env.(npx cypress run)?
  • f

    flaky-fall-49668

    04/29/2022, 1:30 PM
    Hi quick question, how come cypress tests are slow to run on M1 Mac Machines?
  • a

    astonishing-city-18705

    04/29/2022, 6:56 PM
    There's work that needs to be done to optimize Cypress on M1 Machines which we hope to prioritize soon. https://github.com/cypress-io/cypress/issues/19908
  • f

    flaky-fall-49668

    04/29/2022, 7:19 PM
    So in the meantime I suppose intel chips are the way to go?
  • n

    narrow-glass-55583

    04/30/2022, 2:21 PM
    Cypress Fail to Check Background Of Element, when user click on a title, i add indicator on the right with background prop. when i check background of clicked element cypress add more attribute.
  • a

    adventurous-country-21192

    04/30/2022, 9:04 PM
    I can't imagine cypress is adding attributes
  • a

    adventurous-country-21192

    04/30/2022, 9:04 PM
    How does your test code look like?
  • a

    adventurous-country-21192

    04/30/2022, 9:05 PM
    Did you use cy.debug() and checked in dev tools what the processed properties are?
  • s

    sparse-cpu-70188

    05/01/2022, 11:27 AM
    perhaps you are first clicking the element "General" to have it in focus and then identifying the Background attribute
1...383940...127Latest