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

    powerful-orange-86819

    03/29/2022, 10:36 AM
    cypress.env is your friend look it up, its designed exactly for that scenario
  • p

    powerful-orange-86819

    03/29/2022, 10:37 AM
    you can even dynamically change and add variabls to it and use it for separate tests, not just specs/suites
  • p

    polite-alarm-78904

    03/29/2022, 2:43 PM
    I have environment variables set up, but I want to create new variables based on the content of the env variables. And then use those for each spec. Some parameters will change between specs, so I want to redefine the values before running the tests. Does that make sense?
  • p

    polite-alarm-78904

    03/29/2022, 2:50 PM
    USER_1 and USER_2 have their own config files. So before running the tests I select the config file for that user. I basically want to check if the environment variable for USER_1 or USER_2 exists, and then dynamically generate this file (IMG) before each spec.
  • b

    billowy-bird-41053

    03/29/2022, 8:51 PM
    Does anyone have any experience using Cypress with Dynamics/powerapps/portals? We're considering using Cypress because it looks like a great tool but doesn't seem to mention Dynamics or DevOps much from what I can see.
  • p

    powerful-orange-86819

    03/30/2022, 6:30 AM
    Its an web app with an API? Then cypress handles it, also it can be run in the Azure CI, i've seen many examples online
  • r

    rich-judge-89730

    03/30/2022, 10:23 AM
    I have 'data-cy' attribute to target a specific element. But when the test runs and trigger a click for the element, I get an error that multiple events yielded so the click fails. I am not sure why it's returning multiple elements although I am using 'data-cy'
  • a

    acceptable-solstice-90676

    03/31/2022, 10:30 PM
    Hello everyone, I think I am confused and wrong with
    cy.session
    I thought that if I use it on the API, and then I was visiting an URL, the user would be already logged in, but is sending me to the login screen again, so what is the point of using this through the API?
  • a

    acceptable-solstice-90676

    03/31/2022, 10:36 PM
    I am also noticing that when I use
    cy.session
    through the UI, the test is around 3 seconds slower
  • g

    gray-kilobyte-89541

    04/01/2022, 12:46 PM
    FYI: take this psychological quiz to see which Cypress command matches your personality https://cypress.tips/which-cypress-command-are-you
  • p

    powerful-orange-86819

    04/01/2022, 2:45 PM
    i'm depricated ๐Ÿฅบ
  • b

    best-flower-17510

    04/01/2022, 6:38 PM
    I am Twins with @User
  • p

    powerful-gigabyte-69168

    04/03/2022, 12:39 PM
    I just got my cypress tests running in CI and Iโ€™m so excited about it!
  • p

    powerful-orange-86819

    04/04/2022, 12:03 PM
    congratz, can't wait to see you in help section with retryability issues ๐Ÿ˜„
  • p

    powerful-gigabyte-69168

    04/04/2022, 12:07 PM
    Haha yeah we will see. Iโ€™ve been running the tests headlessly in localhost for a few months now as a part of my regular workflow. I definitely had a number of retry ability issues causing flaky tests when I started running them headlessly, but itโ€™s been pretty reliable for a while now. Almost all my issues were a failure to interleave DOM assertions in between request-making cypress commands
  • p

    powerful-orange-86819

    04/04/2022, 12:11 PM
    Yea same experience, but i was running my tests locally for like 8 months, before the CI, got tons of issues after that and it was pain to rework them, hopefully i've now fixed all and gained a lot of knowledge while doing so.
  • p

    powerful-gigabyte-69168

    04/04/2022, 12:23 PM
    Hereโ€™s hoping itโ€™s manageable ๐Ÿคž
  • p

    powerful-gigabyte-69168

    04/04/2022, 12:23 PM
    So far the only test failures in CI have been legit breaking changes that needed fixing. The dream haha
  • m

    mammoth-army-44584

    04/05/2022, 8:06 AM
    I would like to add some context on each fail by getting some localstorage data and log that.. but not really sure how I can do it In index.ts I added
    Cypress.on('fail', (error, runnable) => {})
    and there I do
    const cart = localStorage.getItem('cart');
    and try to log it but now luck.. guess that I need to fetch it async but not able to get it to work :/
  • w

    wide-hospital-71307

    04/05/2022, 12:01 PM
    quick question, does cypress have some kind of inner working that chooses the first instance of an ID (when there is the same ID used for multiple elements) and does actions on it, instead of errorring, like it does for classes that are present multiple times?
  • b

    better-engineer-26463

    04/05/2022, 12:08 PM
    you should be able to chain .first() @User
  • w

    wide-hospital-71307

    04/05/2022, 12:10 PM
    yes, but i was confused earlier, used an id, test worked, then i noticed it's not the only place where the same ID is used, so I was wondering why it did not complain like it usually does when it finds multiple of the same element. hence why I was wondering if, for IDs, the .first is assumed
  • p

    powerful-orange-86819

    04/06/2022, 6:49 AM
    what do you mean by contex? Cypress by default have a very good error messages when something fail
  • k

    kind-tiger-34950

    04/06/2022, 5:38 PM
    Hi community, I'm wondering if there's an easy way to simulate validation when Javascript is disabled. I thought about using an extension to disable javascript. But not sure how to access chrome:/extensions to enable/disable the extension. Has anyone implemented some validation like this?
  • m

    melodic-xylophone-42444

    04/06/2022, 5:40 PM
    Could we create a "best practices" channel? It seems like a lot of people want to talk about that topic ๐Ÿ™‚
  • s

    sparse-notebook-44714

    04/06/2022, 5:40 PM
    Hello! Currently watching the Cypress Best Practices chat and got the Discord link from there
  • p

    proud-gpu-14798

    04/06/2022, 6:04 PM
    If you're not using Page Objects how are you managing element locators? Just re-typing them over and over (and over) in all of your tests?
    cy.get("myLocator");
  • b

    best-flower-17510

    04/06/2022, 6:05 PM
    @everyone Lets keep the conversation going ๐Ÿ™‚ Drop your #961325024114008064 in the post-event server! See you there.
  • f

    fierce-candle-14385

    04/06/2022, 6:09 PM
    Hello, new here and saw this from cypress session today! Glad to found this community. Hope I can learn from everyone and contribute also my learnings here ๐Ÿ™‚
  • l

    lemon-zebra-38424

    04/06/2022, 6:10 PM
    Hello, new here and new to Cypress also!!!
1...343536...127Latest