Skip to content

Commit

Permalink
Written Permission happy path cypress test
Browse files Browse the repository at this point in the history
  • Loading branch information
prakash-gds committed Mar 7, 2024
1 parent b131f3a commit 8ef9be7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions cypress/e2e/happy-path-written-permission.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
describe('Happy passes until written permission', () => {
it('Performs full transaction till written permission', () => {
cy.visit('http://0.0.0.0:8000/')

cy.get('h1').should('include.text', 'Which .gov.uk Approved Registrar organisation are you from?')
cy.get('select.govuk-select').should('exist')

cy.get('select.govuk-select').select('34SP.com')

cy.get('.govuk-button').click()

cy.get('h1').should('include.text', 'What is your email address?')
cy.get('.govuk-input').type('[email protected]')
cy.get('.govuk-button').click()

cy.get('h1').should('include.text', 'Which of the following best describes your registrant\'s organisation?')
cy.get('#id_registrant_type_2').click()
cy.get('.govuk-button').click()

cy.get('h1').should('include.text', 'What is your registrant’s organisation name?')
cy.get('.govuk-input').type('HMRC')
cy.get('.govuk-button').click()

cy.get('h1').should('include.text', 'Does your registrant have written permission to apply for a .gov.uk domain name?')
cy.get('#id_written_permission_1').click()
cy.get('.govuk-button').click()

cy.get('h1').should('include.text', 'Confirm') // Should change later as more pages get added
})
})

0 comments on commit 8ef9be7

Please sign in to comment.