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

    future-caravan-75733

    08/07/2022, 11:30 AM
    I think you can't 😢
  • l

    limited-room-30929

    08/07/2022, 12:08 PM
    I really hate the cjs vs esm thing right now
  • l

    limited-room-30929

    08/07/2022, 12:08 PM
    especially if it is autodetected
  • l

    limited-room-30929

    08/07/2022, 12:09 PM
    totally defeats the support for top level await
  • w

    white-monitor-99293

    08/07/2022, 4:14 PM
    Hey guys, i'm new to cypress and i'm trying to start testing my react app. I'm trying to do a simple login but something is wrong. Looks like i can normally send my user and password but for some reason, it redirects back me to login. There is anything that i should know before starting this type of test?
  • w

    white-monitor-99293

    08/07/2022, 4:15 PM
    Btw, my token is on the request
  • s

    stale-wire-41120

    08/07/2022, 6:43 PM
    How to instrument code coverage ,please help me
  • h

    handsome-library-24428

    08/07/2022, 9:17 PM
    Can anyone provide guidance on how to configure Cypress testing for a frontend microservices architecture? I'm trying to configure my testing environment with a parent app, and a child microservice app and have them interact cohesively
  • a

    acceptable-hamburger-48790

    08/08/2022, 9:42 AM
    @magnificent-finland-58048 Has written this https://dev.to/muratkeremozcan/triple-combined-code-coverage-for-react-apps-with-jest-cypress-component-and-e2e-tests-using-github-actions-1icc which might assist you
  • h

    helpful-truck-53930

    08/08/2022, 11:17 AM
    Hello, i have within a test suite a before each loop. And in the loop i put the cookies with setCookie() and it works. But i want to outsource the cookie statement in a separate file. In Wich file i can put it in and Wich syntax i should use ? Thanks
  • b

    better-agency-60933

    08/08/2022, 12:01 PM
    Hi there, I have a strange behavior with Cypress in React. I have a logic that send request to server when clicking a button but for some reason the request sometimes not firing which fail the test.
  • b

    better-agency-60933

    08/08/2022, 12:01 PM
    Anyone experienced it before?
  • f

    fierce-lion-2381

    08/08/2022, 12:02 PM
    Can I show somehow values in this instead of Array(6)
  • g

    gray-kilobyte-89541

    08/08/2022, 12:12 PM
    Use https://cypress.tips/search to find the answer
  • h

    helpful-truck-53930

    08/08/2022, 12:25 PM
    Hello there, i had outsource the setCookie() command in the command.js and i retrieve it in the beforeEach loop. But now they set in every test in the suite the cookies. But i want that they set it only 1 time. How i can handle that ? Greetings
  • f

    fresh-doctor-14925

    08/08/2022, 12:42 PM
    If you want them to only be set in one scenario, you could call that command in the
    it()
    instead of the
    beforeEach()
    Cookies should clear between
    it()
    blocks, but if you want to be certain you can make use of
    cy.clearCookies()
  • h

    helpful-truck-53930

    08/08/2022, 12:58 PM
    I see. But i want to put it in every test case. The practice should look like my following description: Assuming I delete the cookies and run individual test cases or the entire test suite, the program should set the cookies. if the cookies are set for the 1st test case, regardless of whether only 1 test case or the entire suite is run, the cookies should no longer be set for the 2nd test case. my current solution looks like I put the setCookie() function in the commands.js and query it in the beforeEach.
  • f

    fresh-doctor-14925

    08/08/2022, 1:00 PM
    I'm having trouble understanding exactly what it is you are trying to achieve
  • h

    helpful-truck-53930

    08/08/2022, 1:04 PM
    I have a test suite. I want to put cookies in it. However, my current solution is that when I run the test suite in the application, the cookies are set for each test case. However, the program should recognize that if the cookies are already set, they will no longer be set in the 2nd test case if I run a test suite.
  • f

    fresh-doctor-14925

    08/08/2022, 1:05 PM
    But like I said above, cookies get cleared in between
    it()
    blocks. This is by design in Cypress
  • f

    fresh-doctor-14925

    08/08/2022, 1:06 PM
    What you're doing currently is correct
  • m

    melodic-egg-83620

    08/08/2022, 1:07 PM
    **Vite + Cypress**: How to get them to work together? Vite included a change from using
    process.env
    to
    import.meta.env
    for all env variables - this is quite a problem because Cypress, when I run
    cypress open/run
    , is trying to transpile my Cypress code, which has imports of files using
    import.meta.env
    . It fails with webpack compilation errors. Has anyone resolved this issue for themselves?
  • h

    helpful-truck-53930

    08/08/2022, 1:09 PM
    Yeah, but if i try this solution and i run a test suite the cookies will be set also every time or not? And i tried it. If i had set first time the cookies manually then in the second test the cookie popup doesn't came up.
  • h

    helpful-truck-53930

    08/08/2022, 1:11 PM
    It is possible that cypress doesn't clear the cookies between the it blocks ?
  • f

    fresh-doctor-14925

    08/08/2022, 1:14 PM
    If running with
    cypress open
    , yes, I believe this can happen. Maybe not with
    cypress run
    I know the Cypress team is trying to clear the browser as much as possible between
    it()
    blocks, so I don't recommend relying on just being able to set cookies for the first
    it()
    . Might work now, but could break in a future release Best to assume that cookies will be cleared between
    it()
    blocks and set the cookies in
    beforeEach()
  • h

    helpful-truck-53930

    08/08/2022, 1:22 PM
    I see. Ok thanks for your help. I hope in the future cypress will deliver a solution in terms of this topic. Now i let the solution that in every test case will be set the cookies. Thank you 👍🏼
  • f

    fast-ocean-24805

    08/08/2022, 1:22 PM
    https://discord.com/channels/755913899261296641/763105090679865354/1005123652334923786
  • f

    fast-ocean-24805

    08/08/2022, 1:23 PM
    👆🏽 Is anyone at cypressHQ aware of the expired SSL cert that is causing issues for some?
  • g

    gray-kilobyte-89541

    08/08/2022, 2:07 PM
    You don't want one test to log in and affect other tests that might try to test the unlogged state. If you do want to set the cookies once, I would suggest using
    beforeEach
    hook, and even you can do it on demand. Check out https://github.com/bahmutov/cypress-data-session for example
  • d

    dry-table-21937

    08/08/2022, 3:02 PM
    https://discord.com/channels/755913899261296641/755913900024791046/1005825556429942844
1...123124125...252Latest