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

    gray-kilobyte-89541

    03/14/2022, 7:25 PM
    have you tried blocking them using
    blockLists
  • a

    acceptable-solstice-90676

    03/14/2022, 7:28 PM
    As you can see in the video, the email is being typed too slow, the browser is typing the email as I type this message (more than 40 seconds). I am not running on a headless mode. Also, this is the script I have.
  • a

    acceptable-solstice-90676

    03/14/2022, 7:29 PM
    No, I have not, but I will try it now and see.
  • f

    future-gold-77198

    03/14/2022, 7:31 PM
    yikes, ok, I'll take that back. Definitely feels like the API requests have something to do with it :). Have you or can you talk to the devs that maintain this vital proteins site. Seems like they'd know something about the requests and may be interested in knowing so many are made.
  • a

    acceptable-solstice-90676

    03/14/2022, 7:32 PM
    No worries, of course, I will talk to them.
  • a

    acceptable-solstice-90676

    03/14/2022, 7:32 PM
    Thank you very much for looking into this.
  • b

    brave-terabyte-33430

    03/14/2022, 10:59 PM
    howdy y'all! How do I make
    cy.request()
    wait for a few seconds between retries, or make it retry more times? My tests do the request to log in the user, and the service they talk to (currently) has some downtime during deployments.
  • b

    brave-terabyte-33430

    03/14/2022, 11:01 PM
    I think I could crank up the general runMode retries in
    cypress.json
    settings -- currently at 3 -- but I'd have crank it up very high [as I believe the request failure happens very quickly], and I don't want (say) 100 retries for other failures.
  • d

    dazzling-salesclerk-15570

    03/14/2022, 11:05 PM
    My best experience with that was setting up a backend task that makes the requests and returns only when the request is successful, or fails if it doesn't succeed after a number of tries or times out.
  • b

    brave-terabyte-33430

    03/14/2022, 11:44 PM
    OK, I'll give that a try, thanks!
  • g

    gray-kilobyte-89541

    03/15/2022, 1:05 AM
    you could use https://github.com/bahmutov/cypress-recurse to do this
  • r

    rough-van-84956

    03/15/2022, 2:53 AM
    Hi all. Has anyone tried testing a site behind Cloudflare? Our test site is using Rocket Loader, which defers javascript. For example, a register button has:
    Copy code
    onclick=“if (!window.__cfRLUnblockHandlers) return false; document.location=‘/account-register’”
    There's an XHR call to
    /cdn-cgi/...
    A test will fail if it clicks the button before that call returns. I can't intercept/wait, because that call doesn't occur when testing a local (docker compose) site. I'm trying to work out how to wait for the
    __cfRLUnblockHandlers
    value to become true, otherwise I'm left inserting arbitrary waits. In the short term, I've disabled RocketLoader for the test site, but I'd prefer to test in a Production config.
  • c

    crooked-easter-63692

    03/15/2022, 4:15 PM
    Hello
  • c

    crooked-easter-63692

    03/15/2022, 4:16 PM
    Has anyone renamed a screenshot taken with the cypress-plugin-snapshots
  • c

    crooked-easter-63692

    03/15/2022, 4:17 PM
    Copy code
    module.exports = (on, config) => {
      on('after:screenshot', (details) => {
        const newPath = path.resolve(__dirname, '../reports/mochareports/assets/'+details.specName+'/'+details.specName+'(failed).png')
        fs.renameSync(details.path, newPath)
        return { path: newPath }
      })
  • c

    crooked-easter-63692

    03/15/2022, 4:18 PM
    but i become a error
  • c

    crooked-easter-63692

    03/15/2022, 4:19 PM
    CypressError:
    cy.task('cypress-plugin-snapshot:getFile')
    failed with the following error: The 'task' event has not been registered in the plugins file. You must register it before using cy.task() Fix this in your plugins file here: /Users/cypress/plugins/index.js Because this error occurred during a
    before all
    hook we are skipping all of the remaining tests.
  • b

    brave-terabyte-33430

    03/15/2022, 5:05 PM
    neat! thanks @User !
  • i

    important-river-75795

    03/16/2022, 10:44 AM
    don't 😄
  • d

    damp-country-52800

    03/16/2022, 12:38 PM
    Hi everyone, I have a question : What is Cypress Coding Standards : convention, guidelines, Style syntax, formatting, indentation ? I would like to write a documentation for a uniformity in the code created by different engineers Thank you
  • a

    acoustic-answer-12539

    03/16/2022, 4:49 PM
    Hello Guys, The visual testing plugin "cypress-plugin-snapshots" works totally fine in local but not in CI environment. The issue is the tests are executed in semaphore and getting passed irrespective of baseline image. Do anyone facing the same issue ?
  • b

    brave-terabyte-33430

    03/17/2022, 8:23 PM
    Which engineers, ones at your company?
  • p

    powerful-orange-86819

    03/18/2022, 8:01 AM
    that's a long and hard process you need to work on custom commands which utilize the API and its logic is clear to the whole team. I've been doing it for couple of months now, found a nice cypress plugins and javascript formatting plugins for visual studio that work really good for me and my team. Also make sure the titles of test cases follow the regular QA practices so its clear what the goal of each test case is. there is lots of information on Cypress' site and documentation
  • d

    damp-country-52800

    03/18/2022, 10:53 AM
    Yes 🙂
  • d

    damp-country-52800

    03/18/2022, 10:55 AM
    Hi, Can you give me some example of plugins ? you're approach is very interesting
  • p

    powerful-orange-86819

    03/18/2022, 11:02 AM
    If any can suggest other plugins, I would greatly appreciate
  • f

    future-baker-50174

    03/21/2022, 10:24 AM
    Is there a way to set the type delay globally?
    get("#ididid").type("texttext", { delay: 0})
    I have tried
    Cypress.config("keystrokeDelay", 0)
    but it has no effect.
  • a

    alert-market-68946

    03/22/2022, 8:00 AM
    I am trying to send multiple requests using cy.request inside a for loop but after 1st request is successful another subsequent request is not giving a proper response. I read the docs which say that we should not use sync and async code at the same time. Since I am new to cypress and javascript I am not sure how to loop cy.request or what I am doing wrong. Kindly help.
    Copy code
    for (let i = 0; i < 10; i++) {
            cy.request({
              method: 'POST',
              url: Cypress.env('webhookUrl'),
              body: payload,
              headers: header,
              failOnStatusCode: false,
            }).then((response) => {
              expect(response.status).to.be.eq(200)
              expect(response.body).is.not.null
            })
          }
  • g

    gray-kilobyte-89541

    03/22/2022, 2:41 PM
    your code is fine, but maybe your backend does not handle quick requests like that? Can it handle 10 POSTs with the same info in a row?
  • p

    powerful-orange-86819

    03/23/2022, 8:37 AM
    for that reason, when i have to check a post request multiple time i add let waitTime = 200 before the cylce and then in the cycle i add cy.wait(waitTime) and increment it every cycle so the request is made with a little bit of delay on every cycle(200, 400, 600 etc)
1...343536...192Latest