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

    fresh-doctor-14925

    11/15/2022, 11:24 AM
    > my nested Describes are dependent adding
    only
    will not help you here. Your issue is that you have nested describes that depend on each other. No
    it()
    block should depend on another
    it()
    block The only way I can think that you can achieve your aim would be to put it all into one large
    it()
    . Then the execution would stop as soon as it hit a failure condition. While it solves your current problem, it's far from ideal. The better solution would be to design your spec in a way that no
    it()
    or
    describe()
    depends on earlier scenarios
  • i

    incalculable-rainbow-43330

    11/15/2022, 11:54 AM
    iam trying to make something like to have one flag named isFailed and planning to set it to true in case of error Cypress.on("fail", (err, runnable) => { isFailed = true; throw err; //keeps the original error }); then call beforeEach(function () { if (isFailed) { // Skip test cases on failure this.skip(); } }); as the isFailed is in total spec file automatically all describes will run BeforeEach and as the isFailed flag is true it will skip everything iam testing it i hope it will work for me rather than re assembling my code into one IT block please let me know your thoughts if any thank you 🙂
  • f

    fresh-doctor-14925

    11/15/2022, 12:21 PM
    @incalculable-rainbow-43330 I understand what you're trying to do, but as I've mentioned above the real issue here is that you have so much interdependency between your scenarios. It's a documented anti-pattern in Cypress, and in my opinion your test suite would benefit more from solving the root cause. Skipping scenarios because one failed doesn't make sense to me. Then you're just losing coverage
  • i

    incalculable-rainbow-43330

    11/15/2022, 12:28 PM
    @fresh-doctor-14925 our intension is to collect all the information of failing specs so that we can run all of them again we are just grouping our test suit as nested because we are trying to distribute our test suits to each of the module and making all of them belong some where else rather than in one spec file i think for general usage it looks like anti-pattern but its useful in case you want to keep your code in seperate places just like how developers keep their code in respective classes and methods and simply call when needed in the same way iam trying to call describes as nested and trying to reuse it may be mine is odd requirement 🙂
  • g

    gray-kilobyte-89541

    11/15/2022, 12:28 PM
    https://github.com/javierbrea/cypress-fail-fast
  • i

    incalculable-rainbow-43330

    11/15/2022, 12:29 PM
    @gray-kilobyte-89541 let me try it 👍
  • f

    fresh-doctor-14925

    11/15/2022, 12:36 PM
    It's not about how you've structured your
    describe()
    blocks. It's that each should be able to run in isolation. One failing describe should not mean that the other describes will fail. Hence there shouldn't be a need to skip. But anyway, the plugin above looks like it will suit your use case
  • p

    polite-potato-14743

    11/15/2022, 3:15 PM
    just upgraded from 9 to 11 😛
  • l

    loud-magician-68396

    11/15/2022, 3:20 PM
    Any specific reason? Because I'm running 9 and I've played with 11.
  • c

    cool-jewelry-73148

    11/15/2022, 3:24 PM
    Hi Team, Good day! Im new to Cypress and while running my facing one issue https://stackoverflow.com/questions/74444092/chatbox-dialogbox-using-cypress-fails?noredirect=1#comment131418693_74444092
  • b

    big-kangaroo-22502

    11/15/2022, 5:00 PM
    Hello Folks, Does anyone used Cypress to automate test cases for ADOBE AEM authoring instance ? If any, can you share me the best approach to test the authoring part ? Is it good approach to automate test data (add a component with a config to a page) ou should i keep it manuel ?
  • p

    polite-potato-14743

    11/15/2022, 7:33 PM
    just didnt want to get too far behind. Having random issues all the time and thought bumping up 2 major releases might alleviate some.
  • l

    loud-magician-68396

    11/15/2022, 7:34 PM
    Have you had any issues with 11 not wanting to start up?
  • h

    happy-dinner-13480

    11/16/2022, 2:39 PM
    I can't seem get this to run. in my
    cypress/support/index.ts
    I import the plugin:
    import 'cypress-fail-fast/plugin';
    this is the
    e2e
    configuration:
    Copy code
    e2e: {
            env: {
                API_URL: '**',
                CYPRESS_PASSWORD: '**',
            },
            supportFile: 'cypress/support/index.ts',
            baseUrl: 'http://localhost:4200',
            experimentalInteractiveRunEvents: true,
            setupNodeEvents(on, config) {
                plugin(on, config);
            },
        },
    but the plugin doesn't seem to do anything, in a failing spec it still runs all the tests (including waits for elements etc.)
  • g

    gray-kilobyte-89541

    11/16/2022, 2:44 PM
    I guess I will prepare a lesson in my https://cypress.tips/courses/cypress-plugins about this plugin
  • h

    happy-dinner-13480

    11/16/2022, 2:44 PM
    I've also added it to my
    cypress/tsconfig.json
    Copy code
    {
      "extends": "../tsconfig.json",
      "include": [
        "**/**/*.ts"
      ],
      "compilerOptions": {
        "sourceMap": false,
        "types": [
          "cypress",
          "node",
          "cypress-file-upload",
          "cypress-real-events",
          "cypress-fail-fast/plugin"
        ]
      }
    }
  • h

    happy-dinner-13480

    11/16/2022, 2:45 PM
    it's a bit strange that without the
    /plugin
    in the import, Cypress does complain that the task is unavailable, but when I adde it, Cypress doesn't complain, but it doesn't seem to do anything. oh well, guess I'll open a ticket in the repo 🙂
  • m

    magnificent-memory-85975

    11/16/2022, 8:32 PM
    Hello there, Im currently trying to setup the cypress dashboard so I can see my test result from Jenkins build into the Cypress dashboard. Im not sure what to add in my configuration file to have this to work, as I dont want to break my Jenkins build setup in Cypress 🙂 Thanks.
  • g

    gray-kilobyte-89541

    11/16/2022, 8:53 PM
    cypress run --record
    and add Cypress project ID to your cypress.config.js and set the
    CYPRESS_RECORD_KEY
    is a environment variable on Jenkins
  • a

    ancient-activity-75783

    11/17/2022, 12:29 AM
    Hello there, l am new to Cypress. How do you write the path to import page ? I do copy paste from another page or test , but it gives webpack Compilation Error. Could you help me please? Thanks
  • h

    happy-dinner-13480

    11/17/2022, 10:28 AM
    In the end it was a configuration error: https://stackoverflow.com/questions/74461587/cypress-fail-fast-not-skipping-tests-after-a-failed-test/74473319#74473319
  • m

    mysterious-wall-17437

    11/17/2022, 12:39 PM
    Hi Guys I just need a small clarification related to cypress version 11 and 11.1.0. . . Here is my simple code it("",()=>{ cy.visit("/") cy.get(".dashboard").click() cy.get("button").contains("Sign in with Google").click(); //cy.get("#identifierId").type("Pakistan") cy.origin("https://accounts.google.com", ()=>{ cy.get("#identifierId").type("Testuser") }) }) where user clicking on Sign in with Google button and should navigate user to https://accounts.google.com which we can handle using cy.origin command. . I have tested it and working fine for cypress 10.10.0 But I updated to version 11 and when user click on "Sign in with Google" button . . The url doesn't update in browser and Cypress return timeout error after 6000ms. Even same stuff is working fine in cypress 10.10.0 I just want to know is anything change in V 11.1.0 related to cy.origin. Or what kind of issue it is.
  • a

    able-painting-97388

    11/17/2022, 1:28 PM
    Silly question thats been bugging me lightly for months...When I perform intercepts successfully I will have hollow green circles 99% of the time, and 1% of the time i'll have hollow blue circles...whats the difference between green and blue?
  • s

    some-controller-43140

    11/17/2022, 1:48 PM
    Hi all, Query - How to resolve cypress absolute path issue ? Can someone please help me out here. ReactJS project - version 16.13.0, using cypress version - 10.3, "webpack": "^5.70.0", No typescript facing error while running cypress open for component testing. .................................................................................................................................................................. Error start The following error originated from your test code, not from Cypress. Cannot find module 'state/cart/operations' When Cypress detects uncaught errors originating from your test code it will automatically fail the current test. Cypress could not associate this error to any specific test. We dynamically generated a new test to display this failure. Error End ..................................................................................................................................................................
  • f

    fresh-doctor-14925

    11/17/2022, 2:04 PM
    !duplicate
  • n

    nutritious-analyst-96582

    11/17/2022, 2:04 PM
    Uh oh, It looks like you have posted the same question in multiple channels. Help us prevent spam by removing any duplicates of your questions, Thanks! 😀
  • s

    some-controller-43140

    11/17/2022, 3:33 PM
    @fresh-doctor-14925 - any solution for https://discord.com/channels/755913899261296641/763114122065739818/1042798454834995261
  • l

    loud-telephone-11500

    11/17/2022, 4:09 PM
    I want to use multiple data of page using cypress in single test case and concatenate those data, can someone help
  • f

    fresh-doctor-14925

    11/17/2022, 4:09 PM
    I haven't, but please don't post the same message in multiple channels. It just adds noise There have been several discussions around how to do absolute paths in this Discord. I suggest you search through those; one of them may have a solution that will work for you
  • f

    fresh-doctor-14925

    11/17/2022, 4:22 PM
    Hi, it's a little unclear what you're asking for here. Could you give some more detail for your use case? Are you talking about page scraping?
1...929394...127Latest