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

    salmon-computer-88142

    08/26/2022, 2:30 PM
    how can i stub request that is being used by cypress?
  • s

    salmon-computer-88142

    08/26/2022, 2:30 PM
    i want to override cy.request("http://localhost/__coverage__") in order to collect coverage from multiple endpoints
  • s

    salmon-computer-88142

    08/26/2022, 2:31 PM
    the current coverage report is coming from 1 service only right now
  • s

    salmon-computer-88142

    08/26/2022, 2:32 PM
    i did
    Copy code
    before(() => {
      cy.stub(cy, 'request').callsFake(()=>{...})
    })
    it doesnt work and i try to understand why
  • s

    salmon-computer-88142

    08/26/2022, 2:32 PM
    i even used cy.intercept('GET', '*') on "before" block but it never get called
  • s

    salmon-computer-88142

    08/26/2022, 2:33 PM
    the other option is to create a mocked server that collects coverage report but i dont know if it is possible via cypress
  • d

    dry-london-24879

    08/26/2022, 6:20 PM
    Hello. Is it a way to skip test from beforeEach based on some logic without failing test and running rest of the tests?
    Copy code
    beforeEach(function() {
      if (!shouldRunTest()) {
        this.skip()
      }
    })
    Like in this article: https://dzone.com/articles/cypress-test-suite-grouping-and-organizing-tests
  • p

    powerful-orange-86819

    08/27/2022, 10:52 AM
    I did it somewhere in my code, made a custom function "skipOn" that had an 'if' check, on true it sets it(), on false it sets it.skip(), but i can't find it right now, pretty sure i had it stashed. But its not anything special you could do it based on my description. You can also overwrite the it() in simmilar fashion
  • s

    stale-magazine-23991

    08/27/2022, 10:55 AM

    https://x.pfcode.net/VujE3/HaqixUQU84.png▾

    running cypress on jenkins, does anyone know why I am getting this errror? Cannot find module 'electron'. If I run as an admin it works
  • s

    stale-magazine-23991

    08/27/2022, 11:00 AM
    Why does it need to run as an admin?
  • s

    salmon-computer-88142

    08/28/2022, 8:15 AM
    you can just put the condition outside of the beforeEach call. for example:
    Copy code
    if(condition) {
      beforeEach(...)
    } else {
      beforeEach(...)
    }
  • s

    salmon-computer-88142

    08/28/2022, 8:16 AM
    beforeEach is just a function call
  • f

    freezing-wall-7568

    08/28/2022, 5:28 PM
    Hello, for those of you who are using Cucumber/BDD with cypress, I have a quick question about using cypress with cucumber and webpack/typescript. If I am using cypress version < 10.0 does that mean I have to use "cypress-cucumber-preprocessor" that used to be maintained by Brain family? or can I use "@freezing-piano-2792/cypress-cucumber-preprocessor" with cypress version < 10.0 too?
  • g

    gray-piano-27875

    08/29/2022, 10:44 AM
    Hi folks! I am learning cypress and found that there are different approaches to Page Object Model on Cypress. Could you please, share with me information and examples - what is the best practice of Page Object model on Cypress? Thx
    c
    • 2
    • 3
  • s

    swift-kitchen-62493

    08/29/2022, 1:39 PM
    can we do a readData and then delete line from it after use? then next time readData gonna be used, will read new line what wasn't deleted?
  • c

    colossal-farmer-50435

    08/29/2022, 1:51 PM
    Hi folks
  • q

    quaint-judge-45197

    08/29/2022, 3:38 PM
    Hi Everyone, I am trying to use PKI certificates in cypress testing, I am passing cert, key, and passphrase but I am getting this error in response
    Copy code
    body { error: you must pass cert to access this endpoint, you can not skip this request }
    This error occurs when you visit website which use PKI certificate to login and you cancel the popup of select your certificate
  • e

    elegant-river-87347

    08/30/2022, 4:46 AM
    Hi anyone experience this issue.. all tests looks passing with green button but no result.. We're talking to sorry-cypress, i get the inspeculation that this is because of the configuration of sorry-cypress with our GitLab CI,, anyone encounterred like this? thanks
  • c

    creamy-traffic-37062

    08/30/2022, 7:19 AM
    Hi. I'm trying to begin with Cypress but there's problem because of my account. it contains a swedish charachter, and it can not find my appdata because of that. Anyone know how to solve the problem?
  • s

    stale-optician-85950

    08/30/2022, 4:03 PM
    Hi, anyone running their tests via GH Actions: The latest Node version 16.17.0 is throwing error when launching Cypress, I've raised an issue here https://github.com/cypress-io/cypress/issues/23620 In the meantime you can specify specific versions in CI using https://github.com/actions/setup-node#supported-version-syntax i.e.
    Copy code
    - uses: actions/setup-node@v3
         with:
            node-version: 16.16.0
  • h

    hundreds-shoe-33118

    08/30/2022, 5:06 PM
    Hello, I am unable to select calendar date from calendar. Is there anyone to help on that please
  • p

    polite-potato-14743

    08/31/2022, 8:02 PM
    Do you guys find all automated UI tests flakey / brittle? Been writing them for years and its just nothing I ever derive a lot of confidence from. A little, but not a lot.
  • g

    gray-kilobyte-89541

    08/31/2022, 9:44 PM
    We fight it. Check out this column of slides https://slides.com/bahmutov/slice-and-dice#/11 (press the down arrow)
  • h

    helpful-queen-71488

    09/01/2022, 7:27 AM
    Hi everyone, I have a problem with changing url in the same process (without changing tab) so a dynamic url. except I get this error when I get to this step. If someone has the solution 😉
  • a

    astonishing-postman-6253

    09/01/2022, 10:02 AM
    I have a question about dynamic tests with Cypress. We have many micro frontends that utilize the same React components. We covered one of the apps with dynamic tests, which is terrific, so we would like to share our dynamic tests between them. Did anyone have any experience with that? I would be happy to see an example.
  • s

    salmon-computer-88142

    09/01/2022, 11:00 AM
    i want to filter rows in a grid that contain cells in with specific value in specific column. so i try something like that:
    chain.filter((index, $row) => {...})
    the problem is that
    filter
    function expect to get a function that return boolean, and i want to do some 'async' operation
  • s

    salmon-computer-88142

    09/01/2022, 11:00 AM
    so any idea how can i solve this problem?
  • s

    salmon-computer-88142

    09/01/2022, 11:09 AM
    in general how can i do 'asynchronous' filter
  • g

    gray-kilobyte-89541

    09/01/2022, 11:20 AM
    Search for filter examples at https://cypress.tips/search
  • s

    salmon-computer-88142

    09/01/2022, 11:37 AM
    i think of doing like this:
    Copy code
    chain.filter(
                  cells.map(({
                    column, value
                  }) => `[role=gridcell] .ag-cell-value:nth-child(${column}):contains(${value})`).join(', ')
                )
1...777879...127Latest