https://cypress.io logo
Join Discord
Powered by
# general-chat
  • p

    polite-alarm-78904

    10/13/2022, 9:39 AM
    This is my yaml-file:
    Copy code
    `
    name: test
    
    on: [push]
    
    jobs:
      cypress-run:
        runs-on: ubuntu-latest
        container: cypress/browsers:node12.18.3-chrome87-ff82
        steps:
          - uses: actions/checkout@v2
          - uses: cypress-io/github-action@v4
            with:
              browser: chrome
              build: npm run build
              start: npm start & wait-on http://localhost:8080
              record: true
              command: npm run cy:run
              spec: |
                cypress/e2e/tests/admin/*
            env:
              CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
              GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
              CYPRESS_admin: true
              PUBLIC_PATH: "/_nuxt/"
              config-file: cypress.config.ts
  • c

    creamy-toddler-52067

    10/13/2022, 10:27 AM
    We are currently executing cypress automation on S3 hosted spa application. The test cases are running in local where as in git lab runner i am getting below error Cypress could not verify that this server is running: applicationurl we are verifying this server beacuase it has been configured as your 'baseurl' Note: corporate proxy settings are in place. Please suggest is there any additional things to be taken care on cloud front custom domains?
  • s

    some-thailand-3202

    10/13/2022, 11:40 AM
    Hi all, I've just started creating a framework on Cypress for a web-site testing. Checked the Tutorials. One quick question regarding the custom commands, please. On our web-site we are using additional attribute "data-qa-id" for unique web-elements identification. I've wrote the following command: Cypress.Commands.add('getByQAId', (selector)=> { return cy.get('[data-qa-id=${selector}]') }) When I type cy.getByQAId("FreeDownloadBtn").click() in a test, I get this error: Syntax error, unrecognized expression: [data-qa-id=${selector}] Could you help me, please. What is wrong in the code?
  • s

    stale-optician-85950

    10/13/2022, 11:52 AM
    You need to wrap the full selector with ` not '
  • s

    stale-optician-85950

    10/13/2022, 11:57 AM
    Like so:
  • m

    mysterious-wall-17437

    10/13/2022, 12:50 PM
    https://stackoverflow.com/questions/74049632/login-with-google-for-a-site-using-cypress-official-docs-about-google-auth-not-w I'm facing this issue for cypress posted on stackoverflow. . can any body help me please regarding this?
  • s

    some-thailand-3202

    10/13/2022, 1:19 PM
    Ah, I see. Thank you for help 🙂 It works now.
  • m

    mysterious-belgium-25713

    10/13/2022, 3:06 PM
    Do you know if lamdatest is using google auth like the cypress example. If its not reading the data from the localStorage then it will not work. What you can try is to login yourself manually and see if its setting your data in the localStorage.
  • l

    late-dinner-1440

    10/13/2022, 11:01 PM
    Hi friends, is there a way to detect all internal links with filtered duplicates? Checkout this here but its not working fine https://github.com/ncatestify/cypressio-base/blob/main/template/cypress/support/commands.ts
  • p

    polite-painting-51763

    10/14/2022, 1:04 AM
    Is there any way we could suppress Max limit reached error in Cypress recurse?
  • s

    stale-optician-85950

    10/14/2022, 7:53 AM
    I doubt it as then the code could enter an infinite loop.
  • p

    polite-painting-51763

    10/14/2022, 8:03 AM
    I want to limit the iteration max 10, once it reaches to max rather than throwing an error I want to continue
  • f

    fresh-doctor-14925

    10/14/2022, 8:28 AM
    Maybe a
    for()
    loop would be more suited to your use case?
  • p

    polite-painting-51763

    10/14/2022, 8:32 AM
    I feel using loops like for, do while is not good practice in Cypress. Rather i will try for .ntimes loadsh method. But would love to see such configuration in cypress-recurse not to throw an error if Max limit is breached
  • f

    fresh-doctor-14925

    10/14/2022, 11:43 AM
    In that case, your best course of action would be to raise an issue on https://github.com/bahmutov/cypress-recurse. It's a third party plugin that isn't maintained by Cypress, so you might be waiting a while.
  • p

    polite-painting-51763

    10/14/2022, 5:32 PM
    In my package.json values for scripts looks like this scripts:{ "Open":"cypress open --config baseurl=\"https://xcorp.qatesting.htc.com\"" } Is there any way if I can pass parameter after npm open command that would replace xcorp and qatetsing ? xcorp is the client and qatesting is the environment. It doesnt make sense if I write open command for different client and environment, so want to pass these values as a parameter and evaluate baseurl
  • f

    fresh-doctor-14925

    10/14/2022, 6:55 PM
    That's more a node.js question than Cypress. If it were me, I'd just have different scripts defined in my package.json. So this one would be
    Open-xcorp-qatesting
    If that isn't what you're after, you could pass them in as env vars in the command, then use those to form the baseUrl in your
    cypress.config.js
  • p

    polite-painting-51763

    10/14/2022, 6:57 PM
    Second solution sounds better. Thanks
  • f

    fresh-doctor-14925

    10/14/2022, 7:00 PM
    There's been some previous questions on here about how to pass env vars into
    Cypress.env()
    , that should show you what to do
  • e

    elegant-river-87347

    10/17/2022, 2:48 AM
    Hi anyone encountered like this? its failing to load the css?
  • g

    gray-kilobyte-89541

    10/17/2022, 10:35 AM
    you are using wildcard, so all requests will be intercepted. You probably want to match more precisely the ajax request you are interested in. You might benefit from studying this course https://cypress.tips/courses/network-testing
  • w

    wooden-army-62090

    10/17/2022, 3:01 PM
    Hi Team, I am integrating Cypress in okta. Can anyone help me with the below queries? 1. Does Cypress supports SAML? 2. Does Cypress supports Provisioning, if yes then which type of provisioning?
  • m

    mysterious-belgium-25713

    10/17/2022, 3:12 PM
    I'm not a okta expert but there is a Cypress doc page how to use okta and Cypress. https://docs.cypress.io/guides/end-to-end-testing/okta-authentication
  • i

    incalculable-rainbow-43330

    10/17/2022, 3:43 PM
    is there any way i can see all my Describes and iterations of each spec like ASP.net webAPI Help Page the idea is what is even i can have my spec have some data to display like abcSpec1.ts -> Describe1 --> it1 --> it2 -> Describe2 --> it1 --> it2 Like the one in ASP.net pages so that we have all data useful to see at one place related to test cases and test suites
  • s

    straight-kilobyte-77939

    10/17/2022, 9:30 PM
    Hi all .. Winter '23 salesforce release came out this weekend and it appears that we cannot log into sfdc anymore with cypress. Receiving this error
    • 1
    • 1
  • g

    green-queen-82383

    10/18/2022, 9:31 AM
    I have a question about the commands required to run cypress tests in a monorepo with pnpm workspaces using Github Actions. I install my dependencies in a separate step, because there are other non-cypress tests/linting running in other steps. The pnpm downloads are also cached. I get the error:
    Copy code
    The cypress npm package is installed, but the Cypress binary is missing.
    We expected the binary to be installed here: /home/runner/.cache/Cypress/10.10.0/Cypress/Cypress
    Reasons it may be missing:
    - You're caching 'node_modules' but are not caching this path: /home/runner/.cache/Cypress
    - You ran 'npm install' at an earlier build step but did not persist: /home/runner/.cache/Cypress
    Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.
    Alternatively, you can run 'cypress install' to download the binary again.
    The relevant actions:
    Copy code
    yaml
    - uses: pnpm/action-setup@v2.2.2
          - name: Get pnpm store directory
            id: pnpm-cache
            run: |
              echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
          - uses: actions/cache@v3
            name: Setup pnpm cache
            with:
              path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
              key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
              restore-keys: |
                ${{ runner.os }}-pnpm-store-
    - run: pnpm i
    - name: Cypress run
            uses: cypress-io/github-action@v4
            with:
              install: false
              working-directory: apps/myapp
              command: pnpm cypress:ci
              start: pnpm dev
              wait-on: 'http://localhost:3000'
    Anyone have a clue of what it is I need to do to get this working?
  • p

    powerful-orange-86819

    10/18/2022, 9:57 AM
    Doesn anyone know when is Gleb's presentation in the QA Global Summit that is live right now?
  • g

    gray-kilobyte-89541

    10/18/2022, 10:56 AM
    you also need to cache Cypress binary, read https://on.cypress.io/caching
  • g

    gray-kilobyte-89541

    10/18/2022, 10:58 AM
    https://geekle.us/schedule/qa22vol2 shows 14:50pm EST = 18:50 UTC
  • m

    mysterious-belgium-25713

    10/18/2022, 11:30 AM
    I created a demo project with pnpm. I had no caching issues but my pipeline is more simpler than yours since it's not a full project https://github.com/Xvier/cypress-pnpm
1...868788...127Latest