https://cypress.io logo
Join Discord
Powered by
# help
  • m

    mysterious-belgium-25713

    10/11/2022, 8:52 PM
    I think this post still works https://dev.to/samelawrence/muting-noisy-xhr-logs-in-cypress-4495
  • m

    mysterious-belgium-25713

    10/11/2022, 9:09 PM
    So in the cypress.config.js you define it like this.
    Copy code
    js
    import { defineConfig } from "cypress";
    
    const execSql = (sql, config) => {
      return new Promise((res, rej) =>{
        //rest of you code
      })
    }
    
    
    export default defineConfig({
      e2e: {
        setupNodeEvents(on, config) {
          on('task', {
            taskSqlServerSistema(sql){
              return execSql(sql, dbconfig.sistema.database)
            }
          })
          on('task', {
            taskSqlServerCobranca(sql){
              return execSql(sql, dbconfig.cobranca.database)
            }
          })
        },
      },
    });
  • p

    prehistoric-restaurant-72560

    10/11/2022, 9:14 PM
    Hello is it possible to disable the XHR
  • i

    icy-alarm-88737

    10/11/2022, 9:54 PM
    when I use cypress open, the client doesn't show line numbers when an assert fails
  • i

    icy-alarm-88737

    10/11/2022, 9:56 PM
    see

    https://i.imgur.com/emhu7Y0.png▾

  • i

    icy-alarm-88737

    10/11/2022, 9:57 PM
    its supposed to show up like this

    https://i.imgur.com/ysegnFN.png▾

  • h

    happy-megabyte-98400

    10/11/2022, 9:58 PM
    That worked. Thank you.
  • i

    icy-alarm-88737

    10/11/2022, 10:06 PM
    im on version 10.4.0 btw
  • i

    icy-alarm-88737

    10/11/2022, 10:06 PM
    both screenshots come from clients running 10.4.0
  • i

    icy-alarm-88737

    10/11/2022, 10:54 PM
    is there some cache that needs to be cleared to get this functionality?
  • c

    calm-petabyte-36221

    10/12/2022, 8:37 AM
    Hi every one, I still get the error
    Failed to fetch dynamically imported module: http://localhost:8080/my_path/cypress/support/component.js
    The
    support/component.js
    contains the default generated content from cypress, nothing else. In the Cypress CLI (even with
    DEBUG=cypress:*
    ), there is no error, except
    GET /__cypress/src/cypress-support-file.js 404
    Is someone facing the same issue? Do you have any idea on how to get the real error to fix it?
  • a

    ancient-tailor-59288

    10/12/2022, 10:22 AM
    Hi #763105090679865354! I work for a company that has a full suite of existing tests written in Java. Is there a way to wrap these in Cypress, without having to rewrite all tests?
  • m

    mysterious-belgium-25713

    10/12/2022, 10:34 AM
    That's not possible. Your Java test are likely written in selenium. Cypress is build from scratch so it's not using any of the selenium or webdriver functionality
  • m

    mysterious-belgium-25713

    10/12/2022, 10:35 AM
    I don't know for sure but can it be because the first screenshot did not set in which IDE it should open the files if something fails.
  • m

    mysterious-belgium-25713

    10/12/2022, 12:01 PM
    Check if this is set.
  • c

    cold-van-45410

    10/12/2022, 12:04 PM
    After executing 7 it block session closed message is shown . How can i resolve it??
  • m

    magnificent-finland-58048

    10/12/2022, 12:33 PM
    the best way is to put the old index file in its own task file, import it to cypress.config and use it

    https://www.youtube.com/watch?v=2HdPreqZhgk▾

  • g

    gifted-jackal-27275

    10/12/2022, 1:56 PM
    I've got a vanilla Vue 3 app where I added Cypress. Did npm i, now trying to run e2e it times out waiitng to connect. This is Windows 11, PowerShell, and again, a vanilla, not modified Vue 3 app. npm run dev runs the Vue app fine.
  • m

    mysterious-belgium-25713

    10/12/2022, 2:46 PM
    You do have npm run dev already running right before starting cypress?
  • m

    mysterious-belgium-25713

    10/12/2022, 2:47 PM
    Cypress will not start your local server
  • m

    mysterious-belgium-25713

    10/12/2022, 2:48 PM
    If you want to start your server and then run your tests i would recommend this plugin https://github.com/bahmutov/start-server-and-test
  • b

    bright-eve-71344

    10/12/2022, 2:52 PM
    When running my tests in the CI, my tests fail and I get these xhr aborted responses. If I run the same tests locally, it works fine. What causes xhr requests to be aborted?
  • g

    gifted-jackal-27275

    10/12/2022, 2:55 PM
    i believe it is using that, "test:e2e": "start-server-and-test preview http://localhost:4173/ 'cypress open --e2e --browser C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'",
  • m

    mysterious-belgium-25713

    10/12/2022, 2:56 PM
    Ow yeah I also had issues with the preview command. Because it would not load 4173. I would just use the normal run dev command
  • g

    gifted-jackal-27275

    10/12/2022, 2:56 PM
    so, i ran npm run dev in one tab. confirmed its good. in another, npm run test:e2e, same issue
  • m

    mysterious-belgium-25713

    10/12/2022, 2:57 PM
    So run 2 commands. One npm run dev so it opens the server and in other tab i would just do npx cypress open.
  • g

    gifted-jackal-27275

    10/12/2022, 2:58 PM
    its running better, but now complains that localhost:4173 isnt running 😉
  • m

    mysterious-belgium-25713

    10/12/2022, 3:00 PM
    Yeah npm run dev uses a different port i think
  • m

    mysterious-belgium-25713

    10/12/2022, 3:00 PM
    In the 5000 range maybe
  • m

    mysterious-belgium-25713

    10/12/2022, 3:00 PM
    Don't know out of my head
1...172173174...252Latest