BigW Consortium Gitlab

Commit 9f15028c by James Edwards-Jones

Merge branch 'fix-jenkins-error' into '9-4-stable-patch-5'

Fix displaying specific error message when Jenkins test fails See merge request !13510
parents c7ad1f26 de6e029e
......@@ -102,7 +102,7 @@ export default class IntegrationSettingsForm {
})
.done((res) => {
if (res.error) {
new Flash(res.message, null, null, {
new Flash(`${res.message} ${res.service_response}`, null, null, {
title: 'Save anyway',
clickHandler: (e) => {
e.preventDefault();
......
......@@ -135,10 +135,10 @@ describe('IntegrationSettingsForm', () => {
integrationSettingsForm.testSettings(formData);
deferred.resolve({ error: true, message: errorMessage });
deferred.resolve({ error: true, message: errorMessage, service_response: 'some error' });
const $flashContainer = $('.flash-container');
expect($flashContainer.find('.flash-text').text()).toEqual(errorMessage);
expect($flashContainer.find('.flash-text').text()).toEqual('Test failed. some error');
expect($flashContainer.find('.flash-action')).toBeDefined();
expect($flashContainer.find('.flash-action').text()).toEqual('Save anyway');
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment