From 1eea972d6ccc115d6c45e0d2cf4326d2492d8947 Mon Sep 17 00:00:00 2001 From: Marouan Bentaleb <38426175+marouanbentaleb@users.noreply.github.com> Date: Wed, 10 Apr 2019 16:50:46 +0100 Subject: [PATCH] [ADF-4373] Automation test for accurate error messages (#4581) --- e2e/core/error-component.e2e.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/e2e/core/error-component.e2e.ts b/e2e/core/error-component.e2e.ts index 7dc52fb019..c5092265df 100644 --- a/e2e/core/error-component.e2e.ts +++ b/e2e/core/error-component.e2e.ts @@ -66,11 +66,18 @@ describe('Error Component', () => { expect(browser.getCurrentUrl()).toBe(TestConfig.adf.url + '/report-issue'); }); - it('[C277304] We couldn’t find the page you were looking for.\' to be \'You\'re not allowed access to this resource on the server.', () => { + it('[C277304] Should display the error 404 when access to not found page', () => { browser.get(TestConfig.adf.url + '/error/404'); expect(errorPage.getErrorCode()).toBe('404'); expect(errorPage.getErrorTitle()).toBe('An error occurred.'); expect(errorPage.getErrorDescription()).toBe('We couldn’t find the page you were looking for.'); }); + it('[C307029] Should display Unknown message when error is undefined', () => { + browser.get(TestConfig.adf.url + '/error/501'); + expect(errorPage.getErrorCode()).toBe('UNKNOWN'); + expect(errorPage.getErrorTitle()).toBe('We hit a problem.'); + expect(errorPage.getErrorDescription()).toBe('Looks like something went wrong.'); + }); + });