Category "cypress"

Visiting a Url in cypress

I have a deployed application. when i open the url the website opens just fine. when i try to test it using cypress i become cy.visit() failed trying to load:

How to click on a button within a specific div based on button text?

In a Cypress test, I am trying to click a specific button nested inside a div, based on it's text. Below is the HTML code I am testing: <div class="mat-menu-

Mocking server side requests for end to end testing by cypress

I am using Cypress for end to end tests. To test my payment process I need to mock the request of my back end(express) to bank for transaction. So when the cypr

How to freeze request to test that components are disabled using Cypress?

I'm using VueJS and Cypress to test the app e2e. I have a modal where user fills a form and click on the "send" button. When user clicks on that button, we disa

Conditional testing in Cypress - check if cy.xpath-element has class value

What I want to do: I want to click a button. Then some element expands, and the button class name is changing. I only want to expand the element if not done yet

Cypress: click and drag an image? mousedown & mousemove not working

I'm trying to test a gallery for the first time with Cypress but I'm having trouble trying to get the mouse events to work: cy.get("img#front").should("be.vis

JSESSIONID cookie not preserved using Cypress

We are currently logging into our application using the cy.request() method and here the JSESSIONID cookie is set. After that we do various other requests also

Cypress - Unable to get the Response Headers - API Automation

I have an API automation test suite using Cypress and one of the issue I am facing in one of the test is to validate the response headers. For some reason, I am

Not able to click on a button inside iframe using cypress

Not able to click on the button inside iframe using cypress HTML <button class="MuiButtonBase-root MuiCardActionArea-root jss9" tabindex="0" type="button">

ReferenceError: context is not defined when using cypress with testing-library.com

Here's my test in ./tests/homepage.test.js context('Signup flow', () => { it('The happy path should work', () => { cy.visit('https://grazily.c

Bitbucket pipeline Your system is missing the dependency: Xvfb

I'm trying to add cypress to the bitbucket pipeline but it tells me that I need to install Xvfb and I don't know how to keep going. This is my bitbucket.pipelin

Looking for a way to excute a command line from cypress

I need to create a file and copy it somewhere by some code from cypress . the first step is done by using cy.writeFile and now myfile.txt is created Now i need

How can I connect twice to db in Cypress tests?

I need to connect to my db (Postgres) twice during autotest - at the beginning to truncate and at the end to select a new note from the table. I tried to do it

Cypress-webpack preprocesor, alias doesnt work

I use a vue-cli- without vue-cli-cypress (some problems with enviroments variables). Everywhere in the code, we use '@' to import some components and etc. So I

Cypress doesn't take updated values in the repetition, only takes hard coded numbers

Why does it seems like cypress wants to know how many times the test cases will repeat before running all the test-cases. In my case I have two test files somet

Can we directly unit test HTML embedded JavaScript functions?

Suppose we have a webpage with embedded JavaScript as in index.html as follows: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xm

How to use Cypress datatables to loop through multiple test scenarios?

I am trying to use datatables to test one input field in my Cypress scenario below Scenario: The one where the user enters a value to calculate the factorial

Cypress with Azure AD (MSAL)

I'm new to both Cypress and Azure AD, but I've been following the steps described here to create Cypress tests on an existing Angular app that uses Azure AD. It

Cypress basic authentication in all cy.visit requests

I have a cy.visit() calls with basic authentication which looks like this: it('launch website', () => { cy.visit('url', { auth: { username: '....',

Why does Cypress get ECONNRESET when accessing api.cypress.io port 443?

Cypress is failing whenever it tries to start the browser for any test. The debug output (below) for Cypress says that it makes a request of api.cypress.io at