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

    limited-room-30929

    06/22/2022, 2:53 PM
    is it possible to override ROOT_SELECTOR ?
  • f

    fierce-beach-68131

    06/22/2022, 3:02 PM
    Hi everyone, I am facing some drag and drop issue. I'm fairly new to Cypress and would appreciate any help. I know drag and drop isn't natively supported but I have to solve it. I want to briefly show where I automate right away. As you can see in the "screenshot-1.png", here is the element I want to drag and the placeholder I want to drop. You can see my code in "code.png" and my cypress test in the "cypress.png". It seems like no matter what I provide mousemove etc., it does not move, stuck in first place.
  • l

    limited-room-30929

    06/22/2022, 3:05 PM
    seems like custom dev server with webpack is competing with the component settings
  • l

    limited-room-30929

    06/22/2022, 3:05 PM
    I cannot override the template being used by cypress
  • f

    fresh-doctor-14925

    06/22/2022, 3:08 PM
    This is where good a11y practices can help. I was able to use keyboard shortcuts to validate something similar
  • f

    fresh-doctor-14925

    06/22/2022, 3:09 PM
    How I solved it
  • f

    fierce-beach-68131

    06/22/2022, 3:10 PM
    Just tell me what to do and I can try it right away 🙂
  • f

    fresh-doctor-14925

    06/22/2022, 3:10 PM
    Take a look at the screenshot I provided and see if you can do something similar
  • f

    fierce-beach-68131

    06/22/2022, 3:22 PM
    could you pls explain what does "keyCode" mean?
  • f

    fresh-doctor-14925

    06/22/2022, 3:27 PM
    .trigger() docs: https://docs.cypress.io/api/commands/trigger It gives you a way to trigger Javascript events. Bit more info on keyCodes here https://www.freecodecamp.org/news/javascript-keycode-list-keypress-event-key-codes/
  • b

    bumpy-library-92619

    06/22/2022, 4:14 PM
    Hi, i have a small issue here. Does anybody know what is the best way to reach this element? Logout
  • f

    fresh-doctor-14925

    06/22/2022, 4:17 PM
    I'd recommend adding a test-id to the element. Failing that you could do
    cy.get("p").contains("Logout")
    Or, more concise, but less readable IMO
    cy.contains("p", "Logout")
  • b

    bumpy-library-92619

    06/22/2022, 4:20 PM
    Thanks for your answer but can you give me more infos about adding a test-id?
  • f

    fresh-doctor-14925

    06/22/2022, 4:21 PM
    This course can help you with that. It's just like adding any other attribute to an HTML element. Having test ids means your tests are resilient to strings being changed https://learn.cypress.io/tutorials
  • i

    icy-lock-49000

    06/22/2022, 4:22 PM
    So for months now I've been running
    npx cypress open
    inside our Cypress projects to open Cypress in our frontend monorepo (lots of apps in teh monorepo including 'apps' for Cypress tests for the various apps in the monorepo). We recently hired on a contractor but for some reason he gets teh following error when he tries to run `npx cypress open`:
    Copy code
    Cypress verification timed out.
    
    This command failed with the following output:
    
    /Users/<user>/Library/Caches/Cypress/10.2.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=30
    
    ----------
    
    Command timed out after 30000 milliseconds: /Users/<user>/Library/Caches/Cypress/10.2.0/Cypress.app/Contents/MacOS/Cypress --no-sandbox --smoke-test --ping=30
    Timed out
    It looks like you are running the Cypress binary directly.
    
    This is not the recommended approach, and Cypress may not work correctly.
    
    Please install the cypress NPM package and follow the instructions here:
    
    https://on.cypress.io/installing-cypress
    
    ----------
    
    Platform: darwin-x64 (20.6.0)
    Cypress Version: 10.2.0
    I've never seen this error before at all, we were on 10.0.2 and upgraded to 10.2.0 to see if that fixed it but no dice (He's on an intel chip but figured it was worth trying) Thanks!
  • b

    bumpy-library-92619

    06/22/2022, 4:24 PM
    i asked for test-id because i already tried with contains but i got the following error
  • i

    icy-lock-49000

    06/22/2022, 4:41 PM
    Aaand it started working after he re-installed cypress from the root of our monorepo and then did a new yarn install. Strange that had to do that, more than I ever had to do. 🤷 Leaving this here in case anyone else has the same issue
  • a

    abundant-gold-84344

    06/22/2022, 4:47 PM
    Hi everyone. i instrumented my application with nyc. 1) I can see few files under window.coverage in the browser where my application is running 2) At the same time, i can see undefined under window.coverage in the Cypress automated browser when i run any test case. I can see window.coverage gives the list of files that are instrumented in the Cypress automated browser in the examples provided by cypress (screenshots) But I can see the coverage lines for the files mentioned in point (1). Is the point(1) enough?
  • f

    fresh-doctor-14925

    06/22/2022, 5:02 PM
    DOM detachment is a fairly common issue. You can prevent it by first asserting that the state of the button is as you expect, then doing a completely new
    get()
  • w

    wooden-london-95877

    06/22/2022, 6:46 PM
    Hi there. I use Cypress Dashboard at work and was wondering if there's any kind of public API to fetch test results from at all? 🤔
  • a

    ambitious-mechanic-65736

    06/23/2022, 1:20 AM
    Hi there, I'm using Cypress 10.0.3 and gitlab-ci. Everytime I run the pipeline in gitlab, I get the error shown in the screenshot. Can anybody please help me with it?
  • p

    prehistoric-fireman-62402

    06/23/2022, 7:56 AM
    Did you find an answer to your question?
  • s

    swift-kitchen-62493

    06/23/2022, 7:57 AM
    sure
  • s

    swift-kitchen-62493

    06/23/2022, 8:00 AM
    in my case it was a test environment from my company, and the pop-up was a security measure for normal users so they could not get in, but connecting to the company laptop with VPN, it worked, I wanted to do it on my private PC but it turns out that I need to have a company configuration to bypass the pop-up window
  • s

    swift-kitchen-62493

    06/23/2022, 8:01 AM
    And to do it in cypress I don't know if it's possible,
  • s

    swift-kitchen-62493

    06/23/2022, 8:02 AM
    you may need the whole company repository and put the data in a file so it automatically has a login
  • s

    salmon-fountain-28046

    06/23/2022, 8:06 AM
    https://stackoverflow.com/questions/50528467/how-to-add-login-credentials-to-url I think it can be done this way too
  • s

    swift-kitchen-62493

    06/23/2022, 8:13 AM
    i will try
  • s

    swift-kitchen-62493

    06/23/2022, 8:13 AM
    thanks
  • w

    wooden-family-9570

    06/23/2022, 8:38 AM
    Hi all. Does anyone know why cy.intercept() would return a 400 error? Not doing anything with the data. Literally just spying on it
1...939495...252Latest