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

    better-elephant-20934

    02/10/2023, 6:36 PM
    greetings, I am configuring cypress inside vue3.js and i am having : Webpack Compilation Error, also I noticed this huge amount of time:
  • g

    gray-kilobyte-89541

    02/10/2023, 7:43 PM
    wow, you really have been using Cypress for a looooooong time
  • s

    silly-hairdresser-33662

    02/10/2023, 7:52 PM
    Wondering if it's possible to ensure in CI (git hub action) a new host is spun up to run each test case. We are seeing issues where the 4th or 5th test case is timing out, and I suspect it's just memory crashes due to long run times. The same thing happens to me locally when I run for a while.
    b
    • 2
    • 1
  • f

    freezing-piano-2792

    02/11/2023, 11:09 AM
    Is there a way to not use the bundle introduced in v11? You trashed our ability to easily patch Cypress and remedy certain situations ourselves, like testing CSP conditions
  • f

    freezing-piano-2792

    02/11/2023, 2:23 PM
    Ref. https://github.com/cypress-io/cypress/issues/5400#issuecomment-547059565: > This should be possible by hooking into the fail event in Cypress - doing whatever logic you want there and then not throwing in order to continue to the next test. It seems like not throwing in a "fail" handler, does discontinue the test and mark it as passed. Is this correct behavior?
  • m

    mysterious-psychiatrist-29678

    02/13/2023, 1:45 PM
    I'd pass
    -- insecure
    switch in an API call, but can't construct cy.request(), how should I do?
    Copy code
    curl -X GET $URL --header "Authorization: Bearer $TOKEN" --insecure
  • m

    mysterious-psychiatrist-29678

    02/13/2023, 3:00 PM
    also how should I get request's body status of the following?
    Copy code
    {
      "status": "HEALTH_OK",
      "checks": {},
      "mutes": []
    }
    that is not working:
    Copy code
    expect(response.body.status).to.equal("HEALTH_OK")
  • m

    modern-addition-58981

    02/13/2023, 4:32 PM
    How to print correlation I'd in mochawsome report in cypress
  • n

    nice-whale-57626

    02/13/2023, 6:30 PM
    Hey guys, I'm seeing a really weird issue thats causing some problems. I'm going into mobile viewport, cy.logging the viewportWidth but it's showing as '1200'. Any ideas?
  • n

    nice-whale-57626

    02/13/2023, 6:32 PM
    Here's my code: ` const viewports = [ { name: "desktop", size: "macbook-15" }, { name: "mobile", size: "iphone-6" }, { name: "tablet", size: "ipad-2" }, ]; viewports.forEach((viewport) => { context(
    on ${viewport.name} view
    , () => { beforeEach(() => { cy.viewport(viewport.size); }); it("searches for a product and checks the search API response", () => { // Visit the Laithwaites Wine UK homepage cy.visit("https://webdev001.laithwaites.co.uk:9190/"); // Find the search input and type in a search term let searchInputSelector; cy.log(Cypress.config("viewportWidth")) if (Cypress.config("viewportWidth") < 768) { searchInputSelector = "#search"; } else { searchInputSelector = ".search-group-container > .form-control"; } cy.get(searchInputSelector).type("Pinot Noir"); `
  • g

    gray-kilobyte-89541

    02/13/2023, 7:36 PM
    https://glebbahmutov.com/blog/cypress-tips-and-tricks/#vary-test-commands-depending-on-the-viewport
  • n

    nice-whale-57626

    02/13/2023, 7:40 PM
    Thanks! Will look into this. Appreciate the quick response.
  • n

    nice-whale-57626

    02/13/2023, 8:04 PM
    This works a treat!
    Copy code
    cy.window()
              .its("innerWidth")
              .then((w) => {
                if (w >= 768) {
                  cy.get(".search-group-container > .form-control").type(
                    "Pinot Noir"
                  );
                } else {
                  cy.get("#search").type("Pinot Noir");
                }
              });
  • b

    blue-battery-71202

    02/14/2023, 8:17 AM
    Hey, where can I see updates to the cypress GHA? I don't suppose I can customize the slack message it sends if integrated, or anything really. (I saw that yesterday the content changed, I suppose it has been updated, however I cannot find any notes on that.)
  • m

    mysterious-psychiatrist-29678

    02/14/2023, 8:56 AM
    nobody knows that?
  • g

    great-arm-27075

    02/14/2023, 1:42 PM
    Greetings, I'm working on front-end automation using cypress, so for one scenario I need to apply a filter on table content and ensure working fine. but when I'm clicking on a filter dropdown which is on a modal, nothing happens but manually everything works fine, I tried with realClick() as well but nothing worked, the dropdown options come from the backend so I even intercepted and placed wait, so that they fully loaded but still no luck. we are using Quasar for the front end also for reference you can see these attachments, kindly let me know a solution. Thanks in advance.
  • g

    great-arm-27075

    02/14/2023, 1:45 PM
    @gray-kilobyte-89541 can you give me a solution for the above issue?
  • g

    gray-kilobyte-89541

    02/14/2023, 2:07 PM
    I am sorry, I have no idea what you are testing, or how it is implemented. Can you make a small public repo with a reproducible failing test?
  • h

    hundreds-author-68171

    02/14/2023, 2:19 PM
    Hello, has anyone more recently experiencing github actions cypress job hanging and then timing out on the build? If so, have you come to a resolution?
  • q

    quiet-fireman-69819

    02/14/2023, 2:58 PM
    Hello, I am trying to use data from json file under fixtures folder.. No error is thrown but no data is being read. Background => Language:Typescript, framework:Cucumber(cypress - cucumber-preprocessor installed), file with json extension exists, file with ts extension exists which includes exported interface with matching data type. The interface is being imported into the test file. Any potential bug suggestion or solution?
  • m

    mysterious-psychiatrist-29678

    02/14/2023, 4:45 PM
    how would you add file as parameter to a HTTP request? I'm getting error 422
    Copy code
    it("create a deployment", () => {
    
      const param = String.toString(cy.readFile('deployment.yaml'))
    
        cy.request({
          method: 'POST',
          url: createDeployment,
          headers: {
            Authorization: 'Bearer ' + TOKEN
          },
          body: {
            param
          }
        })
      })
  • c

    cold-van-45410

    02/14/2023, 5:22 PM
    How to use cypress with chatGpt??
  • m

    many-airline-45402

    02/14/2023, 6:50 PM
    Hi @blue-battery-71202 If you are referring to https://github.com/cypress-io/github-action, the release notes are on https://github.com/cypress-io/github-action/releases.
  • g

    gray-kilobyte-89541

    02/14/2023, 7:15 PM
    cy.readFile is not synchronous command, it won't give you result back, you have to use
    cy.then
  • a

    ambitious-monkey-72386

    02/15/2023, 7:49 AM
    Can I have two cypress projects in my laptop with the two projects working on different cypress versions , one with 9 and one with 12 ?
  • a

    ambitious-monkey-72386

    02/15/2023, 7:49 AM
    Is that possible ?
  • m

    many-airline-45402

    02/15/2023, 8:45 AM
    Hi @ambitious-monkey-72386 Yes that is possible. You can find exactly that configuration in https://github.com/cypress-io/github-action. It is set up so the examples directory uses Cypress 12.4.1 (currently a bit behind the latest release 12.5.1) and the examples/v9 directory has examples using Cypress 9.7.0.
  • m

    mysterious-psychiatrist-29678

    02/15/2023, 9:15 AM
    thank you. sorry don't get it fully. do you mean this way?
    Copy code
    let param
    
      it("create a deployment", () => {
    
      cy.then(() => {
        param = String.toString(cy.readFile('deployment.yaml'))     
      })
    I'm getting back
    Copy code
    422: Unprocessable Entity
  • g

    green-controller-97889

    02/15/2023, 12:10 PM
    I've added a bunch of
    cy.log()
    inside my custom commands`Cypress.Commands.add()` but nothing gets logged. Why ?
  • g

    gray-kilobyte-89541

    02/15/2023, 12:34 PM
    I hate sounding like a pedant teacher, but the docs for each command, like https://on.cypress.io/readfile have lots of examples of reading a file. I will probably add an explicit example sending a text file to my paid course https://cypress.tips/courses/network-testing
1...111112113...127Latest