I have my login test scenario which is working. I have removed my username and password to a fixture file, which I then want to call in order to populate the username and password fields. Can someone point me in the right direction of how this should be done? Below is my test scenario tyring to call the fixture to populate the fields
describe('My Login Test', function (){
it('Visit Risk App Landing Page', function (){
cy.visit('site url')
cy.get('button').click()
cy.get('a.auth0-lock-alternative-link').contains('Not your account?').click()
cy.get('input.auth0-lock-input').first()
.type(cy.fixture('loginUser').email)
cy.get('input.auth0-lock-input').last()
.type(cy.fixture('loginUser').password)
cy.get('button').click()
cy.url().should('eq','site url')
})
})
Aucun commentaire:
Enregistrer un commentaire