From 7675b87c0ba8a9fa8a445b9ea176f029bada31dc Mon Sep 17 00:00:00 2001 From: GeoSot Date: Thu, 25 Nov 2021 20:31:19 +0200 Subject: [PATCH] remove left over method after #32692 merge --- js/src/tooltip.js | 12 ------------ js/tests/unit/tooltip.spec.js | 34 ---------------------------------- 2 files changed, 46 deletions(-) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index 29be4d8d26ca..d0b43dd04680 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -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()) diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js index 4a7022234cba..68161d48513b 100644 --- a/js/tests/unit/tooltip.spec.js +++ b/js/tests/unit/tooltip.spec.js @@ -1082,40 +1082,6 @@ describe('Tooltip', () => { }) }) - describe('updateAttachment', () => { - it('should use end class name when right placement specified', done => { - fixtureEl.innerHTML = '' - - 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 = '' - - 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 = ''