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

    gray-kilobyte-89541

    05/09/2022, 9:38 PM
    Cypress.config
    does not have "paidUsername" - that is your own value, right? You should use
    Cypress.env
    to store and retrieve it https://on.cypress.io/environment-variables
  • r

    rough-sugar-96535

    05/09/2022, 9:39 PM
    Yes that is my own value. I thought envs might be a better way to do this. Switching over to TS is revealing so many ways to improve legacy tests😅
  • g

    gray-kilobyte-89541

    05/09/2022, 9:42 PM
    just for you: new blog post "Set All Cypress Env Values Using A Single GitHub Actions Secret" https://glebbahmutov.com/blog/secrets-to-env/
  • r

    rough-sugar-96535

    05/09/2022, 9:44 PM
    This is really good, thank you
  • p

    powerful-orange-86819

    05/10/2022, 6:20 AM
    this is different page, not iframe, as per documentation https://docs.cypress.io/api/commands/origin#Callback-restrictions > It(cy.origin()) cannot run commands inside an element > > However, support is on our roadmap for inclusion in a future version of Cypress.
  • g

    gifted-boots-63851

    05/10/2022, 12:52 PM
    found my issue, I was deleting some stuff from the
    indexedDB
    object, it seems that this was the root of the stuck thing it now works as intended, finally!
  • m

    magnificent-finland-58048

    05/10/2022, 12:55 PM
    one might under appreciate how revolutionary this is Instead of storing each env var either under cypress.env.json, or .env, or any env file, under CI secrets one by one, we just copy that entire JSON to only 1 secret. Imagine you have 10 secrets in the env file. And you have 30 repos that use those 10 secrets. You'd have to individually setup 300 github secrets. O(n) ways it can go wrong. With this,1 secret per repo, the JSON copy pasted across to all secrets. O(1), even better if you make it a domain secret shared across repos. Genius!
  • g

    gray-kilobyte-89541

    05/10/2022, 1:57 PM
    I am thinking of a better approach. Imagine storing your secrets / test data in a service and having
    cy.dataSession
    integrate with it. A single API key and the data is fetched / cached updated for all your specs and runners
  • t

    thankful-insurance-51131

    05/10/2022, 2:17 PM
    I think you should use cy get for the
  • m

    magnificent-finland-58048

    05/10/2022, 3:47 PM
    😄 show me in a repo, I could use that
  • c

    calm-branch-41952

    05/10/2022, 11:50 PM
    Hello guys, Any suggestions (tutorials, articles) on how to trigger jenkins pipeline with every commit on testing environment?
  • a

    adorable-smartphone-87280

    05/11/2022, 2:24 AM
    Are Github actions involved? Can they be?
  • c

    calm-branch-41952

    05/11/2022, 4:57 AM
    @adorable-smartphone-87280 We're using bitbucket
  • m

    magnificent-finland-58048

    05/11/2022, 1:31 PM
    you might be able to translate the Github Actions knowledge in this tutorial to your case https://learn.cypress.io/tutorials In 2022, I'd question any org using something other that CircleCI, GHA or GitLab. Time to consider a migration. They make all those difficult things with older solutions much easier.
  • g

    gifted-boots-63851

    05/11/2022, 3:10 PM
    hey! I have different
    beforeEach
    (in fact
    Before
    from cucumber) functions called before some tests to setup network interceptions and stuff, but it seems one of
    beforeEach
    is making some conflicts with others that are setting up the
    cy.intercept
    and thus, no interceptions is made and the tests fail. the "faulty" before each is returning a Promise, is this right?
    Copy code
    ts
    // the bad one:
    Before({ tags: '@some-login' }, () => signInWithEmailAndPassword(foo, bar))
    
    // others Before:
    Before({ tags: '@mocks' }, () => {
      for (const m of mocksList) {
        cy.intercept(m)
      }
    })
    and in tests:
    Copy code
    gherkin
    Scenario: foobar
      Feature: qux
    
      @mock
      @some-login
      Scenario: etc
        ...
  • g

    gifted-boots-63851

    05/11/2022, 3:36 PM
    well it seems my
    Before
    hooks aren t all run before the other steps run, so it's related to
    cucumber
    ...
  • i

    incalculable-rainbow-89158

    05/11/2022, 7:29 PM
    Apologies in advance for my ignorance, I imagine that I am just overlooking something obvious. Attempting to migrating an Vue2 app from webpack4 to vite. ... I think I am pretty close to getting everything re-aligned. I notice that when running:
    cypress open-ct
    it properly calls into the
    'dev-server:start'
    handler... but wont, when I try to run the integration runner, like:
    cypress open
    ... even if I add the
    --dev
    flag, it throws an error about the
    /node_modules/scripts/start.js'
    MODULE_NOT_FOUND. Ive tried adding a
    start
    script to the package.json ... still no dice. ... Im tempted to use
    bahmutov/start-server-and-test
    , but assumed that
    @cypress/vite-dev-server
    should work on its own.
  • p

    plain-salesclerk-63038

    05/12/2022, 9:14 AM
    Hi everyone, I am having a problem with aws codebuild for the cypress. It is not running it is finishing suddenly as soon as the test starts. Do you have any advice or a solution for this? Thanks
  • m

    mammoth-fall-22117

    05/12/2022, 11:34 AM
    Hi! @plain-salesclerk-63038 What command did you use to invoke Cypress?
  • p

    plain-salesclerk-63038

    05/12/2022, 11:41 AM
    @mammoth-fall-22117 yarn run cypress:run works. I made it short as yarn cy:run.
  • m

    mammoth-fall-22117

    05/12/2022, 11:42 AM
    Interesting... So the Cypress is properly installed and run. Specs are found.
  • p

    plain-salesclerk-63038

    05/12/2022, 11:43 AM
    Yes it is overwhelming issue 😦
  • m

    mammoth-fall-22117

    05/12/2022, 11:43 AM
    In order to help more, I'd have to see your params and CI scripts
  • m

    mammoth-fall-22117

    05/12/2022, 11:43 AM
    But hold on
  • m

    mammoth-fall-22117

    05/12/2022, 11:44 AM
    Did you troubleshoot that error?
  • m

    mammoth-fall-22117

    05/12/2022, 11:44 AM
    "error gpu_init cc 453 passthrough is not supported gl is swiftshader cypress"
  • p

    plain-salesclerk-63038

    05/12/2022, 11:48 AM
    I tried to find a solution for this error. Maybe it is causing because of this. I am not sure. I couldn't find a solution for this error too. https://github.com/cypress-io/cypress/issues/18947
  • p

    plain-salesclerk-63038

    05/12/2022, 11:49 AM
    The pipeline is in aws linux.
  • m

    magnificent-finland-58048

    05/12/2022, 1:45 PM
    a passing run without any tests happens when re-running a Cypress Dashboard execution that has already happened. ex: get Cypress Dashboard execution to complete, in your CI provider hit rerun One way to deal with that is, in env vars passing a GitHub token to allow accurately detecting a build vs a re-run build https://github.com/muratkeremozcan/nextjs-cypress/blob/main/.github/workflows/main.yml#L32 I see you are running in FF, what happens with other browsers? What's your cross browser strategy like? Consider something like this https://cypress.slides.com/cypress-io/siemens-case-study#/16/0/2 Kolay gelsin! 😉
  • p

    plain-salesclerk-63038

    05/12/2022, 1:52 PM
    Teşekkürler Murat, Main problem is the tests are not able to start. I think it is about this error: Opening Cypress...
    [931:0512/133844.702999:ERROR:gpu_init.cc(453)] Passthrough is not supported, GL is swiftshader, ANGLE is
1...414243...192Latest