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

    acceptable-hamburger-48790

    08/30/2022, 5:22 PM
    You should also post what you have tried already and what is not working - your code snippet/selector you already tried with etc..
  • h

    hundreds-shoe-33118

    08/30/2022, 5:25 PM
    Hello Thanks for reply , I am actually new to Cypress so still facing challanges. I have successfully iterated the values of calendar and my code looks like this . What I want is to select date, lets say 15 of September..... I dont know how to get to the css selector in order to select that date
  • f

    freezing-wall-7568

    08/30/2022, 7:42 PM
    Hello, I am trying to use cypress webpack ts and "@freezing-piano-2792/cypress-cucumber-preprocessor" once I run npm install, and then open cypress runner I get : Your configFile is invalid: ..\..\Tests\cypress.config.ts, It threw an error when required, check the stack trace below: Error: Cannot find module 'webpack', Require stack: , then once I run npm link webpack and at that point cypress runner opens and I can run the *.cy.ts files , and when I click on feature file to run it, then it throws cannot find Cannot find module 'tapable', since we rely on webpack that comes from cypress, I dont understand why I need to run npm link webpack, any idea how can this be resolved?
  • h

    high-scooter-38171

    08/30/2022, 10:53 PM
    our cypress tests are taking around 10x as long to run in our GitLab CI than they do locally. it seems like the time is not for building or installing, but for the client to actually run the tests. our app is not simple, but it's surprising that tests time out when they only take a few seconds locally. is this a common problem? any best practices to make this better? or do people just make the timeouts a lot longer?
  • g

    gray-kilobyte-89541

    08/31/2022, 12:18 AM
    use more powerful CI executors
  • p

    proud-breakfast-29892

    08/31/2022, 9:59 AM
    Hello. I have an issue regarding page navigation: In my web application, the page load can be a bit inconsistent. In my
    beforeEach
    , I navigate to my designated page by using
    cy.visit
    and then asserting the url contains the page name I wanted to navigate to. Sometimes it doesn't work, even after navigation the url does not contain it. I figured perhaps I use
    cy.visit
    too early in my test, so I tried to intercept all requests from my app (When navigating to base url) prior to page navigation and wait for them to be finished. However, these requests aren't consistent and sometimes they won't happen because of cache. There is also no "page loaded" event firing when the load has been completed, so I can't rely on that. What can I do to ensure my navigation actually worked?
  • p

    prehistoric-restaurant-72560

    08/31/2022, 10:05 AM
    Hello Thanks for reply I am actually new
  • s

    straight-chef-47891

    08/31/2022, 11:30 AM
    Where do i actually put the tsconfig.json? Root folder or under cypress folder? Or both?
    p
    • 2
    • 2
  • t

    thankful-vegetable-38026

    08/31/2022, 11:40 AM
    Do plugins not have access to test names anymore? I've been rewriting
    @cypress/snapshot
    to do what I want and can't seem to figure out how I could make it access the things within the it() functions
  • t

    thankful-vegetable-38026

    08/31/2022, 11:40 AM

    https://toaster.sh/i/oonnp.png▾

  • h

    helpful-truck-53930

    08/31/2022, 12:54 PM
    What do you exactly mean? Because i think i hav tested it. For example with waits and so on !
  • h

    helpful-truck-53930

    08/31/2022, 1:01 PM
    Hello, I want to write a function in which I write the akteulle day date + 1 day in an input field. However, the function currently only counts the days on it. That means when today the 31. 08. is and I expect a day on it jumps the input does not jump to the 01. 09. but on 32. 08. This is my current solution: Date = new Date (); // . . . . Cypress. Commands. add (“BegToTomorrow Date”, (DATE) => { let day = Date. getDate (); let month = Date. getMonth (); month = month + 1; day = day + 1; if (String (day). length == 1) day = “0” + day; if (String (month). length == 1) month = “0” + month; let dateBegVersGestern = day + "." + month + ”"“ + Date. getFullYear (); dateBegToYesterday = String (dateBegToYesterday); cy. get (’cc-common-input-date[name=”beginn”]'). within (() => { cy. get (“input”). clear (). type (dateBegToYesterday); }); }); I call this function in the test case. I would appreciate suggestions for solutions.
  • b

    brave-notebook-55583

    08/31/2022, 1:07 PM
    @helpful-truck-53930 Try something like this
    Copy code
    const day = new Date()
    const nextDay = new Date(day.getTime() + 1000 * 60 * 60 * 24)
  • p

    purple-train-63923

    08/31/2022, 1:10 PM
    Has anyone been able to import from the
    src/
    folder into
    cypress/
    ? I'm trying to use mock data from src in cypress integration tests, not component tests. I am using the cypress/webpack-preprocessor in the plugins/index.ts. The mocks are typescript files. The error is that webpack is not looking for
    .ts
    files even though I am importing the root webpack.config.ts and passing it through the webpackPreprocessor.
    Copy code
    // plugins/index.ts
    const webpackConfig = require('../../webpack.config')
    ...
    on('file:preprocessor', webpackPreprocessor(webpackConfig))
  • h

    hundreds-shoe-33118

    08/31/2022, 1:13 PM
    I am locating an element through parent child chaining from the browser and I getting 9 results as mentioned in the snapshot. But When I am trying the same with cypress I am getting an error. Can someone please look into it
  • c

    cold-van-45410

    08/31/2022, 1:33 PM
    Can anyone share me Cypress interview questions which can be asked at 2 year experience?
  • g

    gray-kilobyte-89541

    08/31/2022, 1:38 PM
    https://glebbahmutov.com/blog/how-i-hire/
  • t

    thankful-vegetable-38026

    08/31/2022, 1:50 PM
    Do plugins not have access to test names anymore? I've been rewriting @cypress/snapshot to do what I want and can't seem to figure out how I could make it access the things within the it() functions

    https://toaster.sh/i/oonnp.png▾

  • t

    thankful-vegetable-38026

    08/31/2022, 2:05 PM
    I've tried
    Cypress.currentTest
    but that doesn't seem to work in Plugins anymore
  • s

    some-furniture-77210

    08/31/2022, 2:43 PM
    Hello, I'm testing an angular based web page. When I use cy.get(elementLocator).click() or .type(), I can see the action complete in the web page, but in Cypress command log, the .click() or .type() action shows a spinner, that does not complete for some time - tens of seconds up to several minutes. I've measured timing with cy.log(Date.now()) statements around the .click() line of code - it always reports just a few milliseconds of interval, which I take to be the execution time, however the real-world wait time for the command log to complete and allow subsequent actions is very long, as I stated. Any advice on this issue?
  • f

    freezing-wall-7568

    08/31/2022, 3:27 PM
    does cypress 10.0 and above support safari on macos?
    p
    • 2
    • 1
  • a

    average-train-81585

    08/31/2022, 4:05 PM
    Is there an easy/recommended way to catch all the requests that are not stubbed and fail the corresponding test? So far, we did that and it seems to work but not sure this is the best way: `beforeEach(() => { cy.intercept(
    ${Cypress.env("API_URL")}/**
    , (request) => { expect(request.url).to.equal(false); }); });`
  • g

    gray-kilobyte-89541

    08/31/2022, 4:37 PM
    https://cypress.tips/courses/network-testing has the last bonus lesson about it. I am still thinking if that's the best way, but so far it works
  • i

    incalculable-pager-85339

    08/31/2022, 5:14 PM
    Hey all I need to know if something is possible and get some direction on how to test it if it is. I have a page with many text fields and booleans that an end user sets and saves. Upon saving they have the option of downloading the config they just made as a JSON. The E2E flow id like to test is: 1. Login (easy done) 2. User creates a new config(easy done). 3. User downloads JSON. (ease enough to press download via cy) 4. Make assertions against the JSON that was just downloaded to validate the content is what is expected and validate the structure of the JSON.
  • b

    bitter-plumber-96398

    08/31/2022, 5:57 PM
    Could someone on the Cypress team look at the
    instrument-cra
    module? It has some bugs and PRs, but no one seems to be looking at it. https://github.com/cypress-io/instrument-cra/issues/225. <-- this issue is driving me insane, right now, and I would love a fix.
  • p

    prehistoric-restaurant-72560

    08/31/2022, 6:00 PM
    Hey all I need to know if something is
  • f

    famous-analyst-30680

    08/31/2022, 6:35 PM
    Hey! I'm using the latest version of cypress and I'm having an issue when running the test. The DOM snapshot never shows my app but shows
    Copy code
    <iframe> PLaceholder for
    My app isn't using iframes and this is making it hard for testing Here is video https://www.loom.com/share/b54522d95a48482aac41a86f53263857 Been stuck on this problem for a few days and any help would be much appreciated!
  • p

    prehistoric-restaurant-72560

    08/31/2022, 8:34 PM
    Loom Message - 30 August 2022
  • u

    user

    09/01/2022, 2:35 AM
    Hello! I've been going through the cypress testing your first application tutorial and I keep running into an issue where when I'm time travel debugging, the preview is just a white screen. When I'm not hovering over a test, I see the test page from my local host just fine, but when I try to debug, the pin is blank. I am also getting "This element is not visible" next to all of my steps, but the test does pass. I've also done quick testing to compare on my company's test environment and I'm not seeing the same issue, so maybe I have something weird set up when running my local host? I've attached a screenshot. Anyone have any advice/seen this issue before? Didn't have much luck googling as in other examples I've found, their tests fail.
  • h

    helpful-tent-74010

    09/01/2022, 5:05 AM
    Hi All, I am testing react using new 'component testing', I wanted to know how can i mock/stub a child component.
1...138139140...252Latest