-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Breaks Due to Page Redirect #1697
Comments
If I'm understanding your question properly - this is a commonly asked question that's been answered on other various issues with links to how to do this properly. The short answer is you don't Here's some other answers.
Feel free to reopen this issue if you feel this is not adequate enough. |
Thanks for the quick response! I forgot to mention that the other page's login is rather intricate, using iframes and several redirects and as you suggested I initially tried to use the |
Hello, We are actually evaluating which solution to use for end2end testing in our project. But we hit a wall with the login step of our backoffice application because of the iframe/multiple domains restrictions. That and a straight forward way of running multiple test suites in parallel without a docker master degree Sorry i don't want to seem rude, but i'm actually sad that we can not go further with cypress, as i feel it has great potential. I just wanted to share that. |
@ricovitch which e2e solution did you end up going with? |
@lyonsbp i still think cypress is a great solution, but we had to make a pragmatic choice and we went with testcafe. |
This is a big blocker for me and my team. I am trying to work around it using |
I'm hitting a similar wall, my login has a I've tried: I really like this tool and how intuitive and great feedback it has and stepping through the test steps showing the state of the UI with before/after...but I can't log into the app, I can't use this tool. |
@brian-mann i'm not sure why this is closed. this is a really big blocker for us as well and can't get passed this redirect bug. Already wrote a LOT of tests for Cypress and would hate to have to move to something else because of something so silly. Usecase: it('properly load menu url', () => {
// Page should probably redirect to a default landing if plugged in randomly.
cy.visit('/page')
.location('pathname', { timeout: 10000 })
.should('eq', '/page/hi');
}); |
Yeah i'm having a similar issue. Doing the following steps:
even if - let's say 3 - redirects would happen (don't ask me why, login process..), then I would expect another assert with cy.location('href) would do the trick for me. Especially if I pass a timout of let's say 15 seconds (ignoring the fact that that might itself be a bad thing to do for now). |
@bgold0 @jiimaho Please open a new issue with a completely reproducible example (test code that we can run and demonstrate the problem). We can't run code that is |
Current behavior:
I must go through a login of a different app in order for my own app to be working, I can't mock that. So the first line I do is as described below - I use
cy.visit(..)
to go to that page an log in. However, often when it starts the test, instead of visiting that page and fill the form to login, the entire Chrome tab goes redirects there (rather than just the app on the righthand side panel) and the testing panels are gone as if I just opened a new tab in Chrome and went to that page. I have to kill the cypress process and restart it. That usually fixes it, if not I just restart it a couple more times.Desired behavior:
Testing proceeds as normal.
Steps to reproduce:
Maybe try to visit a different domain?
Versions
Cypress: 2.1.0
OS: MacOS High Sierra 10.13.3
Browser: Chrome 66
The text was updated successfully, but these errors were encountered: