Questions tagged [cypress-component-test-runner]

This tag should be used in questions related to running Cypress tests with Component Test Runner and the configuration or other issues with the Cypress Component Test Runner.

This tag should be used in questions related to running Cypress tests with Component Test Runner and the configuration or other issues with the Cypress Component Test Runner itself.

References:

Related tags:

180 questions
0
votes
1 answer

Vue Cypress Component Test Runner - location of test files

I've added the Cypress Vue Component Test runner to an existing Vue app and I want all the test files to be in the same directory as the components. However, whatever I put in my cypress.json file seems to be ignored and cypress always wants to…
Richard Shergold
  • 572
  • 1
  • 8
  • 21
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

Uncaught Error: useNavigate() may be used only in the context of a component in cypress unit testcases

I am trying to write "unit-test" for components in react with cypress. Followed the link cypress docs on component testing when I wrote testcase for a component and tried to run with "npx cypress open-ct" then getting the above error (question…
CodeWorld
  • 2,017
  • 1
  • 11
  • 21
0
votes
1 answer

How to instruct cypress to do some actions if the testcase is passed?

I try to use aftereach() but it will execute either the testcase is passed or failed. I need to know the context of that should i use for example if condition or what? For example: describe('TestSuite', function(){ it('THIS TEST CASE PASSED',…
0
votes
1 answer

Unable to merge mochaweasome reports

I have the below config in my test runner and trying to merge all the mochaweasome.html file as single mocha file. Runner.js async function testRunner(fixture) { return cypress.run({ config: { "reporter": "mochawesome", …
0
votes
1 answer

How to test components that external dependencies with Cypress

I am trying to test a google maps components with help of Cypress's new component testing functionality. The issue that I am faced with is that I am struggling to attach google maps to the page. Currently, component has an initiator method which…
Vlad Vladimir Hercules
  • 1,781
  • 2
  • 20
  • 37
0
votes
1 answer

Cypress component tests for Nuxt with Tailwind

I'm trying to set up Cypress component tests for a Nuxt app. It works, but almost none of my styles are working, because they depend on Tailwind together with my custom tailwind.config.js. This is my cypress/plugins/index.js: const { startDevServer…
0
votes
1 answer

Test with cypress graphics created with d3.js

i have a 2d chart made with d3.js and i should test it with cypress. First I wanted to make the dots move I tried these…
Luca
  • 335
  • 3
  • 19
0
votes
1 answer

Cypress: while running cypress ,automatically redirecting to login page

while I am running the cypress code, it is automatically redirecting to home page, and filling on login part, How to stop this? it('SubInterfaces',function(){ cy.url().should('include','/spoke/create') …
user2345
  • 63
  • 1
  • 10
0
votes
2 answers

# in cypress, what does it reallmean

I am kind of new to cypress and was wondering if someone can explain how to really use the # when calling for an element, I tried to find some documentation but nothing really useful. Maybe I was looking at the wrong place? if someone could point me…
0
votes
2 answers

How to pass value of same variable to another function's variable in cypress

I have a requirement that i need to store user email into one variable and then need to use same email to search a user created with same email in another method in cypress how can i do that? below is my method class UserManager { …
Sumit Soni
  • 29
  • 2
  • 6
0
votes
1 answer

Cypress: test if 2 elements are the same using trim() or something similar

I have a test that takes elements of a table and counters them by seeing if their content is the same, and it worked: cy.compareInputToText( 'app-myTable table tbody > :nth-child(1) > :nth-child(2) > input', 'app-myTable table tbody >…
0
votes
1 answer

why firebase gets undefined while login through cypress-firebase npm module?

I'm using "cypress-firebase": "^2.0.0", "firebase-admin": "^9.11.1" In my cypress command.js file: import firebase from "firebase/app"; import "firebase/auth"; import "firebase/database"; import "firebase/firestore"; import { attachCustomCommands }…
0
votes
0 answers

Cypress Test Runner stuck on new url

I am trying to run cypress script, which is login the user, now after login, app navigates from one URL to another, while URL is navigated successfully, but Test runner is continuously in 'New URL' state. Check Screenshot: I am using following…
Taimoor Pasha
  • 192
  • 2
  • 3
  • 16
0
votes
1 answer

How to add days, month and year to the selected date in cypress

Cypress moment not working. Any other solution to add the days, month and year to the current or selected date. import * as moment from 'moment' class TicketPage{ constructor(){} visit(){ cy.visit(''); } clickDate(){ …
1 2 3
11
12