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

    cuddly-thailand-33926

    07/22/2022, 4:53 PM
    If I use Sauce labs is there any use to TestRail?
  • f

    future-gold-77198

    07/22/2022, 6:16 PM
    Is there some reasoning behind why there is Cypress.config('keystrokeDelay', 1) and Cypress.Keyboard.defaults({ keystrokeDelay: 0 }). It also doesn't work to set keystrokeDelay to '0' using config, but it does work when using Keyboard.defaults, which seems odd... Anyway, not a big deal, but it took me some time to figure this out and work through it, even though they are in the docs to a good degree. The fact that both option names are 'keystrokeDelay' made finding both harder I think.
  • f

    future-gold-77198

    07/22/2022, 6:25 PM
    Also, is there a really straightforward way to set the keystrokeDelay to be different based on whether the test is running in open mode vs cypress run mode? I'm thinking there should be with env vars or something at least...
  • f

    future-gold-77198

    07/22/2022, 6:34 PM
    Maybe Cypress.isBrowser with isHeaded option?
  • s

    strong-energy-6158

    07/23/2022, 6:26 AM
    I am new to cypress. I was trying to learn mixing of sync and Async commands. Can you please let me know why the commands given inside if the condition is not printing even the if condition satisfies? ( It prints only the commands given in else condition) it('Sync and Async command', () => { cy.visit("https://www.gov.uk/") if (cy.get('body').find("h1").length) { cy.log('found selector by cy command') console.log('found selector by console command') } else{ cy.log('didnt find selector by cy command') console.log('didnt find selector by console command') } })
    s
    g
    • 3
    • 5
  • s

    stale-optician-85950

    07/23/2022, 8:36 AM
    I am new to cypress I was trying to
  • s

    swift-kitchen-62493

    07/23/2022, 3:35 PM
    does someone know how can i get veryfication maila from gmail via cypress?
  • t

    tall-appointment-66718

    07/24/2022, 9:49 AM
    Is there a way to close this window without closing the testing window?
  • f

    freezing-piano-2792

    07/24/2022, 1:18 PM
    I hope there will be and perhaps an option to skip it altogther
  • f

    freezing-piano-2792

    07/24/2022, 1:18 PM
    It offers nothing and a whole extraneous window is a lot of noice
  • f

    freezing-piano-2792

    07/24/2022, 1:19 PM
    It's unequivocally trash behavior
  • h

    handsome-lion-1748

    07/24/2022, 4:10 PM
    Hi, I'm trying to use Cypress e2e with Cucumber, but it seems Cypress 10 changed some configs so I can't follow the tutorials (like this:https://codenboxautomationlab.com/cucumber-bdd-in-cypress) anymore since there's no
    plugins
    folder and
    cypress.json
    file, what should I do? just create them or what? thanks.
  • f

    freezing-piano-2792

    07/24/2022, 4:18 PM
    @handsome-lion-1748 https://github.com/badeball/cypress-cucumber-preprocessor/tree/master/examples
  • h

    handsome-lion-1748

    07/24/2022, 4:27 PM
    Thanks a lot @freezing-piano-2792 I'll take a look
  • h

    handsome-lion-1748

    07/24/2022, 4:47 PM
    I'm adding cypress to a next.js project, so what example should I look at? since the one with webpack for example is mentioning it in the configs and it seems not right.
  • f

    freezing-piano-2792

    07/24/2022, 4:54 PM
    Any of them, next.js is irrelevant, provided that you're not doing component testing
  • f

    freezing-piano-2792

    07/24/2022, 4:54 PM
    I recommend picking esbuild unless you have peculiar requirements (you probably don't)
  • h

    handsome-lion-1748

    07/24/2022, 4:57 PM
    What I'm struggling to understand: import { defineConfig } from "cypress"; import createBundler from "@gray-kilobyte-89541/cypress-esbuild-preprocessor"; import { addCucumberPreprocessorPlugin } from "@klaveness/cypress-cucumber-preprocessor"; import createEsbuildPlugin from "@klaveness/cypress-cucumber-preprocessor/esbuild"; these imports do they just work out of the box?
  • f

    freezing-piano-2792

    07/24/2022, 4:59 PM
    You mean without installing the modules? No, they do not
  • h

    handsome-lion-1748

    07/24/2022, 5:00 PM
    @freezing-piano-2792 So it's not just installing cypress and your cucumber-preprocessor I need to install other things that I'm not sure are mentioned anywhere
  • h

    handsome-lion-1748

    07/24/2022, 5:01 PM
    @freezing-piano-2792 sorry I'm not trying to sound rude. As a newbie in cypress trying to use Cucumber it's a bit hard to start doing that since multiple things need to be set up and the new version of Cypress turned other resources obsolete
  • f

    freezing-piano-2792

    07/24/2022, 5:02 PM
    Every module is mentioned in the package.json of every example
  • h

    handsome-lion-1748

    07/24/2022, 5:03 PM
    Cool! now I see 😄 That's very nice I also don't have lots of development experience so I didn't think about that, thanks a lot I'll try now
  • t

    tall-appointment-66718

    07/24/2022, 7:08 PM
    Hey yall, do you can think of a way to have more files like commands.js?
  • n

    nutritious-honey-65632

    07/24/2022, 8:08 PM
    I have the whole folder with commands files
  • s

    stale-optician-85950

    07/24/2022, 9:26 PM
    I have separate support files too, you just need to import them into the main support file. Which in v10 for me is
    /support/e2e.ts
    and import these other files like so
    import './index.search';
  • n

    nice-soccer-53564

    07/25/2022, 1:56 AM
    Thank you so much @adorable-smartphone-87280 and @adventurous-dream-20049 I tried doing this but I'm getting type errors in my
    cypress.conf.ts
    at
    after:spec
    Copy code
    `
    No overload matches this call.
      The last overload gave the following error.
        Argument of type '"after:spec"' is not assignable to parameter of type '"task"'.ts(2769)
    This is my snippet for
    cypress.conf.ts
    . I'd really appreciate some help here, Not sure if this is a known bug?
    Copy code
    e2e: {
        setupNodeEvents(on, config) {
          on('after:spec', (spec, results) => {
            if (results && results.video) {
              // Do we have failures for any retry attempts?
              const failures = some(results.tests, test => {
                return some(test.attempts, { state: 'failed' })
              })
              if (!failures) {
                // delete the video if the spec passed and no tests retried
                return deleteSync(results.video)
              }
            }
          })
    
          return require('./cypress/plugins/index.js')(on, config)
        },
      },
  • n

    nice-soccer-53564

    07/25/2022, 1:59 AM
    This is so strange, If i use import syntax it doesn't seem to work. But if i change this to
    require
    syntax then it works. Doesn't work:
    Copy code
    import { defineConfig } from 'cypress'
    Works fine:
    Copy code
    const { defineConfig } = require('cypress')
  • s

    straight-chef-47891

    07/25/2022, 2:36 AM
    Anyone had issues running Cypress on docker with the following error:
    Copy code
    qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
    qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
    qemu: uncaught target signal 11 (Segmentation fault) - core dumped
    The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
  • h

    handsome-lion-1748

    07/25/2022, 8:38 AM
    I tried
    npm install --save-dev @klaveness/cypress-cucumber-preprocessor
    and got 404 error, I'm lost 😦, it seems I need to install it from github? like following something like this: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-npm-registry ?
1...697071...127Latest