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

    swift-controller-90067

    06/20/2022, 12:50 PM
    hi, managed to get my cypress e2e tests running in gitlab but some fail, all for the same reason of
    Copy code
    is being covered by another element:
    `<iframe id="webpack-dev-server-client-overlay"
    anyone else seen this? I can only find one google result which didn't help. my gitlab cicd yml is ```yml stages: - test test: image: cypress/browsers:node12.14.1-chrome85-ff81 stage: test script: - npm ci - npm start & - npx cypress run```it's a react project. let me know if there is a better place to post this, had posted earlier but got no answers
  • g

    gentle-barista-51421

    06/20/2022, 3:03 PM
    Hello, After update cypress to the latest 10.1.0, i am getting the following error on CI NoUserPoolError: Authentication Error in I am using Cypress.Commands.add('signIn', (username, password) => { cy.then(() => Auth.signIn(username, password)).then((cognitoUser) => { const idToken = cognitoUser.signInUserSession.idToken.jwtToken; const accessToken = cognitoUser.signInUserSession.accessToken.jwtToken; const makeKey = (name) => CognitoIdentityServiceProvider.${cognitoUser.pool.clientId}.${cognitoUser.username}.${name}; cy.setLocalStorage(makeKey('accessToken'), accessToken); cy.setLocalStorage(makeKey('idToken'), idToken); cy.setLocalStorage( CognitoIdentityServiceProvider.${cognitoUser.pool.clientId}.LastAuthUser, cognitoUser.username ); }); aws-amplify with aws cognit Any idea how can i solve this issue?
  • l

    late-house-1562

    06/20/2022, 6:44 PM
    I'm trying to use
    cy.clock().tick()
    to advance clocks xx hours in a test. Once I advance the clock, is there a way to have the faked time be known by the server that I'm testing?
  • l

    late-house-1562

    06/20/2022, 6:57 PM
    To be clear, I need to fake time for the server (nodejs).
  • l

    late-house-1562

    06/20/2022, 7:05 PM
    The solution I'm going to explore (which is still only a partial) is to fake the time when I seed my test databse.
  • l

    late-house-1562

    06/20/2022, 7:23 PM
    Thinking about this more, my idea doesn't really work unless I use
    cy.wait
    which I understand is an anti-pattern, and would slow my tests down considerably.
  • a

    adamant-memory-22241

    06/21/2022, 3:51 AM
    trying to run cy tests in docker using command docker run -it -v $PWD/e2e -w /e2e cypress/included:9.7.0 run i get this error in windows "Could not find a Cypress configuration file in this folder: /e2e" am I missing anything
  • a

    alert-quill-14780

    06/21/2022, 5:14 AM
    Hello, I have a couple of questions about parallelization in AWS CodeBuild. 1. Is it possible to run unlimited parallel tests with the free plan? 2. if 1 is Yes, can I see the test results in CodeBuild Artifact or somewhere else? I have set up parallel tests in AWS CodeBuild and am checking the operation in Cypress Dashboard. However, the test results have reached the free plan's limit of 500. I am getting error messages on my dashboard, but I can still run parallel tests. Can I continue to use it as is? Cypress Dashboard is not necessarily required if I can see my test results.
    • 1
    • 1
  • l

    limited-room-30929

    06/21/2022, 7:35 AM
    This is probably the webpack error overlay blocking the iframe the tests run in
  • l

    limited-room-30929

    06/21/2022, 7:37 AM
    so if there is any error that is reported to webpack, code error, type error and so on it will show that in the overlay and that hinders the execution of the test, so maybe disable it for tests
  • s

    swift-controller-90067

    06/21/2022, 9:20 AM
    thank you - it also tells me
    Fix this problem, or use {force: true} to disable error checking.
    is that what you mean by disabling? I don't actually know where
    {force: true}
    is meant to go tho - do you?
  • w

    witty-rainbow-98852

    06/21/2022, 10:00 AM
    Hi all! I'm trying to deploy my remix + cypress (github actions) but it gave me an error when trying to run cypress What is that module? Why it cannot be found?
  • w

    witty-rainbow-98852

    06/21/2022, 10:02 AM
    inklab
    is the project name
  • w

    witty-rainbow-98852

    06/21/2022, 10:05 AM
    tell me if you need more info
  • s

    swift-controller-90067

    06/21/2022, 11:01 AM
    so using a more recent cypress docker image for gitlab cicd testing seems to have solved my problem. now a new problem - some tests timeout inconsistently, whereas locally they all pass. any ideas? I've tried upping the defaultCommandTimeout in cypress.config.js to no avail.
  • g

    gentle-dress-1046

    06/21/2022, 12:02 PM
    is there a way to wait for element certain amount of time, and continue to found/not found logic
  • g

    gentle-dress-1046

    06/21/2022, 12:04 PM
    if I will cy.get an element it will fail at the end, I just need to to try to get an element and if it couldn't catch it do something else
  • f

    fresh-doctor-14925

    06/21/2022, 12:26 PM
    Here's an article that will give you some insight. In short: it's doable, but not advisable https://docs.cypress.io/guides/core-concepts/conditional-testing
  • a

    adorable-smartphone-87280

    06/21/2022, 12:49 PM
    Are you on Cypress 10?
  • a

    adamant-memory-22241

    06/21/2022, 12:50 PM
    Sorted ths out it was working directory which was incorrect
  • s

    swift-kitchen-62493

    06/21/2022, 1:25 PM
    what i can do if my website have something like this? it;s a windows popup i guess
  • b

    brash-tiger-52405

    06/21/2022, 1:40 PM
    Hi all! why can the const only be called within the cy. command? I want to store an input in a variable to compare later.
  • f

    fresh-doctor-14925

    06/21/2022, 2:11 PM
    Because it’s in the scope of an arrow function. Also, better to alias with
    as()
  • s

    steep-receptionist-93069

    06/21/2022, 2:30 PM
    Hi everyone. I try to run cypress for testing react components but catch error. Can anyone help me?
  • s

    steep-receptionist-93069

    06/21/2022, 2:33 PM
    i have the webpack config and configured loaders for ts |tsx using babel-loader
  • g

    gentle-dress-1046

    06/21/2022, 2:41 PM
    its actually not for the test, but for the preparations
  • g

    gentle-dress-1046

    06/21/2022, 2:44 PM
    also in the article it does not seem to suggest a way to wait for an element and than do a condition in case found/not found
  • f

    fresh-doctor-14925

    06/21/2022, 2:47 PM
    From the same doc: > Doing conditional testing adds a huge problem - that the test writers themselves are unsure what the given state will be. In those situations, the only reliable way to have accurate tests is to embed this dynamic state in a reliable and consistent way. It suggests ways to do it, but it would be better to have more control over your environment and the initial state
  • b

    brash-tiger-52405

    06/21/2022, 2:50 PM
    Thanks! How can I output the value in the alias?
  • f

    fresh-doctor-14925

    06/21/2022, 2:50 PM
    Take a look at this doc. It'll help to give you some context https://docs.cypress.io/guides/core-concepts/variables-and-aliases
1...919293...252Latest