You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/cypress/e2e/auth/auth.cy.ts

20 lines
932 B

/// <reference types="cypress" />
describe('check auth page', () => {
beforeEach(() => {
cy.visit(`https://auth.${Cypress.env('DOMAIN')}/authorize?client_id=insports-ott-web&redirect_uri=https%3A%2F%2Finsports.tv%2Fredirect&response_type=id_token%20token&scope=openid&state=9132f8d339bb4f07b6ad48d0a4b32664&nonce=fcf22b26396c4424b1c88ea23d62f6e9&response_mode=query&lang=en`)
})
it('displays email and password inputs and authorization', () => {
cy.get('input[name="email"]').clear().type(Cypress.env('EMAIL'))
cy.get('input[name="password"]').clear().type(Cypress.env('PASS'))
cy.get('form').submit()
cy.url().should('contain', `https://${Cypress.env('DOMAIN')}/?date=`)
cy.getAllLocalStorage()
.then((result) => {
expect(result[`https://${Cypress.env('DOMAIN')}`].token).to.not.be.null
}).end()
// .clearLocalStorage('token')
// .clearCookie('access_token')
})
})