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

    rich-eye-60315

    12/30/2022, 9:46 PM
    How to do if else in cypress ? for eg. If this locator is present click if not move to next step
  • r

    rich-eye-60315

    12/30/2022, 9:46 PM
    please help
  • g

    gray-kilobyte-89541

    12/31/2022, 2:43 PM
    https://github.com/bahmutov/cypress-if
  • s

    straight-rose-89671

    01/02/2023, 3:16 PM
    Would there be any example to share the build cache between jobs in Github actions ? Or are they already cached and ready to use ?
    Copy code
    install:
      runs-on: ubuntu-latest
      steps:
    ...
      - name: Cypress install
              uses: cypress-io/github-action@v5
              with:
                runTests: false
                build: npm run build
    
    run-tests:
      needs: install
      runs-on: ubuntu-latest
      steps:
         - name: Run tests
            uses: cypress-io/github-action@v5
            with:
              install: false
              record: true
              parallel: true
  • r

    ripe-traffic-15039

    01/02/2023, 3:46 PM
    Hello, I need help, when I run cy.task('connectDB', query) sometimes I get this error: cy.task('connectDB') failed with the following error: > self-signed certificate Has this happened to anyone else?
  • r

    ripe-traffic-15039

    01/03/2023, 8:25 AM
    any ideas anyone?
  • a

    aloof-petabyte-2674

    01/03/2023, 8:56 AM
    nice, does it support cypress 9.x.x?
  • a

    aloof-petabyte-2674

    01/03/2023, 8:58 AM
    Im using "pat-s/always-upload-cache@v3.0.1" step for caching dependencies
  • a

    aloof-petabyte-2674

    01/03/2023, 8:59 AM
    you should specify paths which you want to cache and key. Example of key - blablabla-${{ hashFiles('./package-lock.json') }}. If dependences change - hash will change too and it won't use old cache
  • s

    straight-rose-89671

    01/03/2023, 9:00 AM
    Thanks, i just found out after using the upload/download-artifact my (laravel) server is actually not running in the background 🥲 Don't even know if the db i have setup is passed to the matrix jobs So i might just skip the whole use of matrix and running in parallel.
  • p

    purple-afternoon-2408

    01/03/2023, 10:09 AM
    Hi team, following https://docs.cypress.io/api/commands/session#Multiple-login-commands Why the session is not persisting:
    Copy code
    beforeEach(() => {
      cy.login()
    })
    
    it('should test something on the /home page', () => {
      cy.visit() // user is not logged in
    })
    where `cy.login`:
    Copy code
    cy.session(
          'default',
          () => {
            cy.visit('account/login');
            cy.doLogin(email, pass);
          },
          {
            validate: () => {
              cy.getCookies().should('have.length', 2);
            },
            cacheAcrossSpecs: true,
          },
        );
  • g

    gray-kilobyte-89541

    01/03/2023, 11:32 AM
    yes, i think
  • a

    acceptable-hamburger-48790

    01/03/2023, 11:41 AM
    When you say not persisting, what do you see in the test runner ? Also cy.login is a custom command ?
  • p

    purple-afternoon-2408

    01/03/2023, 11:54 AM
    Copy code
    it('should test something on the /home page', () => {
      cy.visit() // user is not logged in
    })
    That part of the code is not loading the page with the session, as if no login has been performed.
  • a

    acceptable-hamburger-48790

    01/03/2023, 11:55 AM
    cy.visit("/") ? why the parameter is empty
  • p

    purple-afternoon-2408

    01/03/2023, 11:56 AM
    that's not the case, it visits the page but the test user is not logged in
  • m

    melodic-egg-83620

    01/03/2023, 2:08 PM
    Question: Can I configure Cypress to use a local running instance of my application vs compiling with Webpack? I'm struggling to get Cypress' webpack config to compile our application, but my application runs without a hitch.
  • b

    bumpy-insurance-8581

    01/03/2023, 2:20 PM
    Hello, there is something strange about using cy.fixture() into Scenario Outline from cucumber. My test use the exact same file, it works on the first usage, the second usage doesn’t work. If I just use selectFile() command and set the path to the file without using cy.fixture() it works fine
  • b

    bumpy-insurance-8581

    01/03/2023, 2:25 PM
    input().selectFile('cypress/fixtures/fileName.csv', { force: true }); // Working fine for each case
  • b

    bumpy-insurance-8581

    01/03/2023, 2:26 PM
    Copy code
    cy.fixture('fileName.csv').as('fileToUpload');
    input().selectFile('@fileToUpload', { force: true }); // Not working for each case
  • b

    bumpy-insurance-8581

    01/03/2023, 2:26 PM
    Anyone know what is wrong here ?
  • c

    curved-thailand-93694

    01/03/2023, 3:04 PM
    Hello All , please guide me to read the content inside the tooltip.
  • g

    gray-kilobyte-89541

    01/03/2023, 3:08 PM
    are these standard
    title
    attributes? Or some custom tooltip library?
  • c

    curved-thailand-93694

    01/03/2023, 3:14 PM
    i am facing difficulty in getting the elements to which that tooltip belong to
  • g

    gray-kilobyte-89541

    01/03/2023, 4:18 PM
    I would share a page with similar tooltip examples
  • c

    curved-thailand-93694

    01/03/2023, 4:21 PM
    Sure, one moment sharing it
  • c

    curved-thailand-93694

    01/03/2023, 4:38 PM
    Hi @gray-kilobyte-89541 https://plausible.io/plausible.io here is the site where i would like to get the content of the tooltip , please see the video for the scenario thanks
  • g

    gray-kilobyte-89541

    01/03/2023, 7:08 PM
    ok, pretty easy, I will make a video some time later and will post it on my youtube channel or maybe will make a free lesson at https://cypress.tips/courses/cypress-plugins
  • p

    purple-afternoon-2408

    01/03/2023, 7:09 PM
    Can anyone please look into this?
    Copy code
    it('should test something on the /home page', () => {
      cy.visit() // user is not logged in
    })
    That part of the code is not loading the page with the session, as if no login has been performed.
  • p

    purple-afternoon-2408

    01/03/2023, 7:46 PM
    It seems that I cannot create a
    cy
    command with
    session
    like this:
    Copy code
    beforeEach(() => {
      cy.login() // I had to take whatever in that function and put it here instead which works
    })
    
    it('should test something on the /home page', () => {
      cy.visit() // user is not logged in
    })
1...240241242...252Latest