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
0
votes
2 answers

How to use multiple data.json file from command line without alerting the code - cypress

I have two data files (dataUAT.json and dataQA.json) in fixtures where i'm getting data for my spec files. Suppose i have different environment like UAT and QA. I want to use dataUAT.json file for UAT environment and dataQA.json for QA…
0
votes
0 answers

conflict between cypress/coverage and cypres/react-scripts

I have a problem, when install the cypress webpack with the project installed cypress coverage appears message An unexpected error occurred The function exported by the plugins file threw an error. We invoked the function exported…
0
votes
2 answers

Cypress intercept match not matching a single word

I have read the docs on Cypress v6.9.1 about intercept but I'm having some difficulties truly understanding how to match single words urls. A practical example of a problem I'm facing. I'm making the following request to create a label in my…
Bruno Francisco
  • 3,841
  • 4
  • 31
  • 61
0
votes
1 answer

To confirm it’s ‘Thank you’ page after landing on a thank you page on a website using cypress

I am new to cypress and I am learning it. I want to confirm that I have landed on a ‘Thank you’ page after clicking on submit button and landing on thank you page. How do I check this using cypress. Can anyone please help me with this. Thanks in…
0
votes
1 answer

Cypress - How to get data of individual test like its title, state etc

I am trying to get data about single test in Cypress like title, state etc so I can create custom reporter. But none of the below options in forEach are working. It returns undefined, but when I pass normal string like 'abcd' it gets printed on…
0
votes
1 answer

Is there any way to reset the mongoDB without deleting actual DB through cypress?

I want to implement resetting of DB in such a way that when I execute all spec files through test runner, DB is created at the start before 1st spec file and post that after every spec file DB should reset to its original state which means the data…
0
votes
1 answer

Understanding login state

I want to use Cypress to implement automation. Our systems require a user to be logged in and perform certain actions. The issue I have is when I create different test cases the user gets logged out and I have to re use certain code which I don't…
0
votes
2 answers

How loop and read JSON data in cypress

Suppose that you have a JSON file that contains data like this: [ { name: 'Data Groups', }, { name: 'Transaction start Filter', }, { name: 'Filter', }, { name: 'Graph, Tables', }, { name: 'Trending with…
0
votes
2 answers

How to override 'data-testid' in the 'findByTestId function from Cypress Testing Library

Most of my existing codebase uses a 'id' only in few places 'data-testId' attribute present. tried this code import { configure } from '@testing-library/cypress'; configure({ testIdAttribute: ['data-testId','id'] }); But, still its not working. Is…
imBollaveni
  • 99
  • 1
  • 13
0
votes
2 answers

Checking inside dynamically modified iframe with Cypress

I have a page that includes a third party script (Xsolla login). This script modifies elements on the page, one of the particular elements being iframe. First a placeholder element is inserted Then the iframe is deleted and new iframe is inserted…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
-1
votes
1 answer

How do I throttle a request before it makes the request with cypress?

I know that with cypress you can throttle the response but I need to be able to throttle a request that is requested from my client-side Javascript before it is requested. So far I haven't found anything and the resource I found on stack overflow…
-1
votes
0 answers

Run a Cypress test from a test Orchestrator written in Java

This is more of a research question. I am looking to build a test orchestrator that will ingest all types of tests, including Cypress tests. I am wondering how to invoke Cypress test (npx cypress run) via Java codefrom my test orchestrator. Cypress…
-1
votes
1 answer

Cypress: Error: Getting ESOCKETTIMEDOUT when using cy.visit()

Brand new project. I am simply trying to access adobe.com but getting a ESOCKETTIMEDOUT error. Given this is a new project, I doubt anything is wrong with the code. I am on MACOS 12.6.1 Monterey with no firewall on. Any settings/changes I need to…
-1
votes
2 answers

Cypress dynamically check deadlinks

I wanted to check my navigations if it is dead / goes to the expected page, i have a menu array, now i want to check if the link is not "#" then visit the url and should contain the those links, so far i am stuck in this stage: const menus =…
Rahiyan Safz
  • 29
  • 2
  • 8
-1
votes
1 answer

CypressError cy.visit() failed trying to load https://example.cypress.io/todo

i created cypress project for that i run npm init -y to generate package.json file then npm i cypress to create a cypress project. then opened it via npx cypress open here i'm getting this error…
1 2 3
14
15