Skip to content

Commit

Permalink
Merge pull request #37 from co-cddo/written-permission
Browse files Browse the repository at this point in the history
Written Permission happy path cypress test
  • Loading branch information
prakash-gds authored Mar 8, 2024
2 parents 081f65d + 8ef9be7 commit 9604367
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 9604367

Please sign in to comment.