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

    late-planet-4481

    06/28/2022, 3:21 PM
    Also, I did not try this, so I probably screwed up 👆
  • m

    mysterious-sandwich-43667

    06/28/2022, 3:45 PM
    Thanks. I did end up using a common variable to keep the code simple although the Cypress docs calls this doing a "backflip" which to me is much less of a backflip than what they recommend.
  • s

    salmon-river-93816

    06/28/2022, 3:47 PM
    So I opened a ticket on badeball/cypress-cucumber-preprocessor: https://github.com/badeball/cypress-cucumber-preprocessor/issues/749
  • s

    swift-controller-90067

    06/28/2022, 4:06 PM
    i have cypress running successfully in gitlab cicd. how do I view the videos created?
  • e

    elegant-cat-47750

    06/28/2022, 4:07 PM
    Has anyone seen this error in windows?? Am I missing a dependency perhaps? $ node_modules/.bin/cypress open C:\Users\Yesus:1 (function (exports, require, module, __filename, __dirname) { [173C:2F4C][2022-06-23T08:48:58]i001: Burn v3.10.4.4718, Windows v10.0 (Build 19043: Service Pack 0), path: C:\WINDOWS\Temp\{CC118E78-D117-4076-9268-354FF59B9E40}\.cr\VC_redist.x64.exe ^^^ SyntaxError: Invalid or unexpected token at new Script (vm.js:80:7) at createScript (vm.js:274:10) at Object.runInThisContext (vm.js:326:10) at Module._compile (internal/modules/cjs/loader.js:664:28) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3) at Module.require (internal/modules/cjs/loader.js:637:17) at Module._preloadModules (internal/modules/cjs/loader.js:824:12) [15124:0627/184248.881:ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is disabled, ANGLE is
  • s

    swift-angle-95455

    06/28/2022, 4:53 PM
    Hello! I have a problem with
    @hapi/iron
    , it looks like Cypress' webpack can't compile "nullish coalescing" feature, what is the way to proceed?
    • 1
    • 2
  • s

    swift-angle-95455

    06/28/2022, 5:13 PM
    Hello I have a problem with
    hapiiron
  • p

    purple-kilobyte-85592

    06/28/2022, 5:45 PM
    Hi I need help package.json { "name": "component-testing", "version": "1.0.0", "description": "", "main": "index.js", "browserslist": [ ], "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "cypress": "^10.2.0" }, "devDependencies": { "react": "^18.2.0", "react-scripts": "^5.0.1", "webpack": "^5.73.0" } } Please help me out
  • d

    dazzling-thailand-64429

    06/28/2022, 7:43 PM
    Hi guys. How can we configure cypress with a react app that uses CRACO? I am struggling with this, with no good results. The react app works, but the cypress always complain about a webpack compilation error. Can someone help me? it's really frustating. Thank you!
  • d

    dazzling-thailand-64429

    06/28/2022, 7:45 PM
    One thing, the problem always happens when i import some app code in a test file
  • l

    lively-match-61863

    06/29/2022, 6:34 AM
    Hello @here I'm kindly requesting for help on this issue
    ClickableRow: '[aria-colindex="5"]'
  • g

    gentle-accountant-4760

    06/29/2022, 7:55 AM
    Hello people! As I mentioned here before my cy.session. I have ended up doing something like this:
    Copy code
    ts
    Suite('My First Test', () => {
      before(() => {
        prepare();
    
        cy.visit('https://barrythrill.com');
    
        cy.get('.start-from-zero').should('be.visible').click();
    
        ...
      });
    
      Scenario('My first test cases', () => {
        Given('we are on the webpage');
    
        When('we save the list', () => {
              // no cy.visit
          ... // we save the list it will automatically login and it creates a cookie called BAR (has a dynamic cookie)
        });
    
        Then('we are able to open all-list and close it', () => {
          ... // no cy.visit
        });
    
        When('we remove the list through API', () => {
          ... // no cy.visit
        });
        Then('we should still be logged it', () => {
            ... // cy.visit(''https://barrythrill.com')
                // We should still be logged in through ` When('we save the list', ()`
        });
      });
    });
    I was not able to figure out how I can use cy.session here or to create a correct tests for my test cases. I wonder if anyone here can help me on either how I can improve my code where I can still be logged in through whole test or how I can implement cy.session without needing to call cy.visit for each
    it
    ?
  • p

    powerful-apple-75460

    06/29/2022, 8:27 AM
    After my first run Component Testing, with react, I faced this error., do i need to to do
    npm i @cypress/react
    ? please help.
  • s

    salmon-river-93816

    06/29/2022, 9:05 AM
    The issue has been resolved in version 11.3.1 of badeball/cypress-cucumber-preprocessor: https://github.com/badeball/cypress-cucumber-preprocessor/releases/tag/v11.3.1
  • s

    swift-kitchen-62493

    06/29/2022, 12:14 PM
    yo, how can i enter Multi-Domain (Origin) in cypress nowadays?
  • s

    swift-kitchen-62493

    06/29/2022, 12:14 PM
    i remember in 9.6 was "experimentalSessionAndOrigin": true
  • s

    swift-kitchen-62493

    06/29/2022, 12:14 PM
    how about now?
  • b

    bumpy-library-92619

    06/29/2022, 12:52 PM
    Can someone help me with within command? We want to select the elements for automation in such a way, which will not fail later due to code changes. From a colleague I got the suggestion that I can solve it as in the second picture with the help within command, but I don't get any progress with it
  • b

    bumpy-library-92619

    06/29/2022, 12:54 PM
    cy.get("article").eq(0).click(); it was my first solution but it was not good in case we are doing some changes in the page
  • b

    bumpy-library-92619

    06/29/2022, 12:54 PM
    and this will break
  • b

    bumpy-library-92619

    06/29/2022, 12:56 PM
    but what I want, i want to click on the first article
  • l

    late-twilight-22806

    06/29/2022, 1:48 PM
    Can someone help me with an example of cypress code coverage report on nuxtjs application ?
  • r

    rough-area-43356

    06/29/2022, 2:27 PM
    Hello, I'm having hard time finding a solution to testing Clipboard copy functionality in Cypress 10. I've tried several solutions from https://github.com/cypress-io/cypress/issues/2752 but none worked as the window.navigator.clipboard never seems to exist(tried Electron v100, Chrome v103). If anyone could point me in a direction of possible solution, I'd be most grateful.
  • f

    fresh-doctor-14925

    06/29/2022, 2:47 PM
    Couple of things: 1) It'd be helpful if we can see the cypress code you've written so far to see where you're going wrong.
    within()
    is a fairly self-explanatory API, so it shouldn't be too difficult to see what's up 2) If you're wanting to have selectable elements that are resilient to code changes, don't use class based selectors. Instead, encourage your devs to add test ids to the elements (or add them yourself). See https://docs.cypress.io/guides/references/best-practices#Selecting-Elements
  • l

    late-planet-4481

    06/29/2022, 3:28 PM
    > cy.get("article").eq(0).click() Honestly, this is about as resilient as I ever bother getting 🙂 But I understand your concern. I assume a proper
    .within()
    solution would look like this:
    Copy code
    cy.get('[data-test="articleList"]').within(() => {
      cy.get('article').eq(0).click()
    }
  • b

    bumpy-library-92619

    06/29/2022, 3:40 PM
    Hi, thank you for your answer! i solved it like this: cy.get('.grid').within(() => { cy.findAllByRole('img').first().click(); })
  • b

    bumpy-library-92619

    06/29/2022, 3:43 PM
    but now i have another issue, after clicking on back to product list, page is not changed directly, therefore an error occurs again, because it searches grid on the wrong page. Can someone help me for this? thanks!
  • s

    swift-controller-90067

    06/29/2022, 3:46 PM
    hey I want to try and figure out why tests are failing only in gitlab, by pulling the cypress docker image and running the container locally. how do I get it to run my project?
  • g

    gray-kilobyte-89541

    06/29/2022, 4:21 PM
    Your test probably is flaky because it does not check if the page has loaded and the grid has the expected items. Read https://on.cypress.io/retry-ability and https://glebbahmutov.com/blog/check-more-things/
  • s

    swift-angle-95455

    06/29/2022, 4:44 PM
    Why Cypress gives me this error? Is a Cypress Chrome browser parsing error or is a Cypress Nodejs error? Because nullish coalescing has a 90% global usage according to CanIUse.
1...9899100...252Latest