Questions tagged [cypress]

Cypress, an all-in-one testing framework and assertion library, complete with automatic waits, request mocking, and request stubbing

0
votes
1answer
9 views

Have a each() with if statement not working

Problem I only want the commands in the if logic to happen if the 3rd default button is visible, but it throws an error saying its parent has the css class of visibility: hidden. When you need to ...
1
vote
0answers
21 views

Uncaught TypeError: handler.apply is not a function (webpack-internal) with Vue/Rails/Cypress

So I'm working on a Vue/Rails application that's using GraphQL with Cypress in the frontend for testing the GUI. Whenever I break out my it blocks for testing the code I receive the following error: ...
0
votes
0answers
7 views

Using Cypress to Test an App That Relies on OAuth

I've inherited a Node.js web app that uses relies on OAuth. Whenever you visit a page the app ensures you've authenticated. Please note, there no Angular, React, Vue, etc here. Each page is straight ...
0
votes
0answers
16 views

Cypress get element length returns double

I am trying to test the insertion of an item and check the length of the items found before and after the addition operation. Here is the element <metadata class="chartbase" issubtitle="false" ...
0
votes
2answers
125 views

How to drag and drop in Cypress.io

I am testing Trello and trying to drag the last list and then drop it into a penultimate column, but the test is not working without ".wait". It would be really helpful if someone could advise about ...
0
votes
1answer
41 views

How to word my if statement in Cypress correctly

I am re-formatting this after running a few more tests and discovering more layers to this problem Current Problem So I found that I could add a data-cy to the underline to signify that a state is ...
0
votes
2answers
24 views

Cypress: type combination of keys and keyCodes

I need to navigate through the keyboard pressing ALT+F10. I know that is possible to type commands like this: cy.focused().type('{alt}') How can I add the F10 key to this command? Thanks
0
votes
0answers
17 views

Conditional E2E tests with Cypress for a payment processor

We are using GoPay.com for payments in our app. It runs in two modes, full redirect to their site or iframe based solution to show the payment form inline. The conditions for display either of those ...
0
votes
1answer
23 views

Monitor console output of websites in Cypress.io

I am using Cypress.io to test our new application (Node, React), but I would like to be able to monitor and check the console.log output of the website for any errors that are not explicitly captured ...
0
votes
0answers
27 views

Uncaught TypeError: Cannot read property 'start' of undefined with cypress

I am running some tests that are just grabbing inputs and filling them in with data and there are a lot. I have multiple tests like the code below: cy.get('input').eq(0) .type('4') .type('{...
2
votes
1answer
29 views

How to share describe() block in Cypress.io across various files, similar to Mocha's 'Shared Behaviour' facility

I am working on a Web-test automation framework, and would like to few functionalities present in describe() block in one cypress ..spec.js file, by methods present in another in another cypress .....
0
votes
2answers
13 views

How i can run parallel test in docker on gitlab without dashboard?

Start using cypress in docker compose on gitlab, how can I run tests parallel in docker compose? I use this command in docker: npx cypress run -b chrome What do I need to use for starting tests ...
-1
votes
0answers
12 views

Assert triggered too early when chaining promises

When running tests in Cypress and chaining multiple Promises (I'm wrapping them with cypress-promise which is just a syntactic sugar for new Cypress.Promise) my assertion is triggered too early which ...
0
votes
1answer
24 views

Why does the Electron browser reload after running each spec when using cypress run?

How do I ensure that all the spec files run without the browser reloading?
1
vote
2answers
29 views

Cypress - select element within another element - selector syntax shortcut for `within`

I have an element in my HTML which contain one checkbox; something like (the actual output is a bit more complex as we are using React + Material UI. This is however the general idea, one 'container' ...
0
votes
0answers
10 views

How do I get .trigger('drop') to register

Problem When I execute the provided code below the change is not actually staying. When I use .trigger('drop') it shows, in the snapshot, the handle/button moved to where it should be. However, it is ...
0
votes
0answers
11 views

cypress e2e test does not have node rights

Im testing an electron app in which i download zipped files form a server, than extract and use those files. Whenever i try to run my cypress e2e test for that it will simply get stuck on the test. I ...
0
votes
0answers
25 views

Cypress failing with CircleCI 2.0 and Permission denied while Unarchiving cache

version: 2 jobs: build: docker: - image: cypress/base:10 - image: circleci/node:10.15.3 working_directory: ~/repo steps: - checkout # Download and cache ...
0
votes
1answer
31 views

Finding the mouse position in Cypress

Problem/Desire Im currently trying to find the position of my mouse when testing in Cypress. I'm trying to work with WebGL models and since I can't grab those individually to be able to grab the ...
0
votes
0answers
30 views

How do I get Cypress to detect my existing Chrome browser after upgrade?

After upgrading from Cypress 3.2.0 to 3.3.0, Cypress opens with only the Electron option for execution. I've tried completely uninstalling Cypress (both versions), and re-installing from scratch with ...
1
vote
2answers
31 views

Extracting parts of a text in Cypress

I'm new to and Cypress and I need to extract a dynamical part of a text from my application. <body> <div>Hello World greeting number 9123</div> </body> In this example I need ...
0
votes
1answer
37 views

How to fix “Cannot find module 'fs-extra' - error” When deploying cypress files into jenkins?

I am using plugins in cypress and referred to https://docs.cypress.io/api/plugins/configuration-api.html#Usage. When we deploy them into jenkins, I am getting `pluginsFile` is set to `/e2e/cypress/...
0
votes
1answer
25 views

How can I use Cypress to select an <option> in a specific HTML <select> field?

I Want to select Options from the below HTML Code. timeentry_lov1 is Select Name which is the 2nd element in Page with the same Name. Also I checked that there is no Frame present in Page. But Is ...
2
votes
1answer
27 views

How can I check an element for multiple CSS classes in Cypress?

How to check if an element has multiple classes? Couldn't find anything on the official docs, only: cy.get('form').find('input').should('have.class', 'disabled') or expect($el).to.have.class('foo')...
-1
votes
2answers
32 views

How to share variable values in Cypress

I am learning to use Cypress. At this time, I have several spec files, structured as follows: /cypress /integration /child-a list.spec.js item.spec.js /child-b list.spec....
0
votes
1answer
29 views

if element does not exist continue performing actions until element does exist

I am new to cypress and i have been task with developing a few options to showcase the best way to do UI automation testing for a specific type of work. the test requires to drill down through a map ...
0
votes
0answers
17 views

Refused to display url in a frame because it set 'X-Frame-Options' to 'deny'

Refused to display 'https://login.microsoftonline.com/common/oauth2/authorize?client_id=514d5d4d-cf01-47f2-b27c-83444d8a622b&prompt=select_account&redirect_uri=https%3a%2f%2ftest.ci.ai....
0
votes
0answers
23 views

Cypress Not redirecting to iframe page through cy.visit

while redirecting from one url to another url is showing error Its login page where i have select and type the user name it('.type() - type into a DOM element', () => { cy.visit('https:...
0
votes
0answers
23 views

Should I test a minified production build with cypress?

I'm testing a meteor app (with React.js as client) with cypress. I'm willing to create a CI/CD script which will execute my cypress tests, but I think I am missing a point; how will cypress test my ...
0
votes
1answer
17 views

cy.setCookies() with domain option results in error

This works fine beforeEach(function() { cy.setCookie('cookieName', 'cookieValue'); }); But this beforeEach(function() { cy.setCookie('cookieName', 'cookieValue', { ...
0
votes
2answers
45 views

How to set/define environment variables and api_Server in cypress?

Currently, we are using cypress to test our application. We have 2 environments with 2 different api_Servers. I want to define this inside the environment files. I am not sure how to define both the ...
0
votes
0answers
29 views

Unable to run cypress svelte unit tests for svelte component that contains scss syntax

When I include the plugin for cypress-svelte-unit-test along with Cypres to unit test Svelte files, which suggested to include my webpack config, I get an error when running cypress:open "A dynamic ...
0
votes
1answer
46 views

How can I tell Cypress to hide Chrome when running from the command line?

Problem I want to be able to run my tests in terminal, but all my tests fail due to Cypress using Electron as the default browser and I want it to utilize Chrome, but without having to specify it in ...
3
votes
0answers
68 views
+100

How does module resolution in TypeScript work for global values (i.e. describe)?

While using jest on its own the corresponding typescript definitions got detected right after installing @types/jest. I then started to implement integration tests with cypress. Since cypress is ...
0
votes
0answers
17 views

Getting error while trying to use typescript with cypress: 'import' and 'export' may appear only with 'sourceType: module'

Getting the following error while trying to use typescript with cucumber feature file. Everything works fine if I change the .ts to .js. Error also seems clueless. SyntaxError: 'import' and 'export' ...
1
vote
0answers
26 views
+50

Cypress and Vaadin app will fire a error popup that prevent test to works

I need to test a Vaadin app, and sometimes, a popup is displayed about a communication problem. This seems to be a Cypress error report, be it is displayed with the Vaadin template, so it is a bit ...
4
votes
2answers
70 views

How to check if element exists using Cypress.io

How to check if element is present or not, so that certain steps can be performed if element is present. Else certain different steps can be performed if element is not present. I tried something ...
1
vote
0answers
23 views

How to add cucumber reports to cypress

I am using cypress-cucumber-preprocessor to create some cucumber test with cypress. The problem is that I only know how to create reports in JSON or JUnit format. But I need them to be in cucumber ...
0
votes
1answer
47 views

having multiple describe in spec leads to weird behaviour

I have 2 describe blocks in a spec file. First, describe visits xyz.com and Second, describe visits abc.com And I need these 2 describe in one spec only. The wired behavior I see is it runs the tests ...
0
votes
0answers
32 views

Run all tests on several URLs

Following Problem: I got about 50 similar websites which should all pass the cypress-tests. And they did I simply let for every website run all tests. My Issue is now, that it appears as one single ...
-1
votes
1answer
20 views

Converting Cypress file into a more appropriate format for exporting

I am struggling to put best practises into action, converting an existing file for Cypress testing into a more appropriate format for exporting and importing. Currently: support-file.js export ...
-1
votes
1answer
37 views

How to 'hammer' click in cypress.io?

I am running with Chrome 74 and am wanting to write a test that will 'spam' click a counter. Is there any way to write it so it will click x times instead of writing this over and over: cy.get('[...
1
vote
0answers
23 views

cypress-cucumber-preprocessor to connect both testing frameworks doesn't work

I want to connect Cypress and Cucumber and I found the following plugin: https://www.npmjs.com/package/cypress-cucumber-preprocessor But my implementation does not work and cannot be found. I also ...
0
votes
1answer
30 views

End to end test of UI features that show up after a long delay (5 minutes)

I'm trying to use an end to end test runner to test that a modal shows up after a delay of 5 minutes. The app is a single page web app, in this case React, and the testing framework, Cypress, and ...
0
votes
3answers
39 views

In cypress, where is the because() function?

Writing cypress tests with chai assertions, how should I surface the reason behind an assertion in the test output? My test output describes clearly what has failed, but there's no contextual ...
0
votes
0answers
37 views

Cypress tests not running. Error - node-cachedir

I am trying to run cypress from my application (to be tested) code. I am getting below error: Uncaught Error: Your OS "browser" is currently not supported by node-cachedir. Any help will be ...
1
vote
1answer
39 views

Can I have multiple 'it' in one 'describe' and use a beforeEach

So, I have a beforeEach to load up my site. I am mainly writing my test in one describe function with one it function. my beforeEach is in the index.js>Support>Cypress folder beforeEach(() => { ...
0
votes
2answers
47 views

How can we setup Cypress for IE and Edge?

I need to use Cypress for testing angular and react application on Internet Explorer and Microsoft edge. I have gone through some links which mentions that Cypress supports only Chrome, Chromium and ...
0
votes
2answers
40 views

Cypress throwing SecurityError

I am currently running with Chrome 74 and trying to use Cypress to test a style-guide in my app. When I load up Cypress it throws this error: SecurityError: Blocked a frame with origin "http://...
0
votes
1answer
29 views

How to target an attribute of a self defined component in cypress?

I'm extremely new to cypress and I want to test if I click my a tag, then the video should change but I don't know how to target the video attribute in my app-video component: it('button next should ...

http://mssss.yulina-kosm.ru