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

    polite-potato-14743

    12/15/2022, 8:01 PM
    all my subsequent cy.visit take my to login page, even though i've already done that w/ a session. Was working yesterday, i think i just dont understand it yet.
  • p

    polite-potato-14743

    12/15/2022, 8:06 PM
    it seems like the test is moving into test body before the cy.session is actually finished running and thats messing it up
  • p

    polite-potato-14743

    12/15/2022, 10:33 PM
    if i put a "wait" at the end of my session login function, everything works. Thoughts?
  • t

    thankful-wire-37848

    12/16/2022, 7:31 AM
    Forgot an
    async/await
    at some point which causes some cookie not to be set in time maybe? We'd need more concrete info/code to asses this probably.
  • l

    little-kitchen-65586

    12/16/2022, 9:29 AM
    Hello, I have a problem, I want to test the registration form with a faker. I don't know how to test the second field for passwords, I have the password and confirm password field. The problem is how to generate the same password in the second field.
  • f

    fresh-doctor-14925

    12/16/2022, 9:41 AM
    Hello I have a problem I want to test
  • f

    fast-greece-21687

    12/16/2022, 1:06 PM
    hey i am new to cypress, cannot find a solution to this error:
    Copy code
    Can't run because no spec files were found.
    but on the console its showing me correct path of the file. command that im running:
    Copy code
    "test": "env-cmd -f .env npx synpress run --configFile synpress.config.js --config supportFile='tests/support/index.js' --spec tests/e2e/specs/*.cy.{js,jsx,ts,tsx}"
  • n

    nice-lifeguard-81070

    12/16/2022, 1:21 PM
    hey , how can i integrate cypress code coverage report in nuxt3 ?
  • f

    fresh-doctor-14925

    12/16/2022, 1:25 PM
    Please stop
  • t

    thousands-house-85089

    12/16/2022, 1:45 PM
    cypress is looking for 'describe' and 'it' blocks within your spec, it looks like it found the spec file but didn't find the syntax it wants for tests within that spec file. Do you have the spec file in the correct syntax something like this?
  • t

    thousands-house-85089

    12/16/2022, 1:47 PM
    @fast-greece-21687 what happens if you comment out your spec file, and replace all the code so the only thing in the file is this: **describe('test1', () => { it('does a thing', () => { expect(1).to.eq(1) }) })**
  • t

    thousands-house-85089

    12/16/2022, 1:48 PM
    Does Cypress allow the test to run and show a pass? (It should do)
  • t

    thousands-house-85089

    12/16/2022, 1:48 PM
    At least that will rule out if it's your code or not
  • b

    billions-receptionist-99356

    12/16/2022, 1:57 PM
    Hello , I tried many solutions but it still not working😢
  • f

    fresh-doctor-14925

    12/16/2022, 2:04 PM
    To be honest this sounds more like your Jenkins runners are being blocked by your firewall, rather than any Cypress issue
  • s

    square-honey-48197

    12/16/2022, 10:12 PM
    Anyone know why my
    before
    hook is timing out in less than 4 seconds, despite these settings in my config? config sample:
    Copy code
    TypeScript
        screenshotsFolder: 'screenshots',
        viewportWidth: 1280,
        viewportHeight: 720,
        videosFolder: 'videos',
        requestTimeout: 10000,
        responseTimeout: 160000,
  • n

    nice-lifeguard-81070

    12/17/2022, 2:34 AM
    hey , everyone to integrate cypress in nuxt3 , also use vite-plugin-istanbul and I write this code but it doesn't work , can anyone help me on this ? module.exports = (on, config) => { require('@billions-barista-30103/code-coverage/task')(on, config) // IMPORTANT to return the config object // with the any changed environment variables return config }
  • t

    thankful-wire-37848

    12/17/2022, 2:29 PM
    This is the e2e testing channel. Please post your question to the #823985226320707584 channel.
  • f

    fast-greece-21687

    12/17/2022, 5:59 PM
    Hey everybody, is anybody familiar with synpress here that could me help me setting it up 🙂
  • f

    fast-greece-21687

    12/17/2022, 6:18 PM
    i want to write e2e test on an web3 application using metamask
  • a

    acceptable-tailor-43291

    12/18/2022, 2:16 PM
    Hello folks, How to tests an api response that depends on another api response in the same tests (it block)? For example, Post Api 1:
    /create/bill
    returns an
    id
    of the create bill, (id is 123456) Post api2:
    /create/checkout?billId=123456
    I am running this two command synchronously from api1 to ap2 in my app.
    Copy code
    js
    let newId = "";
    cy.intercept(post, Api1).as('api1');
    cy.get('#submit').click().then(() => {
      cy.wait(@api1).its('response.status').should('eq', 200);
    
    cy.get(@api1).its('response.body').then((body) => {
    newId = body.id;
    });
    
    });
  • g

    gray-kilobyte-89541

    12/18/2022, 4:20 PM
    I use https://github.com/bahmutov/cypress-aliases and without it you can use different strategies.
  • b

    billions-king-35651

    12/19/2022, 9:05 AM
    Hello everyone, Please, I need your help. I am trying to run some tests but I am not getting the desired result.
    Copy code
    js
    cy.get('[data-cy="wallet-transactions-body"]')
        .filter(":visible")
        .should("exist")
        .should("be.visible");
    The first command
    get
    is showing
    2
    elements on cypress dashboard with a warning:
    One or more matched elements are not visible.
    However, the second command is showing
    0
    with an error:
    Timed out retrying after 4000ms: Expected to find element: :visible, but never found it. Queried from element: [ <tbody.jsx-c0c96518d1509577>, 1 more... ]
    However, the table is displaying well on the cypress dashboard webpage and I keep wondering why the test is failing. Note: I am trying to fetch the content of the table from and API before rendering it on the webpage. Anything that can be done to make this test pass will highly be appreciated. Thanks
  • f

    fresh-doctor-14925

    12/19/2022, 9:55 AM
    Hello everyone
  • s

    stocky-kilobyte-57323

    12/19/2022, 1:17 PM
    cy.get('body').type('{ctrl+k}').wait(1000)
    any reason this shouldn't work for a global command palette shortcut?
  • r

    rough-agent-43374

    12/19/2022, 1:31 PM
    Hey guys has someone been confronted with this behavior of cypress: So basically everytime cypress types "testRejectReason" for some reason the input field of the second picture is also changed (This should not happen). Here is a part of my cypress code:
    Copy code
    cy.get('.col-lg-8 > .form-control').clear();
     cy.get('.col-lg-8 > .form-control').type('testRejectReason');`
    This is the first input field:
    Copy code
    <div class="row">
      <div class="col-lg-4"><label class="font-normal"> <input icheck type="radio" name="dataState" ng-model="dataToEdit.rejectionReason" ng-value="50"> {{                              "            page.merchant__eRx.rejection_reasons.other_reason" | translate }}</label></div>
      <div class="col-lg-8"><input name="otherReason" ng-model="dataToEdit.otherReason" type="text" class="form-control" /></div>
    </div>
    And this is the second input field, which should actually not be changed:
    Copy code
    <div class="input-group" style="display: flex; flex-direction: row; align-items: center; justify-content: center; width: 160px">
      <input name="pzn" ng-model="dataToEdit.pzn" style="padding-left: 8px; padding-right: 0" type="text" class="form-control" />
      <button class="input-group-label btn-primary" ng-disabled="itemLoading" ng-click="getItem()">
        <span ng-show="itemLoading"><i class="fa fa-refresh fa-spin" style="margin-right: 10px"></i></span>
        {{ 'buttons.go' | translate }}
      </button>
    </div>
  • t

    thankful-wire-37848

    12/19/2022, 1:42 PM
    Your selector
    cy.get('.col-lg-8 > .form-control')
    isn't unique for the input you are trying to test. Why not improve the selector before initiating the type command?
    cy.get(':input[name=otherReason]').type('testRejectReason')
  • r

    rough-agent-43374

    12/19/2022, 1:44 PM
    Makes sense, thank you for the hint 🙂
  • l

    lemon-wall-91819

    12/19/2022, 2:08 PM
    Hello my fellow Cypressians I have a question, I am doing e2e test and checking the text on the screen the test I am trying to write is causing an issue. cy.contains('Bienvenue sur notre tableau de bord d'intégration') but the word "d'intégration" has the apostrophe in the word after the d which is causing the statement not to be liked. How do I get around this ?
  • l

    lemon-wall-91819

    12/19/2022, 2:18 PM
    Figured it out, had to escape the character with a \before the apostrophe
1...170171172...192Latest