Hi,
Why the following test gives me Whoops, there is no test to run. page?
```javascript
describe('Existance', function(){
it('Nav is visible', function(){
cy.visit('https://medium.com/m/signin')
cy.get('[data-action="twitter-auth"]').click()
cy.wait(5000)
cy.get('input[name="session[username_or_email]"]').type("
cy.get('input[name="session[password]""]').type("
cy.get('input[type="submit"]').click()
cy.wait(5000)
cy.visit('https://medium.com/me/stories/public')
cy.get("nav").should('be.visible')
});
})
It looks like you are trying to visit an external site for oauth access. This is a common anti pattern with workarounds. You should read our best practices guide on this.
https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites
Also keep in mind Cypress is not a general automation tool. It鈥檚 built for testing apps under tor control.
It looks like you are trying to visit an external site for oauth access. This is a common anti pattern with workarounds. You should read our best practices guide on this.
https://docs.cypress.io/guides/references/best-practices.html#Visiting-external-sites
Also keep in mind Cypress is not a general automation tool. It鈥檚 built for testing apps under tor control.
Also might want to check out our logging in recipes.
https://docs.cypress.io/examples/recipes/logging-in-recipe.html#
Well we have an extension for Medium, and I have to go to medium to make some tests while I am logged in, how I should do that? If I requested the page it will redirect to the login page.
I also ran into the same problem.
Here is my case: I want to try Cypress on my local machine to test web app deployed to company integration test machine. This app is accessed via URL with cy.visit(URL), which is unfortunately considered by Cypress a third party website. Yet, I or the company indeed has full control of the app.
Won't this limit the range of user for Cypress? It looks to me that only test engineer who has access to code and successfully deployed locally can fully unleash Cypress's power.
@eric07109 you'll need to provide your test code and what it is you're doing. Your issue is likely very different from the one posted.
Here is my case:
describe('Login', function(){
it('Login', function(){
cy.visit('URL')
cy.get('#j_username').type('account')
cy.get('#j_password').type('password')
cy.get('input[type=submit]').click()
cy.url().should('include', '/index.req')
})
})
Most helpful comment
Well we have an extension for Medium, and I have to go to medium to make some tests while I am logged in, how I should do that? If I requested the page it will redirect to the login page.