Skip to content

Commit 31796fd

Browse files
committed
Update modal.spec.js
1 parent 424e5fe commit 31796fd

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

src/components/modal/modal.spec.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ describe('modal', () => {
1616
await wrapper.vm.$nextTick()
1717

1818
// This outer DIV will go away once we migrate to Portal-Vue
19-
// As all modals will be lazy
19+
// as all modals will be lazy
2020
expect(wrapper.is('div')).toBe(true)
2121
expect(wrapper.classes().length).toBe(0)
2222

23-
// Main outer wraper (has z-index, etc)... the stacker div
23+
// Main outer wrapper (has z-index, etc)... the stacker div
2424
const $outer = createWrapper(wrapper.element.firstElementChild)
2525
expect($outer.is('div')).toBe(true)
2626
expect($outer.classes().length).toBe(0)
2727
expect($outer.element.style.position).toEqual('absolute')
28-
expect($outer.element.style.zIndex).toEqual('2000')
28+
expect($outer.element.style.zIndex).toEqual('1040')
2929

3030
// Should not have a backdrop
3131
expect($outer.find('div.modal-backdrop').exists()).toBe(false)
3232

33-
// Main modal wraper
33+
// Main modal wrapper
3434
const $modal = $outer.find('div.modal')
3535
expect($modal.exists()).toBe(true)
3636
expect($modal.attributes('id')).toBeDefined()
@@ -92,18 +92,18 @@ describe('modal', () => {
9292
await waitAF()
9393

9494
// This outer DIV will go away once we migrate to Portal-Vue
95-
// As all modals will be lazy
95+
// as all modals will be lazy
9696
expect(wrapper.is('div')).toBe(true)
9797
expect(wrapper.classes().length).toBe(0)
9898

99-
// Main outer wraper (has z-index, etc)... the stacker div
99+
// Main outer wrapper (has z-index, etc)... the stacker div
100100
const $outer = createWrapper(wrapper.element.firstElementChild)
101101
expect($outer.is('div')).toBe(true)
102102
expect($outer.classes().length).toBe(0)
103103
expect($outer.element.style.position).toEqual('absolute')
104104
expect($outer.element.style.zIndex).toEqual('2000')
105105

106-
// Main modal wraper
106+
// Main modal wrapper
107107
const $modal = $outer.find('div.modal')
108108
expect($modal.exists()).toBe(true)
109109
expect($modal.attributes('id')).toBeDefined()
@@ -139,7 +139,7 @@ describe('modal', () => {
139139
attachToDocument: true,
140140
stubs: {
141141
// Disable the use of transitionStub fake transition
142-
// AS it doesn't run transition hooks
142+
// as it doesn't run transition hooks
143143
transition: false
144144
},
145145
propsData: {
@@ -165,18 +165,18 @@ describe('modal', () => {
165165
// expect(body.getAttribute('data-modal-open-count')).toEqual('1')
166166

167167
// This outer DIV will go away once we migrate to Portal-Vue
168-
// As all modals will be lazy
168+
// as all modals will be lazy
169169
expect(wrapper.is('div')).toBe(true)
170170
expect(wrapper.classes().length).toBe(0)
171171

172-
// Main outer wraper (has z-index, etc)... the stacker div
172+
// Main outer wrapper (has z-index, etc)... the stacker div
173173
const $outer = createWrapper(wrapper.element.firstElementChild)
174174
expect($outer.is('div')).toBe(true)
175175
expect($outer.classes().length).toBe(0)
176176
expect($outer.element.style.position).toEqual('absolute')
177177
expect($outer.element.style.zIndex).toEqual('2000')
178178

179-
// Main modal wraper
179+
// Main modal wrapper
180180
const $modal = $outer.find('div.modal')
181181
expect($modal.exists()).toBe(true)
182182
expect($modal.attributes('aria-hidden')).not.toBeDefined()
@@ -225,9 +225,7 @@ describe('modal', () => {
225225
})
226226

227227
describe('default button content, classes and attributes', () => {
228-
//
229-
// We may want to move these tests into individual files for managability
230-
//
228+
// We may want to move these tests into individual files for manageability
231229
it('default footer ok and cancel buttons', async () => {
232230
const wrapper = mount(Modal)
233231
expect(wrapper).toBeDefined()
@@ -568,7 +566,7 @@ describe('modal', () => {
568566

569567
expect($modal.element.style.display).toEqual('none')
570568

571-
// Try and open modal via bv::show::modal
569+
// Try and open modal via `bv::show::modal`
572570
wrapper.vm.$root.$emit('bv::show::modal', 'test')
573571

574572
await wrapper.vm.$nextTick()
@@ -579,7 +577,7 @@ describe('modal', () => {
579577
// Modal should now be open
580578
expect($modal.element.style.display).toEqual('')
581579

582-
// Try and close modal via bv::hide::modal
580+
// Try and close modal via `bv::hide::modal`
583581
wrapper.vm.$root.$emit('bv::hide::modal', 'test')
584582

585583
await wrapper.vm.$nextTick()

0 commit comments

Comments
 (0)