Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 00:09:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-11 00:09:21 +0300
commit06bb4eba7828ce59fde366734828458c037059b4 (patch)
tree44b95a53123d91684cc1c67716ef87cc1c0964fb /spec/frontend/confirm_modal_spec.js
parent219eead23f9feb5da9ec378c451d773aea2dfe61 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/confirm_modal_spec.js')
-rw-r--r--spec/frontend/confirm_modal_spec.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/frontend/confirm_modal_spec.js b/spec/frontend/confirm_modal_spec.js
index f133cef675f..89cfc3ef3a3 100644
--- a/spec/frontend/confirm_modal_spec.js
+++ b/spec/frontend/confirm_modal_spec.js
@@ -8,7 +8,6 @@ describe('ConfirmModal', () => {
path: `${TEST_HOST}/1`,
method: 'delete',
modalAttributes: {
- modalId: 'geo-entry-removal-modal',
title: 'Remove tracking database entry',
message: 'Tracking database entry will be removed. Are you sure?',
okVariant: 'danger',
@@ -19,7 +18,6 @@ describe('ConfirmModal', () => {
path: `${TEST_HOST}/1`,
method: 'post',
modalAttributes: {
- modalId: 'geo-entry-removal-modal',
title: 'Update tracking database entry',
message: 'Tracking database entry will be updated. Are you sure?',
okVariant: 'success',
@@ -53,6 +51,7 @@ describe('ConfirmModal', () => {
const findModalOkButton = (modal, variant) =>
modal.querySelector(`.modal-footer .btn-${variant}`);
const findModalCancelButton = modal => modal.querySelector('.modal-footer .btn-secondary');
+ const modalIsHidden = () => findModal().getAttribute('aria-hidden') === 'true';
const serializeModal = (modal, buttonIndex) => {
const { modalAttributes } = buttons[buttonIndex];
@@ -61,7 +60,6 @@ describe('ConfirmModal', () => {
path: modal.querySelector('form').action,
method: modal.querySelector('input[name="_method"]').value,
modalAttributes: {
- modalId: modal.id,
title: modal.querySelector('.modal-title').innerHTML,
message: modal.querySelector('.modal-body div').innerHTML,
okVariant: [...findModalOkButton(modal, modalAttributes.okVariant).classList]
@@ -92,6 +90,7 @@ describe('ConfirmModal', () => {
describe('GlModal', () => {
it('is rendered', () => {
expect(findModal()).toExist();
+ expect(modalIsHidden()).toBe(false);
});
describe('Cancel Button', () => {
@@ -102,7 +101,7 @@ describe('ConfirmModal', () => {
});
it('closes the modal', () => {
- expect(findModal()).not.toExist();
+ expect(modalIsHidden()).toBe(true);
});
});
});