Questions tagged [cypress-testing-library]

Questions about Cypress end-to-end testing with the **Cypress Testing Library** utilities (a subset of the Testing Library).

Documentation can be found at Cypress Testing Library.

Testing Library provides additional testing commands to the Cypress framework.

214 questions
2
votes
1 answer

How to work on 2FA when I am trying to log in into an account using Cypress?

I want to log in into an account, but I am receiving 2FA and to confirm the new device I am getting emails in my inbox, and I am not able to login in into account. Anyone, can you please tell me how to handle this or if I can do something with…
2
votes
2 answers

How to test checkbox toggle with Cypress and @testing-library/cypress ,

I am trying to write to test toggle action of accordion using cypress testing library. Below is the Markup for accordion, it is being toggled using checkbox hack :
1
vote
1 answer

Cypress function problem while write different it function

While i write the code on different function it shows error like this? output this is the code. Is there any solution?
Tanveer Rifu
  • 147
  • 1
  • 6
1
vote
2 answers

Cypress component test - test fails when services are imported using an index.ts file and export

Tech stack: Angular v15 and Cypress v12. My example component that I'm testing: import { Component } from '@angular/core'; import { UserHttp } from '../../services'; @Component({ selector: 'example-view', templateUrl:…
AngularM
  • 15,982
  • 28
  • 94
  • 169
1
vote
1 answer

Can't run test after installing cypress-if plugin

Once I installed cypress-if plugin and add import "cypress-if" to e2e file Cypress is down. I have this message error : > Cannot overwite the get query. Queries can only be overwritten with Cypress.Commands.overwriteQuery(). Until now, i didn't use…
1
vote
2 answers

Cypress can't set local storage

It seems I can't set local storage in Cypress? When I get the item from local storage it is different to what I have set (it always returns the default value) Am I setting the storage incorrectly? beforeEach(() => { cy.clearLocalStorage(); …
user21175044
1
vote
0 answers

How do I handle AuthO popup with Cypress

I am writing e2e tests with cypress for an app that uses auth0 for aunthentication from the documentation cypress 12 supports this using the cy.origin command .. my issue is when I click the login button, the origin command does not point to my new…
1
vote
0 answers

getting a csrf invalid error in cypress test

I have written cypres test suite for a symfony application .MOst of the Times it runs into csrf token error on form submissions.Each of my forms has a form token something like this
1
vote
0 answers

Unable to fix the by default blank page of cypress updated version

After updating the cypress to latest version i'm geting this error However i added the testIsloation to false in cofigration file but I'm still getting this error can anyone please help
1
vote
0 answers

Chatbox dialogbox using Cypress fails

I need to Open a Chatbox window and click on any question. Currently triedcy.visitand got errors cy.visit() failed trying to load: https://us-sandbox-live.inside-graph.com/api/workflow/StartWorkflow The response we received from your web server…
1
vote
1 answer

How To Configure cypress-grep plugin v3.1.0 for Cypress v11.01?

Cypress Version 11.0.1 Node Version 16.16.0 Package Manager Yarn version 1.22.19 Operating System Windows 10 Pro Version 21H2 I've created a cypress_grep_test_project to practice this plugin and used the default sample spec files that Cypress…
1
vote
1 answer

Timed out retrying after 4000ms: The command was expected to run against origin https://google.com but the application is at origin https://google.com

I am trying to test my website from cypress.io, but i am constantly getting above error. I am facing issue will Signing in with google. I am using the cy.origin() method. /// describe('Basic tests', () =>…
yash
  • 77
  • 3
  • 10
1
vote
1 answer

Can Cypress record audio from tests to also play it in the produced video?

As stated in the title, is it possible to record audio from a website under test using cypress. For example from an audio tag or a youtube video. Such that it is audible in the video recorded by cypress.
1
vote
2 answers

check if all checkbox are unchecked on cypress

I have dynamic checkboxes (anything from 1-20 checkboxes). I want to check if all checkboxes are unchecked. I have tried serval ways without any success. //is true even if it is…
CookieMonster
  • 241
  • 1
  • 9
  • 26
1
vote
1 answer

Handling multiple API calls of a single API call

With my team we are trying to implement a command for a really common operation for the business logic but I'm having issues handling its implementation. Basically: We have to retrieve an array of objects (GET). For each of that objects we have to…