https://cypress.io logo
Attempting to login to Twitch using Cypress e2e
# i-need-help
f
I'm following along with https://docs.cypress.io/guides/end-to-end-testing/social-authentication#Testing-with-Cypress except with Twitch values and am running into the error
Your browser is not currently supported. Please use a recommended browser or learn more here.
. The code I am running is here:
Copy code
ts

Cypress.Commands.add('logIntoTwitch', () => {
  logIntoTwitch(Cypress.env('TWITCH_USER'), Cypress.env('TWITCH_PW'))
})

function logIntoTwitch(username: string, password: string) {
  cy.visit('http://localhost:3000/api/auth/signin?callbackUrl=%2Fdashboard')
  cy.get('button').click()

  cy.origin(
    'https://www.twitch.tv/login',
    {
      args: {
        username,
        password,
      },
    },
    ({ username, password }) => {
      cy.get('input[id="login-username"]').type(username)
      cy.get('input[id="password-input"]').type(password, {
        log: false,
      })
      cy.get('button[data-a-target="passport-login-button"]').click()
    }
  )
}
Visually, it works just fine. Clicking the correct input fields, typing, and submitting the expected data. The issue is Twitch is saying the browser spawned within the E2E test isn't supported. Is there something I may be able to do to make this work?

https://cdn.discordapp.com/attachments/1103475121118785659/1103475121680810017/FvPjTvaaIAEwocS.jpeg

Am able to confirm this doesn't work with Firefox either...
c
have you run this with
Copy code
cypress run --browser chrome
?