started nav-button
This commit is contained in:
parent
243cc0406f
commit
200b4bb141
5 changed files with 61 additions and 5 deletions
29
src/common-components/nav-button/nav-button.vue
Normal file
29
src/common-components/nav-button/nav-button.vue
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
<template>
|
||||||
|
<input type="button" class="nav-button" v-bind:value="text"/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export default({
|
||||||
|
name: "nav-button",
|
||||||
|
props: {
|
||||||
|
text: String,
|
||||||
|
scenario: String,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
navTo(){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.nav-button {
|
||||||
|
background-color: lightgray;
|
||||||
|
padding: 2.5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
min-width: 70px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
22
src/global-methods.spec.js
Normal file
22
src/global-methods.spec.js
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import axios from 'axios';
|
||||||
|
import './global-methods.js';
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
jest.mock('axios');
|
||||||
|
|
||||||
|
test('should fetch users', () => {
|
||||||
|
const users = [{name: 'Bob'}];
|
||||||
|
const resp = {data: users};
|
||||||
|
axios.get.mockResolvedValue(resp);
|
||||||
|
|
||||||
|
// or you could use the following depending on your use case:
|
||||||
|
// axios.get.mockImplementation(() => Promise.resolve(resp))
|
||||||
|
|
||||||
|
return Users.all().then(data => expect(data).toEqual(users));
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
test('adds 1 + 2 to equal 3', () => {
|
||||||
|
expect(1 + 2).toBe(3);
|
||||||
|
});
|
||||||
|
|
@ -1,11 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<p>Welcome Page Placeholder</p>
|
<p>Welcome Page Placeholder</p>
|
||||||
|
<br />
|
||||||
|
<NavButton text="Next"></NavButton>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import NavButton from "../../common-components/nav-button/nav-button.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'welcome-page'
|
name: "welcome-page",
|
||||||
}
|
components: { NavButton }
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const routes = [
|
||||||
|
|
||||||
if(issPage === undefined)
|
if(issPage === undefined)
|
||||||
{
|
{
|
||||||
issPage = issPageValues.issPageValues["WELCOME_PAGE"];
|
issPage = issPageValues.issPageValues.WELCOME_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (router.hasRoute(issPage)) {
|
if (router.hasRoute(issPage)) {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import { navigationScenarios } from "@/router/router-constants/navigation-scenar
|
||||||
const routingTable = function(store) {
|
const routingTable = function(store) {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
issPageValue: issPageValues.VEHICLE_MAKE,
|
issPageValue: issPageValues.VEHICLE_YEAR,
|
||||||
maps: [
|
maps: [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_BACK,
|
scenario: navigationScenarios.CLICKED_BACK,
|
||||||
|
|
@ -18,7 +18,7 @@ const routingTable = function(store) {
|
||||||
maps: [
|
maps: [
|
||||||
{
|
{
|
||||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||||
issPageValue: "VEHICLE_MAKE"
|
issPageValue: "VEHICLE_YEAR"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue