Deleting unused component

This commit is contained in:
Michaela Brydon 2025-08-05 14:20:51 -04:00
parent f63f9863c5
commit 4d54e16ad3
2 changed files with 0 additions and 80 deletions

View file

@ -1,30 +0,0 @@
import { shallowMount } from '@vue/test-utils';
import navButton from '@/iss-components/nav-button/nav-button.vue';
describe('NavButton', () => {
it('should display input when type is button', () => {
const wrapper = shallowMount(navButton, {
propsData: {
text: 'Hello',
scenario: 'test',
type: 'button'
}
});
expect(wrapper.find('input').exists()).toBe(true);
expect(wrapper.find('p').exists()).toBe(false);
});
it('should display p element when type is text', () => {
const wrapper = shallowMount(navButton, {
propsData: {
text: 'Hello',
scenario: 'test',
type: 'text'
}
});
expect(wrapper.find('input').exists()).toBe(false);
expect(wrapper.find('p').exists()).toBe(true);
});
});

View file

@ -1,50 +0,0 @@
<template>
<input
v-if="type == 'button'"
type="button"
class="nav-button"
:value="text"
@click="navTo" />
<p
v-else
type=""
class="nav-text"
@click="navTo">
{{ text }}
</p>
</template>
<script>
export default ({
name: 'nav-button',
props: {
text: String,
scenario: String,
type: String
},
methods: {
navTo() {
this.$router.navigate(this.scenario, this.$route);
}
}
});
</script>
<style lang="scss" scoped>
.nav-button {
background-color: lightgray;
padding: 2.5px;
border-radius: 5px;
min-width: 70px;
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
font-size: 14px;
}
.nav-text {
color: blue;
cursor: pointer;
text-decoration: underline;
}
</style>