Skip to content

Commit b7106f4

Browse files
committed
test: remove unneeded tests
fix: BOverlay build issues
1 parent 53e6777 commit b7106f4

File tree

2 files changed

+6
-28
lines changed

2 files changed

+6
-28
lines changed

packages/bootstrap-vue-3/src/components/BOverlay/BOverlay.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@
2828
</template>
2929

3030
<script setup lang="ts">
31+
import {computed, toRef} from 'vue'
3132
import type {Booleanish, ColorVariant, SpinnerType} from '../../types'
3233
import {useBooleanish} from '../../composables'
33-
import {computed, CSSProperties, toRef} from 'vue'
3434
import BTransition from '../BTransition/BTransition.vue'
3535
import BSpinner from '../BSpinner.vue'
3636
37-
const POSITION_COVER: CSSProperties = {top: 0, left: 0, bottom: 0, right: 0}
38-
3937
interface Props {
4038
bgColor?: string
4139
blur?: string
@@ -90,6 +88,8 @@ interface Emits {
9088
9189
const emit = defineEmits<Emits>()
9290
91+
const positionStyles = {top: 0, left: 0, bottom: 0, right: 0}
92+
9393
const fixedBoolean = useBooleanish(toRef(props, 'fixed'))
9494
const noCenterBoolean = useBooleanish(toRef(props, 'noCenter'))
9595
const noFadeBoolean = useBooleanish(toRef(props, 'noFade'))
@@ -118,7 +118,7 @@ const spinnerAttrs = computed(() => ({
118118
}))
119119
120120
const overlayStyles = computed(() => ({
121-
...POSITION_COVER,
121+
...positionStyles,
122122
zIndex: props.zIndex || 10,
123123
}))
124124
@@ -133,15 +133,15 @@ const overlayClasses = computed(() => [
133133
const blurClasses = computed(() => [computedVariant.value, computedRounded.value])
134134
135135
const blurStyles = computed(() => ({
136-
...POSITION_COVER,
136+
...positionStyles,
137137
opacity: props.opacity,
138138
backgroundColor: props.bgColor || undefined,
139139
backdropFilter: blur ? `blur(${blur})` : undefined,
140140
}))
141141
142142
const spinWrapperStyles = computed(() =>
143143
noCenterBoolean.value
144-
? {...POSITION_COVER}
144+
? positionStyles
145145
: {
146146
top: '50%',
147147
left: '50%',

packages/bootstrap-vue-3/src/components/BOverlay/overlay.spec.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -574,17 +574,6 @@ describe('', () => {
574574
expect($spinner.props('type')).toBe('grow')
575575
})
576576

577-
it('child BTransition child div second child div BSpinner is given prop type to be default when prop spinnerType is empty string', () => {
578-
const wrapper = mount(BOverlay, {
579-
props: {show: true, spinnerType: ''},
580-
})
581-
const $transition = wrapper.getComponent(BTransition)
582-
const $div = $transition.get('div')
583-
const [, $third] = $div.findAll('div')
584-
const $spinner = $third.getComponent(BSpinner)
585-
expect($spinner.props('type')).toBe('border')
586-
})
587-
588577
it('child BTransition child div second child div BSpinner is given prop type to be prop spinnerType', () => {
589578
const wrapper = mount(BOverlay, {
590579
props: {show: true, spinnerVariant: 'danger'},
@@ -596,17 +585,6 @@ describe('', () => {
596585
expect($spinner.props('variant')).toBe('danger')
597586
})
598587

599-
it('child BTransition child div second child div BSpinner is given prop type to be prop spinnerType', () => {
600-
const wrapper = mount(BOverlay, {
601-
props: {show: true, spinnerVariant: ''},
602-
})
603-
const $transition = wrapper.getComponent(BTransition)
604-
const $div = $transition.get('div')
605-
const [, $third] = $div.findAll('div')
606-
const $spinner = $third.getComponent(BSpinner)
607-
expect($spinner.props('variant')).toBeUndefined()
608-
})
609-
610588
it('child BTransition child div second child div BSpinner is given prop type to be prop spinnerType', () => {
611589
const wrapper = mount(BOverlay, {
612590
props: {show: true, spinnerSmall: true},

0 commit comments

Comments
 (0)