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

    late-dinner-1440

    12/19/2022, 8:45 PM
    Hi friends, I try to develop a Cypress plugin for basic tests. It is working, when i generate all typescript files to javascript files. Now i have parallel both files. i want to work in typescript and export the files for the plugin npm repo, that they could be used by any user. Please do not try to provide known links on this thing. I really need help and contact. See you Roland https://github.com/ncatestify/cypress-base-plugin
  • f

    fresh-doctor-14925

    12/19/2022, 9:29 PM
    Based on this, it looks like @cold-cat-63632 has a stringified object on the
    data-field
    property. Not seen it implemented like that before... https://discord.com/channels/755913899261296641/763105090679865354/1054432192895389756
  • f

    few-oyster-82478

    12/19/2022, 10:00 PM
    any idea if it's possible to use cypress to authenticate the user in order to launch lighthouse? something similar to this (which uses puppeteer instead): https://github.com/GoogleChrome/lighthouse/tree/main/docs/recipes/auth the use case would be having an app that it's under a login wall so we need to enable authentication in order for lighthouse to run properly on the CI I know you can use cypress to authenticate the user in the app for doing e2e tests, but I was wondering if it's possible to do something similar to this recipe with cypress instead of puppeteer, I haven't found any examples on this searching in google
  • g

    gray-kilobyte-89541

    12/19/2022, 10:01 PM
    Ok, part 1 of the answer: https://github.com/bahmutov/cypress-examples/commit/c2da23a7bfaa834e55691a1a7ab15b84de8e43af part 2 (alternative solution): https://github.com/bahmutov/cypress-should-really/commit/96c7d1ff4f3eb1152211e11c7b26ed9ab822b420 part 3 (second alternative solution for Cypress v12 using cypress-map) https://github.com/bahmutov/cypress-map/commit/822a316d0b537b0140a40bd9b5ab8658a56728f4
  • b

    busy-advantage-45805

    12/19/2022, 10:10 PM
    Hello! I've been using cypress for almost a year and very happy with the results! Recently I started seeing an
    Copy code
    Error: EPERM: operation not permitted, utime
    more often when making a change to my test files, causing me to need to restart my test suite. I tried reinstalling, and now my end to end tests hang without starting up. I tried upgrading from 11.2.0 to 12.1.0 to no avail. I see no additional information on my command line. Any advice for how to debug this? Thanks in advance!
  • h

    hundreds-spoon-43121

    12/20/2022, 12:26 AM
    Issue still occurs for me with cypress 12. Any help on this is highly appreciated. For now, I am downgrading my cypress to v10.10.0 just so that chat messages do not disappear when switching sessions.
  • h

    hallowed-wolf-18137

    12/20/2022, 2:51 AM
    hello guys
  • h

    hallowed-wolf-18137

    12/20/2022, 2:52 AM
    how can i get full response in body dynamically?
  • o

    orange-wall-68184

    12/20/2022, 7:39 AM
    Hello, we are trying to integrate Bitbucket with Cypress but keep getting this error Does anyone know what the issue is?
  • u

    user

    12/20/2022, 9:29 AM
    Hello Guys, how can i change the spec supportFile which is set to: cypress/support/e2e.{js,jsx,ts,tsx}? I want to ignore all .js and jsx file
  • f

    fresh-doctor-14925

    12/20/2022, 9:30 AM
    Should just be a case of removing the
    js,jsx
    from those curly braces?
  • u

    user

    12/20/2022, 9:33 AM
    I just want to have ts and tsx. When I build in vs.net, new files are being created. So now i have e2e.js and e2e.ts so that's why i would like to ignore .js file
  • f

    fresh-doctor-14925

    12/20/2022, 9:37 AM
    So the issue is that vs.net is creating multiple right now? I don't think that's a cypress issue, but you have a couple of options to move forward Like the error says, you can either set the supportFile to
    cypress/support/e2e{ts,tsx}
    in your
    cypress.config.ts
    , or just delete
    e2e.js
  • s

    shy-ambulance-32896

    12/20/2022, 9:46 AM
    Thanks Liam!
  • f

    fresh-doctor-14925

    12/20/2022, 9:58 AM
    !duplicate
  • n

    nutritious-analyst-96582

    12/20/2022, 9:58 AM
    Uh oh, It looks like you have posted the same question in multiple channels. Help us prevent spam by removing any duplicates of your questions, Thanks! 😀
  • h

    handsome-ram-81495

    12/20/2022, 9:59 AM
    Sorry, couldn’t find the right channel
  • s

    shy-ambulance-32896

    12/20/2022, 10:01 AM
    Like that? Still have the issue
  • f

    fresh-doctor-14925

    12/20/2022, 10:03 AM
    That looks ok to me. Have you closed and reopened Cypress?
  • r

    rapid-addition-61206

    12/20/2022, 10:43 AM
    In Cypress, you can use the describe(), context(), and it() functions to organize your tests into a hierarchy and make them more readable and maintainable. Here is an example of how you could use these functions to structure your tests:
    Copy code
    js
    describe('My feature', () => {
      context('when the user is logged in', () => {
        it('should display the user's name', () => {
          // test code goes here
        });
    
        it('should allow the user to log out', () => {
          // test code goes here
        });
      });
    
      context('when the user is not logged in', () => {
        it('should display a login button', () => {
          // test code goes here
        });
    
        it('should redirect to the login page when the login button is clicked', () => {
          // test code goes here
        });
      });
    });
  • g

    gray-kilobyte-89541

    12/20/2022, 11:39 AM
    I am not sure what you mean by "get full response in body dynamically", can you explain more
  • h

    hallowed-wolf-18137

    12/20/2022, 11:41 AM
    hello I fixed the issue by encapsulating my response using JSON. stringify
  • f

    fresh-doctor-14925

    12/20/2022, 12:39 PM
    GitHub - ncatestifycypress-base-plugin...
  • n

    narrow-cpu-2218

    12/20/2022, 1:04 PM
    Hello! I wanna use intercept to change a single value in a response. Is there a way to achieve that without fixturing a whole file that has the response ?
  • f

    fresh-doctor-14925

    12/20/2022, 1:06 PM
    You can do that in the
    intercept
    callback by altering and returning the desired
    res
    value in
    req.continue()
    Docs here: https://docs.cypress.io/api/commands/intercept If you're going to be doing stuff like this I really recommend that you take this course https://cypress.tips/courses/network-testing
  • n

    narrow-cpu-2218

    12/20/2022, 1:18 PM
    Thank youuu!!!! I appreciate it
  • g

    gray-kilobyte-89541

    12/20/2022, 1:20 PM
    Yup, "Spec 21: Modify the server response using cy.intercept"
  • f

    fresh-doctor-14925

    12/20/2022, 1:23 PM
    And I was slightly wrong in my answer. Have amended the response, @narrow-cpu-2218
  • g

    gray-kilobyte-89541

    12/20/2022, 2:44 PM
    there is a bonus lesson about it: difference between
    req.continue
    and
    req.reply
    🙂
  • f

    fresh-doctor-14925

    12/20/2022, 3:22 PM
    Looks like I need to revisit that one 🙂
1...234235236...252Latest