diff --git a/app/locales/ca/translations.js b/app/locales/ca/translations.js index 3b5ef18..ff6cbd5 100644 --- a/app/locales/ca/translations.js +++ b/app/locales/ca/translations.js @@ -1,4 +1,5 @@ export default { + 'action.abort': 'Abort', 'action.back': 'Enrere', 'action.next': 'Següent', 'action.save': 'Desa', diff --git a/app/locales/de/translations.js b/app/locales/de/translations.js index 9043a53..60eb9b4 100644 --- a/app/locales/de/translations.js +++ b/app/locales/de/translations.js @@ -1,4 +1,5 @@ export default { + 'action.abort': 'Abbrechen', 'action.back': 'Zurück', 'action.next': 'Weiter', 'action.save': 'Speichern', diff --git a/app/locales/en/translations.js b/app/locales/en/translations.js index ca26cd0..c26e834 100644 --- a/app/locales/en/translations.js +++ b/app/locales/en/translations.js @@ -1,4 +1,5 @@ export default { + 'action.abort': 'Abort', 'action.back': 'Back', 'action.next': 'Next', 'action.save': 'Save', diff --git a/app/locales/es/translations.js b/app/locales/es/translations.js index 034702a..2128299 100644 --- a/app/locales/es/translations.js +++ b/app/locales/es/translations.js @@ -1,4 +1,5 @@ export default { + 'action.abort': 'Abort', 'action.back': 'Atras', 'action.next': 'Siguiente', 'action.save': 'Guardar', diff --git a/app/locales/it/translations.js b/app/locales/it/translations.js index ccf322d..3938083 100644 --- a/app/locales/it/translations.js +++ b/app/locales/it/translations.js @@ -1,4 +1,5 @@ export default { + 'action.abort': 'Abort', 'action.back': 'Indietro', 'action.next': 'Avanti', 'action.save': 'Salvare', diff --git a/app/templates/poll/participation.hbs b/app/templates/poll/participation.hbs index cf771b7..72d49c1 100644 --- a/app/templates/poll/participation.hbs +++ b/app/templates/poll/participation.hbs @@ -80,24 +80,32 @@ {{/bs-form}} -{{#bs-modal - open=savingFailed - title=(t "modal.save-retry.title") - body=false - footer=false - closeButton=false - autoClose=false - id="modal-saving-failed" -as |modal| -}} - {{#modal.body}} + + +

{{t "modal.save-retry.text"}}

- {{/modal.body}} - {{#modal.footer}} - {{bs-button - defaultText=(t "modal.save-retry.button-retry") - type="primary" - onClick=(action "save") - }} - {{/modal.footer}} -{{/bs-modal}} +
+ + + {{t "action.abort"}} + + + {{t "modal.save-retry.button-retry"}} + + +
\ No newline at end of file diff --git a/tests/acceptance/participate-in-a-poll-test.js b/tests/acceptance/participate-in-a-poll-test.js index de2fac8..d060149 100644 --- a/tests/acceptance/participate-in-a-poll-test.js +++ b/tests/acceptance/participate-in-a-poll-test.js @@ -150,18 +150,18 @@ module('Acceptance | participate in a poll', function(hooks) { await visit(`/poll/${poll.id}/participation?encryptionKey=${encryptionKey}`); assert.equal(currentRouteName(), 'poll.participation'); - assert.dom('modal-saving-failed-modal') - .doesNotExist('failed saving notification is not shown before attempt to save'); + assert.dom('#modal-saving-failed-modal .modal-content') + .isNotVisible('failed saving notification is not shown before attempt to save'); await pollParticipate('John Doe', ['yes', 'no']); - assert.dom('#modal-saving-failed-modal') - .exists('user gets notified that saving failed'); + assert.dom('#modal-saving-failed-modal .modal-content') + .isVisible('user gets notified that saving failed'); this.server.post('/users'); - await click('#modal-saving-failed-modal button'); - assert.dom('#modal-saving-failed-modal') - .doesNotExist('Notification is hidden after another save attempt was successful'); + await click('#modal-saving-failed-modal [data-test-button="retry"]'); + assert.dom('#modal-saving-failed-modal .modal-content') + .isNotVisible('Notification is hidden after another save attempt was successful'); assert.equal(currentRouteName(), 'poll.evaluation'); assert.equal(PollEvaluationPage.participants.length, 1, 'user is added to participants table');