Questions tagged [cypress-origin]

19 questions
6
votes
1 answer

Reduce callback nesting in cypress

I've read that in Cypress I should not use await and that it is not needed because you can remove nesting through chaining. Here I have a cy.fixure nested in cy.origin nested in cy.session, is there a way to flatten this? cy.session([], () => { …
Baki
  • 564
  • 2
  • 10
  • 22
3
votes
1 answer

Unable to get cypress new location/href after page load

I'm trying to execute this test on Cypress: get URL parameter/query with of the current page eg: localhost:3000/?redirect_link=X Click on skip button inside of the current page Redirects to another page (it's a page, not component so it's…
Lucy
  • 85
  • 6
3
votes
2 answers

cy.origin() and immediate redirect

I am having trouble with testing my oauth-secured application. The problem manifests itself when there is no public page - user is immediately redirected to OAuth server it they are not authenticated. I managed to reproduce the problem in much…
Lesiak
  • 22,088
  • 2
  • 41
  • 65
2
votes
1 answer

Cypress uncaught:exception handler not working with Magic.link flow

I'm using Cypress to test a login flow that uses Magic.link auth on a mobile Web device, which is encountering the ResizeObserver loop limit exceeded error, as it tries to navigate the Google Auth forms. I've looked at numerous posts, and played…
quickshiftin
  • 66,362
  • 10
  • 68
  • 89
2
votes
2 answers

error when i use cy.xpath inside cy.origin

I'm using Cypress to test a website. When I use xpath inside cy.origin(), It's not working. it('t1', function() { cy.origin(('BaseUrl'), () => { cy.visit('/profile') cy.xpath("//input[@name='username']").type('user') …
2
votes
1 answer

Cypress cy.origin is doesn't work when it link to LinkedIn

I was developing a feature that redirects users to profiles on various platforms. And to test this, I wrote the following code using the newly released cy.origin yesterday. cy.origin('www.example.com', () => { cy.visit('/username') }) However,…
sunwoo Lee
  • 71
  • 1
  • 6
1
vote
1 answer

Cypress file upload cy.Origin

When I use the cypress-file-upload plugin without the cy.origin() function, it works perfectly. However, when I introduce cy.origin() in my test, I get the error cy.get(...).attachFile is not a function, even though I've properly installed and…
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
1 answer

Cypress custom Commando with cy.origin inside

I'm trying to do this command: Cypress.Commands.add('login', (userId, password) => { cy.origin('https://some-sso.page', () => { cy.get('input[placeholder="UserID"]').type(userId); cy.get('input[placeholder="Password"]').type(password0); …
pmiranda
  • 7,602
  • 14
  • 72
  • 155
1
vote
0 answers

Cypress code coverage for cross-origin code

Code fails when running with code coverage for cross-origin program My program uses a lot of cross-origin testing and I'm able to get it to run fine, but when I try to add in code coverage I get an error when it tries to change origins that says…
1
vote
0 answers

cy.origin() and multiple origins in the same domain

I am trying to add login flow to my cypress tests. I want to get it running on my machine, in the following environment: both app and OAuth server are running in docker containers both containers have their ports mapped to localhost: app is…
Lesiak
  • 22,088
  • 2
  • 41
  • 65
1
vote
1 answer

Cypress origin command using dynamic data in a secondary origin

I am trying to follow the following code from the Cypress documentation. cy.origin( 'supersecurelogons.com', // Send the args here... { args: sentArgs }, // ...and receive them at the other end here! ({ username, password }) => { …
David Boydell
  • 1,053
  • 1
  • 8
  • 18
0
votes
1 answer

Cypress soft assertions with cy.origin - Why is it passing a test with failed assertions?

I think we all know that cypress and soft assertions has been discussed to death, and various solutions to implementing soft solutions are out there. For some time now, I've been using the following code, based on the old stack question Does cypress…
Steve H
  • 280
  • 1
  • 2
  • 11
0
votes
0 answers

RPC Executor Service Error when automating google sign in option (Cypress)

I have a webpage being tested using Cypress Automation. Within this webpage, it has the option to sign in via Google. I was able to create a script for this but it is giving me an error coming from Google itself. Note that this is occurring for…
Lars
  • 51
  • 1
  • 8
0
votes
1 answer

How to handle multiple redirects to different origins in Cypress

I need to visit a URL that redirects twice to different origins. e.g: domain-to-visit.com -> redirect1.com -> final-domain.com This code below works for a single redirect: cy.origin('redirect1.com') => { cy.visit('domain-to-visit.com'); });…
1
2