https://cypress.io logo
Join Discord
Powered by
# e2e-testing
  • r

    rough-jordan-79228

    11/20/2022, 8:47 PM
    I cant use my function - which i have stored in my command.ts file. It says "convertToNumber is not defined. I Imported the command.ts file in Index - so it should automatically load it for all files or?
  • m

    mysterious-belgium-25713

    11/20/2022, 10:46 PM
    Did you create a regular function like function convertToNumber or did you create a cypress command. If you created a normal function then you still need to export it and import it in your test file. The commands.js only imports Cypress commands automatically.
  • q

    quaint-lamp-74622

    11/21/2022, 5:00 AM
    We have an issue that's completely stumped us. We have a parallel test setup in Github actions, and intermittently, one of the runs will fail to render the javascript in our React app, and we'll see an "unexpected token" error, because only the bare HTML has been loaded. We can suppress the error, but the site still hasn't loaded, and all tests fail. Navigating to the site works fine, and tests targeting the same URL work fine in the other parallel runners. I've tried doing a wait-for on the server URL, and also tried a trick I saw about using the file preprocessor to give each spec file a unique ID, so they don't clobber each other during parallel runs. Neither helped. Our project is open source, so I stripped the suite down to a single test, which just renders a page and looks for some text, and I turned on Cypress debugging. You can see one failure here: https://github.com/CMSgov/managed-care-review/actions/runs/3511357230/jobs/5882398830
  • h

    happy-megabyte-98400

    11/21/2022, 6:05 AM
    Hello, I'm trying to add Okta SSO login support to our E2E code. And, the code from the cypress docs is not working for me. I can't make heads or tails of the issue. So, it'd be much appreciated if you could help.
  • e

    eager-zoo-47289

    11/21/2022, 6:28 AM
    Hello everyone, I have a piece of code - **Cypress.on('window:before:load', (win) => { win.fetch = fetchz }) ** that I want to run globally on all specs and not need to implement it on every test separately, any Idea how can I do that?
  • r

    rough-jordan-79228

    11/21/2022, 6:46 AM
    Ya I created this one as a normal function - ashes on my head. Thats why the other Functions are Imported. Thx mate.👍
  • m

    mysterious-belgium-25713

    11/21/2022, 6:48 AM
    Add it to commands.js or index.js
  • s

    shy-london-83638

    11/21/2022, 11:17 AM
    Hi team, I am setting up of cypress+cucumber+typescript project....Im recieving this error. Can anyone please help me to resolve this
  • a

    adventurous-electrician-31004

    11/21/2022, 11:32 AM
    Hello guys! How are you? I'm using cypress in the company's projects. But I noticed that on first access (login) just running cypress fails on google chorme browser. This happens only in chorme, in internet explorer the tests pass normally. I've already tried to put chormeWebSecurity, as indicated by cypress itself, but in this case it is in an infinite loop at login. I've also put commands to clear the browser's cache and it didn't work either. Has anyone gone through this or have any suggestions?
  • f

    fresh-doctor-14925

    11/21/2022, 12:15 PM
    Hello guys How are you
  • a

    aloof-river-65135

    11/21/2022, 12:18 PM
    Hello All! Could you please help me with one topic? I need to copy the hyperlink using cypress then paste and open this copied link from the clipboard is it possible?
  • f

    fresh-doctor-14925

    11/21/2022, 12:21 PM
    If you just need to paste the link into a file, you would be better served by automating the process https://docs.cypress.io/api/commands/writefile
  • a

    aloof-river-65135

    11/21/2022, 12:27 PM
    hmm i mean i need to copy the link to the cliboard and then paste this link in cy.visit("copiedlink) nad open as a new page
  • f

    fresh-doctor-14925

    11/21/2022, 12:29 PM
    This sounds very manual. What's the use case here?
  • a

    aloof-river-65135

    11/21/2022, 12:30 PM
    I am doing the web app testing where we send the access link to the page for new user. Then we can copy the access link, then paste and we will be able to open the page or send the link to the emial
  • f

    fresh-doctor-14925

    11/21/2022, 12:31 PM
    It sounds like there will be a better way for you to handle this use case with less manual intervention, but if you're dead set on copying to clipboard, you could do something like in this blog https://egghead.io/blog/handling-copy-and-paste-in-cypress
  • a

    aloof-river-65135

    11/21/2022, 12:31 PM
    so i just want to copy this link and then open it without giving access to email and then click to this lick
  • a

    aloof-river-65135

    11/21/2022, 12:32 PM
    ok will try it, thanks Liam!
  • g

    gray-kilobyte-89541

    11/21/2022, 12:33 PM
    seems like maybe some JS bundle fails to load?
  • q

    quaint-lamp-74622

    11/21/2022, 2:33 PM
    Yup, that's our guess, too. But as to why...🤷‍♂️
  • e

    enough-fireman-4779

    11/21/2022, 2:53 PM
    hello is anyone here using github actions to run cypress tests? if yes, how am'i supposed to find the recorded videos or screenshots?
  • s

    stale-optician-85950

    11/21/2022, 2:56 PM
    I use this GH Actions package to forward failing test screenshots and videos to a dedicated Slack channel https://github.com/trymbill/cypress-slack-video-upload-action
  • e

    enough-fireman-4779

    11/21/2022, 3:02 PM
    thank you @stale-optician-85950 ,is there any other way except slack?
  • f

    fresh-doctor-14925

    11/21/2022, 3:03 PM
    Maybe this will be helpful? I'm going to need to do similar soon, as additional Cypress Dashboard seats are hella expensive https://github.com/cypress-io/github-action#artifacts
  • q

    quaint-lamp-74622

    11/21/2022, 3:25 PM
    What you want is to create artifacts. https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
  • s

    stale-optician-85950

    11/21/2022, 3:29 PM
    You can also set up GitHub Pages to receive your results, which saves the assets to an auto-generated branch. You'd also need to be using Mochawesome for this approach. I tried GH Pages for a while, but for me, the Slack approach was the best as our team lives on Slack.
  • s

    sticky-energy-17458

    11/21/2022, 3:33 PM
    Any solution to this?
  • g

    gray-kilobyte-89541

    11/21/2022, 3:55 PM
    store images and videos as artifacts on github https://github.com/cypress-io/github-action#artifacts
  • g

    gray-kilobyte-89541

    11/21/2022, 3:56 PM
    how do you get the newAmount? Are you sure it is not
    undefined
    ? Are you getting it from the page? I bet it is cypress chainer object
  • s

    sticky-energy-17458

    11/21/2022, 4:35 PM
    newAmount is the value which I am getting from the element and logging it so that I can use it further for assertions and conditions like if or else
1...148149150...192Latest