Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion e2e/data/user-data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const userData = {
name: 'INTERNAL_EA_TEST_Please ignore this RFI_Do not Process',
email: 'test@example.com'
email: 'gary.dawson@defra.gov.uk'
}
7 changes: 4 additions & 3 deletions e2e/tests/pages/contact-page.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { test } from '../../fixtures.js'
import { pages } from '../../pages/index.js'
import { areaData } from '../../data/location-data.js'
import { userData } from '../../data/user-data.js'
import { invalidEmails } from '../../data/validation-data/invalid-contact-data.js'

test.describe('Contact page', () => {
Expand All @@ -9,8 +10,8 @@ test.describe('Contact page', () => {
})

test('navigates to check your details page after entering valid contact details and submitting', async ({ steps }) => {
await steps.type(pages.contact.fullNameInput, 'Test User')
await steps.type(pages.contact.emailInput, 'test@example.com')
await steps.type(pages.contact.fullNameInput, userData.name)
await steps.type(pages.contact.emailInput, userData.email)
await steps.submit()
await steps.expectOn(pages.checkYourDetails.page)
})
Expand All @@ -23,7 +24,7 @@ test.describe('Contact page', () => {

for (const invalidEmail of invalidEmails) {
test(`shows validation error when entering invalid email '${invalidEmail}'`, { tag: '@noDeps' }, async ({ steps }) => {
await steps.type(pages.contact.fullNameInput, 'Test User')
await steps.type(pages.contact.fullNameInput, userData.name)
await steps.type(pages.contact.emailInput, invalidEmail)
await steps.submit()
await steps.expectErrorText(pages.contact.missingEmailError)
Expand Down
Loading