https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • h

    handsome-dress-30825

    07/20/2022, 12:00 PM
    I am using the following settings in the config file:
    Copy code
    ts
      
      numTestsKeptInMemory: 0,
      watchForFileChanges: false,
      video: false,
      experimentalInteractiveRunEvents: true,
  • h

    handsome-dress-30825

    07/20/2022, 12:01 PM
    it usually reduced the crashes on version 9.7.0 and bellow but I keep having them with the new version
  • h

    handsome-dress-30825

    07/20/2022, 12:01 PM
    I am using Chrome for executing the tests
  • h

    handsome-dress-30825

    07/20/2022, 12:01 PM
    and I am on a MacBook Air M1 laptop
  • h

    handsome-dress-30825

    07/20/2022, 12:28 PM
    Copy code
    ts
    
    TSError: ⨯ Unable to compile TypeScript:
    cypress.config.ts(40,3): error TS1127: Invalid character.
    
        at createTSError (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:820:12)
        at reportTSError (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:824:19)
        at /Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:1292:34
        at Object.compile (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:1322:43)
        at Module.m._compile (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:1454:30)
        at Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
        at Object.require.extensions. [as .ts] (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/node_modules/ts-node/src/index.ts:1458:12)
        at Module.load (internal/modules/cjs/loader.js:950:32)
        at Function.Module._load (internal/modules/cjs/loader.js:790:12)
        at Module.require (internal/modules/cjs/loader.js:974:19)
        at require (internal/modules/cjs/helpers.js:101:18)
        at loadFile (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:89:14)
        at EventEmitter. (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/child/run_require_async_child.js:116:38)
        at EventEmitter.emit (events.js:400:28)
        at EventEmitter.emit (domain.js:475:12)
        at process. (/Users/cc-user/Library/Caches/Cypress/10.3.1/Cypress.app/Contents/Resources/app/packages/server/lib/plugins/util.js:33:22)
  • h

    handsome-dress-30825

    07/20/2022, 12:28 PM
    this is what I am getting
  • a

    aloof-artist-57349

    07/20/2022, 1:39 PM
    Is there any reason why the tests are running really slow after migrating to 10.0.0?
  • a

    aloof-artist-57349

    07/20/2022, 1:40 PM
    - I just upgraded to 10.0.0 - The migration configs were done via cypress open - Then ran the tests locally via electron - At the visit, its taking a long time to load the page
  • a

    aloof-artist-57349

    07/20/2022, 1:41 PM
    Any help would be much appreciated
  • s

    stale-park-86404

    07/21/2022, 3:49 AM
    I'm experiencing it as well in 10.3.0, interestingly, I'm using mba m1 as well.
  • s

    stale-park-86404

    07/21/2022, 8:05 AM
    Hi, i need help in understanding why the variable becomes undefined in this code please. let list_title ="" cy.get('.text).then((title) =>{ cy.log("TITLE: " + title.text().toString()) // it prints the title as expected list_title = title.text() // I assigned the text to the list_title variable }) cy.log(list_title) // now it results to undefined
  • m

    magnificent-judge-17148

    07/21/2022, 8:12 AM
    Getting the above error while cy.request any idea if it works with azure b2c tenant
  • b

    bland-farmer-35867

    07/21/2022, 8:49 AM
    #testing-library problem: findByRole, findByLabel, findByText, findByDisplayValue - underlined, eslint complains I followed the instructions from the https://testing-library.com/docs/cypress-testing-library/intro/ on how to setup cypress to make use of testing-library commands. in package.json: "@testing-library/cypress": "8.0.3", in cypress>support>commands.ts I've added this line to the top of the file import "@testing-library/cypress/add-commands"; still getting errors. how can I get it fixed?
  • d

    delightful-microphone-80931

    07/21/2022, 8:54 AM
    Hi All, I am using cypress with mochawesome and junit to produce html reports. I have followed the instruction here for installation: https://dev.to/ganeshsirsi/how-to-generate-both-junit-xml-and-html-reports-in-cypress-step-by-step-guide-4dgd it was working previously, but now I am getting the following errors: I use cypress 9.7.0 to use experimental studio as well. Does anyone have the same issue and solution?
  • d

    delightful-microphone-80931

    07/21/2022, 8:55 AM
    it says override after:run or before:run
  • g

    gentle-oxygen-2271

    07/21/2022, 11:42 AM
    Hello, I'm using tags and running tests with different tags in separate steps in Github workflow, but I'm now running into an issue with the changing amount of tests tagged and I would like to make the matrix with number of machines dynamic. To do this, I would need to get the count of spec files with the specific tag and then determine how many machines are needed. Has anyone done something like this?
  • n

    nutritious-honey-65632

    07/21/2022, 12:35 PM
    Hello, is there a difference in waiting in these cases: 1.
    Copy code
    cy.wait('@myRequest')
       cy.get('something')
    2.
    Copy code
    cy.wait('@myRequest').then(() => {
       cy.get('something')
    }
    3.
    Copy code
    cy.wait('@myRequest').its('response.statusCode').should('eq',200)
       cy.get('something')
  • g

    gray-kilobyte-89541

    07/21/2022, 1:07 PM
    https://cypress.tips/search search my videos 🙂
  • g

    gray-kilobyte-89541

    07/21/2022, 1:08 PM
    well, it is hard to do dynamically, since the number of machines in the workflow file is static, right? But you can probably use https://github.com/bahmutov/find-cypress-specs to get the number of tests / files for each tag I think and then think how many machines to use
  • m

    mysterious-book-80956

    07/21/2022, 1:46 PM
    Hey All, I'm working with Cypress and github actions. Everything works very well locally but when I try run it in the pipeline it breaks. I'm using https://docs.cypress.io/guides/end-to-end-testing/okta-authentication#Custom-Command-for-Okta-Authentication The error that I'm getting is
    CypressError: 'cy.then()' timed out after waiting '50000ms'.
    and that
    authClient.token.getWithoutPrompt
    isn't resolving. Any idea whats going on?
  • s

    square-pager-46841

    07/21/2022, 8:58 PM
    Hello!
  • s

    square-pager-46841

    07/21/2022, 8:59 PM
    I am developing cypress with snapshot plugin library
  • s

    square-pager-46841

    07/21/2022, 9:00 PM
    and am currently having a problem with: -hiding scrollbars -when I interact with the DOM (type on an input etc...) the screenshot appears to be zoomed in, hence the scrollbars that appear.
  • s

    square-pager-46841

    07/21/2022, 9:00 PM
    Anyone know how I can take care of this?
  • s

    stale-park-86404

    07/22/2022, 4:47 AM
    thanks for this! really helpful 🙂
  • s

    swift-kitchen-62493

    07/22/2022, 7:45 AM
    Hey, is there any command that activates only when the object shows up, or stays active all the time? because sometimes it shows a window that I have to click and sometimes it doesn't, it messes up my code, please help
  • a

    acceptable-hamburger-48790

    07/22/2022, 8:09 AM
    wait.then(() = > {}) - this is basically used when you are waiting for a request to complete and then get the response and perform some action like validate response content, status code etc.. then() yield the content coming out of wait()
    n
    • 2
    • 3
  • g

    gentle-oxygen-2271

    07/22/2022, 8:15 AM
    Yeah I actually found the find-cypress-specs but I'm having trouble using it. I'm getting the following error 🤔
    • 1
    • 1
  • n

    nutritious-honey-65632

    07/22/2022, 8:46 AM
    wait then this is basically used when
  • g

    gentle-oxygen-2271

    07/22/2022, 9:06 AM
    Yeah I actually found the find cypress
1...737475...192Latest