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

    flat-rocket-60743

    07/12/2022, 11:14 PM
    Opening Cypress... [111641:0712/153949.913078:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable. [111797:0712/153949.931966:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process. [111797:0712/153949.934113:ERROR:gpu_memory_buffer_support_x11.cc(44)] dri3 extension not supported.
  • f

    flat-rocket-60743

    07/12/2022, 11:14 PM
    Am I missing something for cypress to run easily?
  • a

    adorable-smartphone-87280

    07/13/2022, 12:51 AM
    As long as Cypress runs, I'd ignore it. Errors happen all the time. I generally only pay attention to the ones that become roadblocks.
  • f

    flat-rocket-60743

    07/13/2022, 1:12 AM
    Thanks good to know
  • q

    quick-forest-42096

    07/13/2022, 7:38 AM
    Hello, for the following:
    cy.get('table.c-table').get('td.campaigns-table-campaign-name').contains(mockData.campaignName).siblings('.campaigns-table-campaign-action-buttons').get('button[data-test="delete-campaign-button"]').click()
    I expect to find a
    td
    with the class
    campaigns-table-campaign-name
    that contains
    mockData.campaignName
    as its content, there is only one of those, and it has 5 siblings, of those I want to find the one with class
    campaigns-table-campaign-action-buttons
    and click a button on it. But when I run I get
    cy.click() can only be called on a single element. Your subject contained 50 elements. Pass { multiple: true } if you want to serially click each element.
    which effectively refers to all 50 elements in my table. Is something wrong with my syntax?
  • a

    astonishing-electrician-44897

    07/13/2022, 8:26 AM
    You can try this.
    Copy code
    cy.get('table.c-table')
      .get('td.campaigns-table-campaign-name')
      .contains(mockData.campaignName)
      .siblings('.campaigns-table-campaign-action-buttons').within(() => {
        cy.get('button[data-test="delete-campaign-button"]')
        .click();
      });
  • q

    quick-forest-42096

    07/13/2022, 8:31 AM
    This has worked! Thanks
  • q

    quick-forest-42096

    07/13/2022, 8:31 AM
    care to explain?
  • b

    blue-quill-43979

    07/13/2022, 9:45 AM
    hi there, I'm having some issues trying to transform the yielded value from a chain to another. If I want to transform what I get from an API call before assigning it to an alias, how could I do? E.g.
    Copy code
    javascript
          cy.request('GET', myUrl).its('body').then((rep) => {
            let targetFile = rep.find(f => f.titre === fichierRessource);
            return targetFile;
          }).as('targetFile'); // this.targetFile is an array instead of an object
  • r

    rhythmic-guitar-55789

    07/13/2022, 10:49 AM
    Hi Gonzalo, I think
    cy.request
    is not quite the right tool for the job here, try using
    fetch
    for this, checkout this example here: https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/server-communication__request/cypress/e2e/spec.cy.js#L52
  • a

    acceptable-tailor-66244

    07/13/2022, 11:01 AM
    Hi everyone, I'm having trouble with the version updates. I'm not able to update the binary version and I get this warning when I run cypress open. Does anyone know how I can fix it?
  • c

    careful-computer-31749

    07/13/2022, 11:23 AM
    Hi everyone , I having trouble with in mocking node-ipc in cypress which i am using in electron app. Please some help ASP
  • g

    gray-kilobyte-89541

    07/13/2022, 11:51 AM
    are you sure that
    targetFile
    should be an object and not an array?
  • b

    blue-quill-43979

    07/13/2022, 12:15 PM
    yes, the result of
    rep.find(f => f.titre === fichierRessource);
    is an object and not an array indeed
  • g

    gray-kilobyte-89541

    07/13/2022, 1:25 PM
    in that case, can you give a reproducible example? It does not seem right to me
  • b

    blue-quill-43979

    07/13/2022, 1:32 PM
    I found it, the guys have overcharged find of the Array prototype so the find was not working as intended thanks for your help @gray-kilobyte-89541
  • c

    cuddly-thailand-33926

    07/13/2022, 1:32 PM
    I'm getting the error: Cypress detected that you returned a promise from a command while also invoking one or more cy commands in that promise. It says the command that returned the promise is cy.click And the command invoked in that promise is cy.ResetWriter() Thing is i only execute cy.ResetWriter inside a Cypress.on('uncaught:exception's) Cypress.on('fail') And Cypress.on('command:retry')
  • b

    bitter-fountain-36713

    07/13/2022, 4:04 PM
    cy.get() searches from the cy.root element so each time. I suggest using .find() to limit your search from the passed DOM element. Since we don't know what your HTML looks like this may not work but shows how to concisely search within previous subject.
    Copy code
    js
    cy.get('table.c-table')
      .contains('td.campaigns-table-campaign-name',mockData.campaignName)
      .siblings('.campaigns-table-campaign-action-buttons')
      .find('button[data-test="delete-campaign-button"]')
      .click()
  • g

    gray-kilobyte-89541

    07/13/2022, 4:43 PM
    they are bad people then
  • c

    careful-computer-31749

    07/13/2022, 6:38 PM
    Hi everyone , I having trouble with in mocking node-ipc in cypress which i am using in electron app.
  • f

    freezing-piano-2792

    07/14/2022, 8:48 AM
    Oh lord... «Custom command implementations are now typed based on the declared custom chainables» introduced in v9.0.0 doesn't appear to handle generics it all and it doesn't seem like there's any test coverage for it at all
  • f

    freezing-piano-2792

    07/14/2022, 8:49 AM
    This seems a lot like yet another thing where Cypress intends to be helpful, but just ends up being a major inconvenience
  • c

    cuddly-thailand-33926

    07/14/2022, 9:04 AM
    My dynamic it blocks are not executing in CLI but executing in testRunner, any fix?
  • m

    many-city-96644

    07/14/2022, 10:05 AM
    Can someone help me with this?
  • g

    gray-kilobyte-89541

    07/14/2022, 11:54 AM
    Search for "baseUrl" in my videos / posts at https://cypress.tips/search
  • f

    freezing-piano-2792

    07/14/2022, 12:45 PM
    Command overwrite is also completely broken in the above-mentioned regard
  • f

    freezing-piano-2792

    07/14/2022, 12:45 PM
    Types just aren't correct and this is unuseable
  • f

    freezing-piano-2792

    07/14/2022, 12:45 PM
    Also not tested
  • m

    many-city-96644

    07/14/2022, 12:51 PM
    As I said I am using baseUrl already. The only change is the URL in the baseUrl in the config file. Now the URL is pointing to the application locally and before it was on some other server. The URL before was "https://backoffice.si.stage.fngecom.cloud.spryker.toys" and now is "https://backoffice.si.fng.local"
  • f

    freezing-piano-2792

    07/14/2022, 2:42 PM
    Is it really necessary to open up two windows when running EG.
    cypress open --e2e --browser electron
    ?
1...656667...127Latest