diff --git a/src/views/errors.html b/src/views/errors.html index 7e6abc2c..48afcea2 100644 --- a/src/views/errors.html +++ b/src/views/errors.html @@ -70,7 +70,7 @@

{{ govukButton({ text: "Upload a new version", - href: "/upload" + href: "/upload-method" }) }}
diff --git a/test/acceptance/upload_data.test.js b/test/acceptance/upload_data.test.js index db49f8b6..20bf56a5 100644 --- a/test/acceptance/upload_data.test.js +++ b/test/acceptance/upload_data.test.js @@ -64,6 +64,10 @@ test('Enter form information and upload a file with errors and without errors', await page.getByRole('button', { name: 'Upload a new version' }).click() + await page.waitForURL('**/upload-method') + await page.getByLabel('File Upload').check() + await page.getByRole('button', { name: 'Continue' }).click() + await page.waitForURL('**/upload') fileChooserPromise = page.waitForEvent('filechooser') @@ -135,3 +139,21 @@ test('Enter form information and specify a URL without errors', async ({ page }) await page.waitForURL('**/confirmation') }) + +test('test', async ({ page }) => { + await page.goto('/') + await page.getByRole('button', { name: 'Start now' }).click() + + await page.getByLabel('Conservation area dataset').check() + await page.getByRole('button', { name: 'Continue' }).click() + + await page.getByLabel('URL').check() + await page.getByRole('button', { name: 'Continue' }).click() + + await page.getByLabel('URL').click() + await page.getByLabel('URL').fill('https://example.com/conservation-area-errors.csv') + await page.getByRole('button', { name: 'Continue' }).click() + + await page.getByRole('button', { name: 'Upload a new version' }).click() + await page.waitForURL('**/upload-method') +}) diff --git a/test/mock-api/index.js b/test/mock-api/index.js index cebef080..d661af5c 100644 --- a/test/mock-api/index.js +++ b/test/mock-api/index.js @@ -26,7 +26,7 @@ app.post(config.api.validationEndpoint, (req, res) => { const _toSend = { ...APIResponse } - if (filename !== 'conservation-area-errors.csv') { + if (filename !== 'conservation-area-errors.csv' && filename !== 'unassigned') { _toSend['issue-log'] = [] _toSend['column-field-log'] = [] }