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

    acceptable-hamburger-48790

    08/03/2022, 7:58 AM
    You cant debug in IDE, but you can debug steps in Cypress test runner. Give this a read https://docs.cypress.io/guides/guides/debugging#Using-debug
  • b

    brainy-librarian-80110

    08/03/2022, 8:55 AM
    anyone who is having any idea about this issue?
  • g

    green-actor-96812

    08/03/2022, 9:56 AM
    If you login via the normal browser and you enable the preserve log in the browser debugger. Does the same exception occure as in the cypress test?
  • b

    brainy-librarian-80110

    08/03/2022, 9:57 AM
    No
  • b

    brainy-librarian-80110

    08/03/2022, 9:57 AM
    I am facing this issue whenever I am trying to login through cypress
  • b

    brainy-librarian-80110

    08/03/2022, 9:58 AM
    I found this github post but this could not resolve my issue : https://github.com/cypress-io/cypress/issues/7817
  • c

    colossal-island-95991

    08/03/2022, 10:39 AM
    Is there a way to listen to specific strings in console logs and fail the test if they are there?
  • f

    full-ram-6858

    08/03/2022, 12:20 PM
    Has anyone tried to use Cypress CT with React 18 yet ?
    • 1
    • 3
  • g

    gorgeous-jordan-86065

    08/03/2022, 1:34 PM
    Hey all, someone's run a dodgy CLI test run command and inserted some tags into our project that we want removing... is there any way to do this?
  • b

    brainy-librarian-80110

    08/03/2022, 1:52 PM
    @gray-kilobyte-89541 Hi, Could you please help me with this issue?
  • g

    gray-kilobyte-89541

    08/03/2022, 3:01 PM
    can you provide a reproducible example? Personally I think this is because both Cypress and your site try to wrap XMLHttpRequest object (Cypress does it for the obsolete
    cy.route
    command)
  • c

    chilly-magician-64042

    08/03/2022, 3:03 PM
    Hello i have an typescript issue and do not know what to do. I have a custom command and my typing is not correct first image: my command second image: my typing third image: the error can someone help me? 🙂 thx
  • b

    brainy-librarian-80110

    08/03/2022, 4:40 PM
    So the site which I'm testing is based on SAP Fiori launchpad and in my automation script I've written only three lines of code for entering username, password and just pressing submit button so after pressing submit button, it is not allowing me to redirect on the application home page and it is giving this error
  • b

    brainy-librarian-80110

    08/03/2022, 4:42 PM
    Is there any workaround or references available for the same? You are right, my site and cypress both are trying to wrap XHR id and that's why this issue is coming... Could you please help me with any solutions for this?
  • b

    brainy-librarian-80110

    08/03/2022, 4:47 PM
    https://github.com/cypress-io/cypress/issues/7817#issuecomment-781603413
  • b

    brainy-librarian-80110

    08/03/2022, 4:48 PM
    I referred this post of yours but this was not the complete solution I believe that's why still not working after incorporating the changes mentioned in this post
  • g

    gray-kilobyte-89541

    08/03/2022, 4:58 PM
    Unfortunately, I don't have any suggestions at this moment
  • g

    gifted-summer-12568

    08/03/2022, 7:32 PM
    Hi, I am in the process of writing a starter repository for vuetify 3, vite, cypress component/e2e. If/when I find out how to do it, it will be available in the repository. As for now, it is a basic poject with all the dependency and configuration for both vuetify3 and cypress component testing. I didn't added yet components in the App.vue since I want to make cypress compoent to work while mounting a vuetify component. https://github.com/baldir-fr/starter-vue3-vuetify3-vite-cypress-component-e2e
    w
    • 2
    • 1
  • g

    gentle-accountant-4760

    08/04/2022, 7:58 AM
    Hello people! Is it possible to run Cypress with arguments e.g. if I want to pass a specific url to test using it as argument? (the point is to run pararell)
  • s

    stale-optician-85950

    08/04/2022, 8:01 AM
    Yes, see https://docs.cypress.io/guides/guides/command-line for example:
    yarn cypress run --config baseUrl:http://localhost:8080
  • g

    gentle-accountant-4760

    08/04/2022, 8:02 AM
    and lets say I have two urls I want to test pararell? Same tests but two different urls?
  • s

    stale-optician-85950

    08/04/2022, 8:26 AM
    Store the URLs in an array and pass them into the test. For example, I have a large json file in
    /fixtures
    folder which I use for my dataset https://docs.cypress.io/api/commands/fixture#Syntax I then call this json into my test file and iterate through all my URLs as unique tests. For pararell testing you'll need a Cypress dashboard account.
  • c

    colossal-island-95991

    08/04/2022, 8:30 AM
    Does anyone know how to do this?
  • g

    gentle-accountant-4760

    08/04/2022, 8:44 AM
    Do you have an example on how your cy.fixture would look like? Im not sure if I quite follow. Do you have to loop your tests through array of the URLS?
  • s

    stale-optician-85950

    08/04/2022, 8:45 AM
    Something like this: https://stackoverflow.com/a/63794694/1367756
    Copy code
    Cypress.on('window:before:load', (win) => {
      cy.spy(win.console, 'error');
      cy.spy(win.console, 'warn');
    });
    
    afterEach(() => {
      cy.window().then((win) => {
        expect(win.console.error).to.have.callCount(0);
        expect(win.console.warn).to.have.callCount(0);
      });
    });
  • s

    stale-optician-85950

    08/04/2022, 8:57 AM
    Create json
    /cypress/fixtures/urls.json
    Enter json objects:
    Copy code
    {
      "urlsUnderTest": [
        {
          "url": "https://www.google.co.uk"
        },
        {
          "url": "https://www.wikipedia.org"
        }
      ]
    }
    Create test:
    test-all-sites.int.test.cy.ts
    Require json and use JS forEach() outside of the it() block:
    Copy code
    const allSites = require('../../fixtures/urls.json');
    
    describe('test all sites', () => {
      allSites.urlsUnderTest.forEach((site: Cypress.ObjectLike) => {
        it(`Site is - "${site.url}"`, () => {
          cy.visit(`${site.url}`);
        });
      });
    });
  • g

    gentle-accountant-4760

    08/04/2022, 8:57 AM
    Oh interesting way, appreciate that
  • g

    gentle-accountant-4760

    08/04/2022, 8:58 AM
    Very cool 😄
  • g

    gentle-accountant-4760

    08/04/2022, 8:59 AM
    But how would that work if you want to run it pararell in your case? Would that be a possibility?
  • s

    stale-optician-85950

    08/04/2022, 9:01 AM
    You need a Cypress dashboard account to get parallelization feature: https://docs.cypress.io/guides/guides/parallelization I don't have this feature, so you'd need to experiment with that yourself. But yes, I reckon it's totally possible.
1...119120121...252Latest