Full-Stack Web Development with Vue.js and Node

(singke) #1
Testing an MEVN Application Chapter 9


  1. Check that the sidebar consists of the Home and Contact page links

  2. Click on the Contact page

  3. The contact page should contain the text this is contact

  4. Click on the login page to make sure that the login works fine

  5. Add a movie to our application

  6. Rate the movie

  7. Finally, add the ability for users to log out of the application


These are the important parts of our application. So, we will need to add an identifier to all
of preceding components. The best practice for adding an identifier to the elements is to


define a class or an id while building the application itself. However, we will assign an


identifier to the now.


In App.vue, update the highlighted parts with the following code:


<template>
<v-app id="inspire">
<v-navigation-drawer
fixed
v-model="drawer"
app
>
<v-list dense>
<router-link v-bind:to="{ name: 'Home' }" class="side_bar_link">
<v-list-tile>
<v-list-tile-action>
<v-icon>home</v-icon>
</v-list-tile-action>
<v-list-tile-content id="home">Home</v-list-tile-content>
</v-list-tile>
</router-link>
<router-link v-bind:to="{ name: 'Contact' }" class="side_bar_link">
<v-list-tile>
<v-list-tile-action>
<v-icon>contact_mail</v-icon>
</v-list-tile-action>
<v-list-tile-content id="contact">Contact</v-list-tile-content>
</v-list-tile>
</router-link>
</v-list>
</v-navigation-drawer>
<v-toolbar color="indigo" dark fixed app>
<v-toolbar-side-icon id="drawer" @click.stop="drawer = !drawer"></v-
toolbar-side-icon>
Free download pdf