diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/confirm_modal_spec.js | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/confirm_modal_spec.js')
-rw-r--r-- | spec/frontend/confirm_modal_spec.js | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/spec/frontend/confirm_modal_spec.js b/spec/frontend/confirm_modal_spec.js index 70076532a94..8a12ff3a01f 100644 --- a/spec/frontend/confirm_modal_spec.js +++ b/spec/frontend/confirm_modal_spec.js @@ -29,7 +29,7 @@ describe('ConfirmModal', () => { beforeEach(() => { const buttonContainer = document.createElement('div'); - buttons.forEach(x => { + buttons.forEach((x) => { const button = document.createElement('button'); button.setAttribute('class', 'js-confirm-modal-button'); button.setAttribute('data-path', x.path); @@ -50,7 +50,7 @@ describe('ConfirmModal', () => { const findModal = () => document.querySelector('.gl-modal'); const findModalOkButton = (modal, variant) => modal.querySelector(`.modal-footer .btn-${variant}`); - const findModalCancelButton = modal => modal.querySelector('.modal-footer .btn-secondary'); + const findModalCancelButton = (modal) => modal.querySelector('.modal-footer .btn-secondary'); const modalIsHidden = () => findModal() === null; const serializeModal = (modal, buttonIndex) => { @@ -63,7 +63,7 @@ describe('ConfirmModal', () => { title: modal.querySelector('.modal-title').innerHTML, message: modal.querySelector('.modal-body div').innerHTML, okVariant: [...findModalOkButton(modal, modalAttributes.okVariant).classList] - .find(x => x.match('btn-')) + .find((x) => x.match('btn-')) .replace('btn-', ''), okTitle: findModalOkButton(modal, modalAttributes.okVariant).innerHTML, }, @@ -78,9 +78,7 @@ describe('ConfirmModal', () => { describe('when button clicked', () => { beforeEach(() => { initConfirmModal(); - findJsHooks() - .item(0) - .click(); + findJsHooks().item(0).click(); }); it('does not replace JsHook with GlModal', () => { @@ -116,9 +114,7 @@ describe('ConfirmModal', () => { `(`when multiple buttons exist`, ({ index }) => { beforeEach(() => { initConfirmModal(); - findJsHooks() - .item(index) - .click(); + findJsHooks().item(index).click(); }); it('correct props are passed to gl-modal', () => { |