mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 13:46:42 +02:00
Rename some vars in tab unit tests for consistency (#37248)
This commit is contained in:
@@ -603,19 +603,19 @@ describe('Tab', () => {
|
|||||||
'</div>'
|
'</div>'
|
||||||
].join('')
|
].join('')
|
||||||
|
|
||||||
const tabEl = fixtureEl.querySelector('#tab1')
|
const tabEl1 = fixtureEl.querySelector('#tab1')
|
||||||
const tabEl2 = fixtureEl.querySelector('#tab2')
|
const tabEl2 = fixtureEl.querySelector('#tab2')
|
||||||
const tabEl3 = fixtureEl.querySelector('#tab3')
|
const tabEl3 = fixtureEl.querySelector('#tab3')
|
||||||
const tabEl4 = fixtureEl.querySelector('#tab4')
|
const tabEl4 = fixtureEl.querySelector('#tab4')
|
||||||
const tab = new Tab(tabEl)
|
const tab1 = new Tab(tabEl1)
|
||||||
const tab2 = new Tab(tabEl2)
|
const tab2 = new Tab(tabEl2)
|
||||||
const tab3 = new Tab(tabEl3)
|
const tab3 = new Tab(tabEl3)
|
||||||
const tab4 = new Tab(tabEl4)
|
const tab4 = new Tab(tabEl4)
|
||||||
const spy1 = spyOn(tab, 'show').and.callThrough()
|
const spy1 = spyOn(tab1, 'show').and.callThrough()
|
||||||
const spy2 = spyOn(tab2, 'show').and.callThrough()
|
const spy2 = spyOn(tab2, 'show').and.callThrough()
|
||||||
const spy3 = spyOn(tab3, 'show').and.callThrough()
|
const spy3 = spyOn(tab3, 'show').and.callThrough()
|
||||||
const spy4 = spyOn(tab4, 'show').and.callThrough()
|
const spy4 = spyOn(tab4, 'show').and.callThrough()
|
||||||
const spyFocus1 = spyOn(tabEl, 'focus').and.callThrough()
|
const spyFocus1 = spyOn(tabEl1, 'focus').and.callThrough()
|
||||||
const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough()
|
const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough()
|
||||||
const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough()
|
const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough()
|
||||||
const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough()
|
const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough()
|
||||||
@@ -623,7 +623,7 @@ describe('Tab', () => {
|
|||||||
const keydown = createEvent('keydown')
|
const keydown = createEvent('keydown')
|
||||||
keydown.key = 'ArrowRight'
|
keydown.key = 'ArrowRight'
|
||||||
|
|
||||||
tabEl.dispatchEvent(keydown)
|
tabEl1.dispatchEvent(keydown)
|
||||||
expect(spy1).not.toHaveBeenCalled()
|
expect(spy1).not.toHaveBeenCalled()
|
||||||
expect(spy2).not.toHaveBeenCalled()
|
expect(spy2).not.toHaveBeenCalled()
|
||||||
expect(spy3).not.toHaveBeenCalled()
|
expect(spy3).not.toHaveBeenCalled()
|
||||||
@@ -644,19 +644,19 @@ describe('Tab', () => {
|
|||||||
'</div>'
|
'</div>'
|
||||||
].join('')
|
].join('')
|
||||||
|
|
||||||
const tabEl = fixtureEl.querySelector('#tab1')
|
const tabEl1 = fixtureEl.querySelector('#tab1')
|
||||||
const tabEl2 = fixtureEl.querySelector('#tab2')
|
const tabEl2 = fixtureEl.querySelector('#tab2')
|
||||||
const tabEl3 = fixtureEl.querySelector('#tab3')
|
const tabEl3 = fixtureEl.querySelector('#tab3')
|
||||||
const tabEl4 = fixtureEl.querySelector('#tab4')
|
const tabEl4 = fixtureEl.querySelector('#tab4')
|
||||||
const tab = new Tab(tabEl)
|
const tab1 = new Tab(tabEl1)
|
||||||
const tab2 = new Tab(tabEl2)
|
const tab2 = new Tab(tabEl2)
|
||||||
const tab3 = new Tab(tabEl3)
|
const tab3 = new Tab(tabEl3)
|
||||||
const tab4 = new Tab(tabEl4)
|
const tab4 = new Tab(tabEl4)
|
||||||
const spy1 = spyOn(tab, 'show').and.callThrough()
|
const spy1 = spyOn(tab1, 'show').and.callThrough()
|
||||||
const spy2 = spyOn(tab2, 'show').and.callThrough()
|
const spy2 = spyOn(tab2, 'show').and.callThrough()
|
||||||
const spy3 = spyOn(tab3, 'show').and.callThrough()
|
const spy3 = spyOn(tab3, 'show').and.callThrough()
|
||||||
const spy4 = spyOn(tab4, 'show').and.callThrough()
|
const spy4 = spyOn(tab4, 'show').and.callThrough()
|
||||||
const spyFocus1 = spyOn(tabEl, 'focus').and.callThrough()
|
const spyFocus1 = spyOn(tabEl1, 'focus').and.callThrough()
|
||||||
const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough()
|
const spyFocus2 = spyOn(tabEl2, 'focus').and.callThrough()
|
||||||
const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough()
|
const spyFocus3 = spyOn(tabEl3, 'focus').and.callThrough()
|
||||||
const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough()
|
const spyFocus4 = spyOn(tabEl4, 'focus').and.callThrough()
|
||||||
|
Reference in New Issue
Block a user