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

    creamy-train-56346

    12/14/2021, 11:20 AM
    Thank you Mark, it was very helpful!
  • a

    ancient-wire-34126

    12/14/2021, 3:56 PM
    Pretty sure I found a bug:
    Copy code
    This element <div.absolute.inset-0.bg-secondary-700.bg-opacity-90.backdrop-blur-sm> is not visible because it has CSS property: position: fixed and it's being covered by another element:
    Why does Cypress think my
    position: absolute
    element has
    position: fixed
    ? The parent does have
    position: fixed
    but it's certainly not covered by another element at the position I'm clicking
  • a

    ancient-wire-34126

    12/14/2021, 3:57 PM
    Here's the "proof". I click topLeft (doesn't matter where I click btw). The child is in the center, the click should hit the background, but Cypress thinks it doesn't
  • a

    ancient-wire-34126

    12/14/2021, 4:01 PM
    I reported a similar issue more than a year ago 😦 https://github.com/cypress-io/cypress/issues/7853
  • a

    ancient-wire-34126

    12/16/2021, 1:49 PM
    Are there any guides on how to use Cognito authentication with a secret instead of a password? The Cypress guides only cover username/password, but we use e-mail only with a verification code sent to the email and you can't use that in e2e tests.
  • f

    freezing-needle-5178

    12/16/2021, 1:52 PM
    @User my authentication flow is similar, and I've found it to be a huge pain with cypress.
  • a

    ancient-wire-34126

    12/16/2021, 1:52 PM
    😬 yup
  • f

    freezing-needle-5178

    12/16/2021, 1:53 PM
    I've taken a split approach for CI vs. local testing. In local development, my api server adds a special endpoint that returns the token that normally gets emailed out.
  • a

    ancient-wire-34126

    12/16/2021, 1:53 PM
    I was wondering if maybe we can use a custom VerifyAuthChallenge lambda function for testing only, so that whatever we send will pass. But I also run into issues with SES where I simply can't make fake email addresses to be verified for testing purposes
  • f

    freezing-needle-5178

    12/16/2021, 1:53 PM
    In CI, I'm using https://www.mailinator.com/, they have a pretty nice api that finds links from the emails automatically. But it's not exactly cheap either.
  • a

    ancient-wire-34126

    12/16/2021, 1:56 PM
    wow yeah, that's pretty steep
  • a

    ancient-wire-34126

    12/16/2021, 1:56 PM
    Do you guys use SES as well?
  • f

    freezing-needle-5178

    12/16/2021, 1:56 PM
    yes
  • a

    ancient-wire-34126

    12/16/2021, 1:57 PM
    Okay so how do you circumvent verifying email addresses, do you do that through that mailinator service?
  • a

    ancient-wire-34126

    12/16/2021, 1:57 PM
    I could technically intercept the cognito IDP calls, just to get around that, but I would still need a custom API endpoint for the auth challenge
  • f

    freezing-needle-5178

    12/16/2021, 1:59 PM
    Ah, we're not using cognito so far. We create a user with a special endpoint currently. We're still in a "white glove" mode at my company.
  • a

    ancient-wire-34126

    12/16/2021, 2:00 PM
    Got it. We're already down the rabbit hole haha!
  • f

    freezing-needle-5178

    12/16/2021, 2:00 PM
    Cypress definitely seems to assume that auth is a simple username/password that you can hit with an api. Anything more complicated than that, and I've found you're kind of on your own.
  • a

    ancient-wire-34126

    12/16/2021, 2:00 PM
    But I think providing some way to just accept the challenge based on a certain email + env could do the trick. I can't mock out Cognito, because of all the JWT stuff and we pass some user roles in there that are related to a business in our system
  • a

    ancient-wire-34126

    12/16/2021, 2:01 PM
    If I figure this out I might need to write a small blog post lol
  • f

    freezing-needle-5178

    12/16/2021, 2:01 PM
    you should!
  • f

    freezing-needle-5178

    12/16/2021, 2:01 PM
    or make a plugin, lol
  • a

    ancient-wire-34126

    12/16/2021, 2:02 PM
    If I only had time! 😄
  • a

    ancient-wire-34126

    12/16/2021, 2:08 PM
    Ok so I can circumvent the auth challenge, though making that secure will be a bit of a challenge
  • a

    ancient-wire-34126

    12/16/2021, 2:50 PM
    I'll use SSM to store some email/challenge combos so I can read it out in the lambda. Fun times
  • a

    ancient-wire-34126

    12/16/2021, 3:39 PM
    Now I'm struggling to connect to SSM in Cypress, as the support files run in the browser, not in Node. I don't think I can expose aliases from the plugins file either 😦
  • a

    ancient-wire-34126

    12/16/2021, 4:17 PM
    Ok, I'm on the right track here
  • a

    ancient-wire-34126

    12/16/2021, 9:02 PM
    Well, looks like I got it all working. That was more painful than I hoped 😦
  • i

    icy-whale-60937

    12/17/2021, 2:08 AM
    Hey! has anyone faced this issue before? [5407:1217/043419.721073:WARNING:vaapi_wrapper.cc(586)] VAAPI video acceleration not available for swiftshader [5407:1217/043419.721278:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is /usr/bin/node: --openssl-legacy-provider is not allowed in NODE_OPTIONS I ran cypress on my NextJS project: Node: v17.1.0 NextJS:12.0.7
  • a

    ancient-wire-34126

    12/17/2021, 6:59 PM
    Isn't there a hook that runs just once when Cypress starts? The global
    before
    hook gets called between each test when I run
    npm run cy:run
    which completely breaks everything because my seed/tear-down is dependent on AWS services and they're not instant. Example: removing users from Cognito actually doesn't happen instantly when they return the resolved Promise, it gets queued and then my data seeder will fail
1...424344...252Latest