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

    broad-flag-64487

    12/11/2021, 12:07 AM
    Has anyone experienced scalability issue with web UI integration testing that you can share? Wondering how many web UI Integration tests you usually have. We use Cypress since mid last year but grew very fast. Thanks in advance.
  • m

    melodic-apple-72412

    12/13/2021, 11:33 AM
    Hello Team, I am trying to drag an element's bottom right corner which is not working for me. I have even used
    @4tw/cypress-drag-drop
    .move method, unfortunately no success. I have created a simple project with my application. If someone could help me, will be great. https://github.com/mekalag/cypressProj.git
    w
    • 2
    • 7
  • g

    great-potato-68972

    12/13/2021, 1:36 PM
    cypress- report-mochaawesome
    • 1
    • 1
  • h

    handsome-cartoon-58565

    12/13/2021, 6:29 PM
    Hey, i would like to understand why trying to run a Cypress image inside docker throws error Could not find a Cypress configuration file, exiting. Yes, i don't have cypress.json file, but docs say that it should be created automatically at first open of Cypress Test Runner https://docs.cypress.io/guides/references/configuration#cypress-json is it about launching it from docker or i am missing some detail? Part of
    docker-compose.yml
    file:
    Copy code
    yml
      cypress:
        image: "cypress/included:4.4.0"
        container_name: pev-cypress
        depends_on:
          - node
        environment:
          - CYPRESS_baseUrl=http://127.0.0.1:${APP_INTERNAL_PORT}
        working_dir: /e2e
        volumes:
          - ./test/e2e/:/e2e
  • f

    fast-cpu-20763

    12/14/2021, 5:12 PM
    Hello everyone, nothing happens on clicking on a anchor button inside a form in case of Cypress. The HTML is as following and I am trying to click on the Add to cart button
    Copy code
    js
    <form action="/products/add-to-cart" id="purchase-form" method="post" role="form" novalidate="novalidate">
       <div class="form-inline" role="form">
          <label>Quantity:</label>
          <input type="number" step="1" class="form-control numbers-only valid" aria-label="Quantity" value="1" min="1" id="quantity">
          <a href="javascript:void(0);" class="btn btn-secondary" id="add-to-cart"><span class="novicon novicon-cart"></span>Add to Cart</a>
       </div>
    </form>
    I noticed that in the case of Cypress the button is unresponsive and nothing happens on clicking on it manually as well, but it works fine generally. What is the reason for this? Why is it not working?
  • a

    ancient-wire-34126

    12/14/2021, 6:05 PM
    Is there a reason you're not using an actual button?
  • f

    fast-cpu-20763

    12/15/2021, 5:15 AM
    Well I am not sure why they haven't used a button. I am working on a freelance project and had to do a POC using cypress.
  • a

    adventurous-country-21192

    12/15/2021, 11:17 AM
    I think it only creates it when using cypress open and not when cypress run
  • a

    adventurous-country-21192

    12/15/2021, 11:19 AM
    how looks your cypress code?
  • b

    big-pharmacist-23494

    12/15/2021, 12:36 PM
    First time here
  • m

    melodic-apple-72412

    12/17/2021, 3:05 PM
    Hello, can someone look into this repo ? I want to do a simple drag on a element. But its not working
  • w

    wonderful-match-15836

    12/17/2021, 11:01 PM
    I had a suggestion for this but I haven’t tried it out, but I’ve been meaning to come back to it and play around (and at this moment I forget the details). Please ping me if I don’t reply by Monday. I’ve just been in some dragging tests so hopefully that will help figure out what is going on.
  • b

    broad-potato-69393

    12/18/2021, 7:21 PM
    guys.. surely this is a common use case but I can't find anything decent online about this. I have a rails API. I have a React frontend. I'm doing e2e tests with Cypress. I want to be able to seed my DB from Cypress, through Rails. Questions: 1. what's a good way create a (for example) a user with values provided at the Cypress level? 2. what are your thoughts on cleaning and repopulating DB before each test? Surely it'd be quite slow doing this each time? Alternatively, would you recommend hardcoding different kinds of fixtures on the Rails side, and just referring to them in Cypress? Which would mean not having to actually clean the DB 3. Would you be connecting to the DB directly from Cypress? Or would you create some routes through Rails, to achieve said functionality? I'm just curious to hear if anyone has done this and any possible approaches! Thanks in advance
  • w

    wonderful-match-15836

    12/20/2021, 12:57 AM
    Drag issue
  • q

    quiet-tent-29166

    12/20/2021, 11:46 PM
    So, how big are your tests in number of spec files in your test suite? I am trying to break up the numbers but finding this thing grows pretty quick. I am now trying to organize run with cypress-grep. I am just curious am I only one with growing test suite.
  • b

    broad-potato-69393

    12/21/2021, 4:20 AM
    I don't think you're the only one, but it depends what 'big' is to you. I've had at most 10 feature style tests. I've seen around 60 in a repo... think it was the 'forem' project
  • q

    quiet-tent-29166

    12/21/2021, 2:00 PM
    As I do more this kind of takes a life
  • b

    broad-potato-69393

    12/21/2021, 3:15 PM
    tbh I haven't found a solution for this yet... just the nature of the tests means that they're quite heavy duty. lots of network calls, some DB seeding etc etc.. repeating the same setup over and over again
  • f

    future-eye-56254

    12/21/2021, 9:26 PM
    Has anybody been able to read test data from an excel file as an input for API requests and verification of responses
  • i

    important-river-75795

    12/21/2021, 10:13 PM
    Is the excel file a hard requirement? Looks like someone has done it https://blog.knoldus.com/reading-data-from-excel-file-cypress/ , but I would probobly just make a csv out of the excel file and use it as a fixture
  • q

    quiet-tent-29166

    12/21/2021, 10:23 PM
    So I know in cypress.json you can use tag in array "ignoreTestFiles" is there a way to do this by folder name ? to exclude a folder or group in folder instead of each individual file.
  • i

    important-river-75795

    12/21/2021, 10:26 PM
    Yes, ignoreTestFiles accepts glob
  • u

    user

    12/22/2021, 9:58 AM
    Is there a release notes/changelog page for side packages like
    @cypress/vue
    ,
    @cypress/webpack-dev-server
    etc?
  • u

    user

    12/22/2021, 9:59 AM
    Can't seem to find it anywhere
  • u

    user

    12/22/2021, 10:02 AM
    My bad, found it into the monorepo single packages folders
  • u

    user

    12/22/2021, 11:28 AM
    When overriding
    should
    command to add custom assertions, new 9.2 types mark
    subject
    as the assertion name (eg.
    have.color
    ) and
    expectation
    as the assertion parameter type Is this correct? I think something is off, I would expect
    subject
    to be some kind of value chained from
    expect()
    ,
    expectation
    as the assertion name and the assertion parameter type into following args
  • u

    user

    12/22/2021, 11:33 AM
    Example code
    Copy code
    ts
    declare global {
      namespace Cypress {
        interface Chainer<Subject> {
          /**
           * `have.css` matcher compares the computedColor, which is a rgb() value.
           * This custom matcher instead accept any valid CSS color format.
           *
           * @example
           *    cy.get('foo').should('have.color', 'white')
           *    cy.get('foo').should('have.color', '#fff')
           *    cy.get('foo').should('have.color', 'var(--q-primary)')
           */
          (chainer: 'have.color', type: string): Chainable<Subject>;
        }
      }
    }
    
    
    Cypress.Commands.overwrite(
        'should',
        (originalFn, subject, expectation, ...args) => {
          // subject has type `have.color` here
          // expectation has type `string` here
          if (expectation === 'have.color') {
            return originalFn(subject, () => { /* ... */ });
          }
    
          return originalFn(subject, expectation, ...args);
        },
      );
  • u

    user

    12/22/2021, 12:13 PM
    Seems like the correct way to add a custom assertion is via Chai methods, trying that route instead
  • t

    tall-airplane-97209

    12/23/2021, 6:36 AM
    I have a simple textbox component that I am typing some text into:
    Copy code
    cy.get('[data-cy=specialInstructions]').should('be.visible').clear().type("Text Here")
    Around 50-60% of the time in CI-CD I only get the "Here" or sometimes "x Here" etc. - How is this possible? My understanding is the should be visible chainer wouldn't let Cypress try and type anything until the component is ready?
  • c

    cold-terabyte-49897

    12/23/2021, 8:33 AM
    Hi everyone, I have a mid-scale web app and want to ask something. I have a page that includes a searchbar and table for search results. Our some users don't have any data and some users have a results for this page. I am giving a user information from Cypress.env and logging in with this information. If given user doesn't have results ( I need to provide this info from cypress.env too?) want to test that results are empty and that means everything ok. If user has a results for page (need to provide this info from cypress.env too), I want to test that there are any results. What is best practices or strategies for kind of this problem? thanks in advance.
1...252627...127Latest