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

    handsome-lion-1748

    10/20/2022, 12:30 PM
    and also
    Unused interface Chainable
  • h

    handsome-lion-1748

    10/20/2022, 12:30 PM
    Why is this so complicated!
  • f

    fresh-doctor-14925

    10/20/2022, 12:47 PM
    Because TypeScript 🙂
  • f

    fresh-doctor-14925

    10/20/2022, 12:54 PM
    A couple of things I'd recommend @handsome-lion-1748: 1) Check that you're actually importing your login command in an
    index.ts
    somewhere 2) If you're using VSCode, try restarting your TS Server
  • h

    handsome-lion-1748

    10/20/2022, 12:56 PM
    Thanks for the reply Liam! I'm using Webstorm, and I have the default e2e.ts file importing my commands.ts which in the file it says that the e2e.ts file is run before every test.
  • h

    handsome-lion-1748

    10/20/2022, 12:57 PM
    @fresh-doctor-14925 I have this
    import './commands';
    in the e2e.ts but I don't have anything exported in the
    commands.ts
    file.
  • h

    handsome-lion-1748

    10/20/2022, 12:58 PM
    For now I just defined an ordinary function in a util.ts file and I imported it after spending hours trying to add a custom command! (which would be more convenient)
  • f

    fresh-doctor-14925

    10/20/2022, 12:59 PM
    As far as I can tell, that should be okay. Though I'm by no means a TS expert :S
  • r

    refined-raincoat-56329

    10/20/2022, 1:24 PM
    everything is in the describe block, check this vedio, first test execution will pass, second will fail because I changed the assertion to find a wrong heading
  • b

    brave-river-4142

    10/20/2022, 1:33 PM
    this command you put on command.js? @stale-optician-85950
  • m

    mysterious-belgium-25713

    10/20/2022, 1:44 PM
    Now i understand your issue. If your test fails it will reach the afterEach() but i never used the afterEach like you are doing. In my after each i would just use some API call or task to clean up stuff in my test. I dont think cypress is build that if your test fails that you can still do test actions on the page. Maybe this could be a valid feature request for Cypress. @wonderful-match-15836, maybe a question to you. The situation is that Osama has a usecase where his tests fails and he wants to use the after each to still do some manual steps in the application to remove a user. What happens now is that when the test fails it goes into the afterEach block but Cypress cannot communicate with the DOM, it will not allow any UI interactions. Is this something that is worth investigating or this will never be supported in Cypress.
  • w

    wonderful-match-15836

    10/20/2022, 2:49 PM
    I'm afraid I can't answer this question, best thing to do would be describe the use case in a github issue as a feature request: https://github.com/cypress-io/cypress/issues/new?assignees=&labels=&template=3-feature.yml
  • c

    cuddly-kitchen-97815

    10/20/2022, 3:08 PM
    Hi everyone! I'm trying to start component testing for my company's frontend application but Babel keeps producing a weird error (See screenshot). I've been trying to find a solution online, but my research hasn't been very fruitful. I also have a couple of other weird things happening: - Cypress GUI doesn't detect changes in saved files in the component testing (the
    return false
    you see in the top of the screenshot is no longer in the file and the runner still detects one of my deleted files) - No matter what I install, I can't get the above error to change and VSCode consistently treats my cypress code as filled with errors despite my code looking just like what was found in the documentation Any leads will help plenty, thank you so much!
  • c

    careful-toothbrush-49639

    10/20/2022, 4:38 PM
    Good afternoon. I am passing right rgb value in my assertion but getting this error. Who can help?
  • l

    lemon-animal-16490

    10/20/2022, 4:44 PM
    Did you try
    and('have.css', 'color', 'rgb(44, 60, 203)')
    yet?
  • c

    cuddly-kitchen-97815

    10/20/2022, 4:49 PM
    Is that not what's already in his screenshot? You just added some whitespace, which would be inconsequential in this context
  • c

    careful-toothbrush-49639

    10/20/2022, 5:20 PM
    I just tried that and it worked!!! Thanks @lemon-animal-16490
  • h

    high-shampoo-86680

    10/20/2022, 9:43 PM
    Hey everyone, we are running Cypress 10.9.0 on Github's virtual runners via Github Actions. We're running chrome in headless mode. And pretty frequently, two tests will run, but then we'll get the error
    Missing browserCriClient in connectToNewSpec
    when it goes to run the third test. Anybody else run into this? Google is giving me absolutely nothing on this one
  • d

    dry-potato-62037

    10/21/2022, 6:02 AM
    Hi, for WebKit is it possible to manually configure ?? Running “npm install --save-dev playwright-webkit” , the download is being blocked in our org network and I’m trying to figure out a way around.
  • s

    stale-optician-85950

    10/21/2022, 6:19 AM
    In this example yes. The code is in a custom command and called in the test by:
    cy.dragAndDrop($fromEl, $toEl, $toElPositionX, $toElPositionY);
    Don’t just copy and paste it directly into your project, as mentioned in my original message you will need to study the behaviour of your application by monitoring the event listeners and rework the code for your application.
  • e

    elegant-keyboard-7249

    10/21/2022, 10:50 AM
    HI Every one
  • e

    elegant-keyboard-7249

    10/21/2022, 10:50 AM
    My self Atif Niaz
  • e

    elegant-keyboard-7249

    10/21/2022, 10:51 AM
    Can any body help me to connect cypress with MongoDB.
  • e

    elegant-keyboard-7249

    10/21/2022, 10:51 AM
    I try using "cypress-mongodb"
  • e

    elegant-keyboard-7249

    10/21/2022, 10:51 AM
    but got errro.
  • e

    elegant-keyboard-7249

    10/21/2022, 10:52 AM
    Error detials in below link
  • e

    elegant-keyboard-7249

    10/21/2022, 10:52 AM
    https://github.com/Zaista/cypress-mongodb/issues/22
  • a

    adorable-action-72456

    10/21/2022, 10:54 AM
    Hi @elegant-keyboard-7249 Did you try this one ? https://www.npmjs.com/package/cypress-mongodb
  • b

    brash-magician-91303

    10/21/2022, 10:55 AM
    Hi! Cypress Dashboard stopped posting
    Run status comments
    to PR, seemingly after upgrade from 9 to 10, although might just be a coincidence. Any clues what might have caused it?
  • e

    elegant-keyboard-7249

    10/21/2022, 10:55 AM
    @adorable-action-72456 - Yes I used this one
1...183184185...252Latest