Skip to content

Commit

Permalink
remove left over method after #34519 merge
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Nov 30, 2021
1 parent 2a51370 commit 1b3f677
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
12 changes: 0 additions & 12 deletions js/src/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -398,18 +398,6 @@ class Tooltip extends BaseComponent {
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('title')
}

updateAttachment(attachment) {
if (attachment === 'right') {
return 'end'
}

if (attachment === 'left') {
return 'start'
}

return attachment
}

// Private
_initializeOnDelegatedTarget(event, context) {
return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())
Expand Down
34 changes: 0 additions & 34 deletions js/tests/unit/tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1082,40 +1082,6 @@ describe('Tooltip', () => {
})
})

describe('updateAttachment', () => {
it('should use end class name when right placement specified', done => {
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'

const tooltipEl = fixtureEl.querySelector('a')
const tooltip = new Tooltip(tooltipEl, {
placement: 'right'
})

tooltipEl.addEventListener('inserted.bs.tooltip', () => {
expect(tooltip.getTipElement().classList.contains('bs-tooltip-auto')).toEqual(true)
done()
})

tooltip.show()
})

it('should use start class name when left placement specified', done => {
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'

const tooltipEl = fixtureEl.querySelector('a')
const tooltip = new Tooltip(tooltipEl, {
placement: 'left'
})

tooltipEl.addEventListener('inserted.bs.tooltip', () => {
expect(tooltip.getTipElement().classList.contains('bs-tooltip-auto')).toEqual(true)
done()
})

tooltip.show()
})
})

describe('setContent', () => {
it('should do nothing if the element is null', () => {
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'
Expand Down

0 comments on commit 1b3f677

Please sign in to comment.