Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 00:16
    Bkucera synchronize #8837
  • 00:11
    renovate[bot] edited #3777
  • Nov 25 23:38
    tgelu commented #9325
  • Nov 25 23:37
    tgelu commented #9325
  • Nov 25 23:19
    lvkron7809 opened #9341
  • Nov 25 22:41
    nids2307 commented #9338
  • Nov 25 22:41
    bahmutov commented #9340
  • Nov 25 22:40
    nids2307 commented #9338
  • Nov 25 22:38
    kevinold labeled #9340
  • Nov 25 22:38
    kevinold labeled #9340
  • Nov 25 22:38
    kevinold opened #9340
  • Nov 25 22:33
    zealmehta21 commented #2367
  • Nov 25 22:03
    or2008 commented #8948
  • Nov 25 21:42
    bahmutov labeled #9336
  • Nov 25 21:41
    bahmutov labeled #9336
  • Nov 25 21:41
    bahmutov labeled #9337
  • Nov 25 21:41
    tomardern commented #4920
  • Nov 25 21:24
    bahmutov closed #9337
  • Nov 25 21:24
    bahmutov commented #9337
  • Nov 25 21:21
    bahmutov commented #9338
helenvn
@helenvn
try to use import 'cypress-wait-until' cy.waitUntil(() => cy.get('label').should('be.visible'), {timeout: 60000, interval: 6000})
Níkolas Escobar
@NikoEscobar

yeah I saw this package, I wonder why we still need to use it, I ask the devs to create an upper element with data-cy=loaded only under the load component

so now I wait for this data-cy=loaded to exist

the load is nothing related to requests
helenvn
@helenvn
it's better to wait XHR
Níkolas Escobar
@NikoEscobar
So I cannot rely on waiting routes
I can't like I said, the load is nothing related to requests
pduchna
@pduchna
Hi,
I have a problem with http authentication. I don't know how to operate this: https://i.stack.imgur.com/Jquy9.png
Has anyone had such a problem?
vtrumanidze
@vtrumanidze
Hey guys, could you pls help me with cy scrolling? We have pagination on our page and I can't use cy.get().scrollIntoView() method (I need last line of the table). For scrollTo I got '<windows is not scrollable>' error . Please ,help(we use ag-grid lib for tables)
Daan Verbiest
@dverbiest
image.png
Daan Verbiest
@dverbiest

@craig-dae: see above, as for multiple intercepts without response; isn't this your issue as well?

I think this was why when I parsed the response for '@getUnitsActivity', that it had no 'response' object nested within it.. cause that object existed on the '@getUnits' intercept instead >< (@northkevin)

dinhngocquanghuy
@dinhngocquanghuy
image.png
Daan Verbiest
@dverbiest

@bahmutov, @Tom5om, @craig-dae : seems like multiple people get stuck without a response object after using multiple intercepts, like:

describe('Cypress', { baseUrl: 'https://www.cypress.io' }, () => {
  it('can intercept twice', () => {
    cy.intercept({ path: '/*/collect?v=**' }).as('gaOne')
    cy.intercept({ pathname: '/j/**' }).as('gaTwo')
    cy.visit('/')
    cy.wait('@gaOne').its('response.statusCode')
      .should('eq', 204)
    cy.wait('@gaTwo').its('response.statusCode')
      .should('eq', 200)
  })
})

When I make the first intercept unique (only replaced the first * with g), this does pass:

describe('Cypress', { baseUrl: 'https://www.cypress.io' }, () => {
  it('can intercept twice', () => {
    cy.intercept({ path: '/g/collect?v=**' }).as('gaOne')
    cy.intercept({ pathname: '/j/**' }).as('gaTwo')
    cy.visit('/')
    cy.wait('@gaOne').its('response.statusCode')
      .should('eq', 204)
    cy.wait('@gaTwo').its('response.statusCode')
      .should('eq', 200)
  })
})
The upper one results in this error message. (also note the non-specific Routes table on top 😊)
image.png
Ahmad-Baker
@Ahmad-Baker
Hell all,
Anyone faced this issue before
image.png
it happened alot of times
and t tired many solutions but nothing changed
uninstall and reinstall cypress again
update chrome to latest version.
nothing changed
Timed out waiting for the browser to connect. Retrying..
@dverbiest yes ?
Daan Verbiest
@dverbiest
Seems your browser is not closing correctly
Ahmad-Baker
@Ahmad-Baker
ok so how can i solve this issue
11 replies
pduchna
@pduchna
Hi guys,
I have a problem with http authentication. I don't know how to operate this: https://i.stack.imgur.com/Jquy9.png
Has anyone had such a problem?
6 replies
David Zschille
@dzschille
Hi, does anyone know if it is intended that contains() doesn't care about visibility? Here is an example: https://github.com/cypress-io/cypress/discussions/9308
poovaraj
@poovaraj
image.png
How to handle notification using cypress ?
Sergey Samsonov
@osenvosem
Hello, guys. I need to point my node.js server requests to cypress proxy to use .intercept for mocking responses from third-party services to my Node.js server. Could you please tell me the way I can do that?
ankit3309
@ankit3309

hello, can anyone tell me the way i can do? after i commit it keeps on waiting. My goal is to auto run test in cypress after i commit any changes to repository. Running "uglify:build" (uglify) task

Destination dist/sprintf.min.js not written because src files were empty.
Destination dist/angular-sprintf.min.js not written because src files were empty.
No files created.

Running "watch" task
Waiting...

Gleb Bahmutov
@bahmutov
@dverbiest yeah, it does seem that if multiple interceptors match, then the interception is not recorded in all of them
3 replies
Jiří Šteidl
@jiristeidl_gitlab
is there anyway to run cypress with some extended debugging? I'm running into weird issue with the runner and would like to get more info
Jiří Šteidl
@jiristeidl_gitlab
nvm found it :)
Jo-Anne Brandes
@jobrandes
@bahmutov Was wondering if anyone can help me. I'm trying to use the new cy.intercept for GraphQL responses. I do not want to stub or mock. I simply want to grab the actual response and compare it to the UI. Anyway, I'm looking at the cypress documentation and used if (req.body.includes('mutation')) {... but cypress throws an error stating req.body.includes is not a function. Any thoughts? I never had any issues with REST doing this but I'm really struggling with GraphQL and comparing the response to the UI. Thanks!
j1000
@j1000

@craig-dae it should work. I have no problem using glob wildcards.

From the documentation

All properties are optional. All properties that are set must match for the route to handle a request. If a string is passed to any property, it will be glob-matched against the request using minimatch.The available routeMatcher properties are listed below:

Nicco
@cupcakearmy

Hi everyone 👋
So I want to test a library that runs both in the browser and node. For browser testing I wanted to try cypress but it seems impossible to test async code? I must be wrong. I can't find a real anwer tho. Any ideas?

it('Example', async () => {
  const a = await MyLib.foo()
  const b = await MyLib.bar(a)
  // ...
})

I've read this: https://docs.cypress.io/faq/questions/using-cypress-faq.html#Can-I-use-the-new-ES7-async-await-syntax

Cheers

Gleb Bahmutov
@bahmutov
@jobrandes inspect the req.body, maybe it is not a string
Nicco
@cupcakearmy
@bahmutov thanks! basically it simply works, I was only confused because if I call cypress.log in the middle it does not work (the logging) but that is not a big issue
Gleb Bahmutov
@bahmutov
yup, because everything in Cypress is async, thus cy.log has to be placed into .then - in reality I would advise using .then instead of await there
zealmehta21
@zealmehta21
@northkevin Yes, integration folder path actually got updated in config still not working.
Jo-Anne Brandes
@jobrandes
Thanks @bahmutov I will. I'm really struggling with it.
Kikixi
@Kikixi
is there a way to update fields in a fixture file
Sofina P
@sofinap_gitlab
Hello guys, when I use cy.intercept(), the API does not stub. The same code works when I use cy.route(). Does anybody know what is missing or how to make it work? cy.intercept( 'GET',
${API}/farm/list,
{
statusCode: 200,
body: {
message: 'Request successful',
result: seededFarmList
}
})
Taly Hotimsky
@talyh

Hi folks... Wondering if someone can give me more insight into the is being covered by another element: error.

I understand what it means. I understand why it's happening. I DON'T understand why it only happens some times if all the actions leading into it/viewport/data are the same across runs. I'd expect this error to happen 0% or 100% of the time given the other variables remain the same. It's intermittance is what I'm struggling to understand...

Thanks for any insight you can provide!

Muck
@MuckT
Has anyone been able to spy on graphql responses based on operationName using cy.intercept?
Victor Valerio Moraes
@pardinn
Hello. I'm new to cypress and I'm facing issues with the Selector Playground. Whenever I open the Selector Playground, it highlights the entire body, and if I try to hover over any element or even click on it, it doesn't highlight the element and lets me plainly excecute the action. It is as if the playground wasn't enabled at all. Is anybody else with the same problem? I can't get it to work. I've already upgraded to version 6.0.0 but the playground simply doesn't work for me. This seem to be an old issue that was supposed to be fixed in 3.5.0, according to cypress-io/cypress#4872
Victor Valerio Moraes
@pardinn
Nevermind....just found cypress-io/cypress#7745 . Sorry about that
bif-bof
@bif-bof

Hello. I am new with cypress. I could successfully install node.js and visual studio code and cypress itself, but when I use cypress open or cypress verify I always get an error message (sorry it is in German) - I was already searching in google but was not able to find a solution

& : Die Benennung "node.exe" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern
enthalten), und wiederholen Sie den Vorgang.
In C:\Users\bif-b\OneDrive\Documents_cypress\node_modules.bin\cypress.ps1:15 Zeichen:5

  • & "node$exe" "$basedir/../cypress/bin/cypress" $args
  • ~~
    • CategoryInfo : ObjectNotFound: (node.exe:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException
Muck
@MuckT

Here's a sample of the issue I am dealing with with cy.intercept()

      // Setup API Spy
      cy.intercept('POST', '/graphql', (req) => {
        if (req.body.operationName === 'UpdateItem') {
          req.alias = 'UpdateItem';
        }
      });

      // Click Next
      cy.get('[data-testid="next-button"]').click();

      // Intercept Request & Response
      cy.wait('@UpdateItem').then((interception) => {
        console.log(interception.id);
        console.log(interception.request);
        console.log(interception.response);
      });

The interception.id & interception.request show, but interception.response is undefined.