Skip to content

ElenaMLopez/User-login-example

Repository files navigation

BASIC LOGIN

This project was bootstrapped with the Vue-cli tool with these presets:

vue-cli-presets3

Project setup

npm install

Compiles and hot-reloads for development

To run the server with hot-reload just open a terminal and type:

npm run serve

Then you can visit http://localhost:8080/ and see the result.

Compiles and minifies for production

npm run build

Run your unit tests

npm run test:unit

Run your end-to-end tests

This kind of test needs Google Chrome installed to run.

npm run test:e2e

Lints and fixes files

npm run lint

Customize configuration

See Configuration Reference.

Fake API

We can find a mocked API to use in our APP at ./public/API/user.json.

There is actually just two users in to make the login at the APP.

User Happy path

npm run serve

You can make a login with two users:

User Email: [email protected]
Password: 123

Or with

User Email: [email protected]
Password: 456

When you arrive to the Home page, open the dev tools and go to the Application section. Visit the Local Storage and check the karumi_user_token.

After make a Logout pressing the Logout button, this token must disappear.

Notes

1 - In order to make the CI faster, actually we make the build only for node 10.x. If you want to change this, go to the main.yml file, delete the line node-version: [10.x] and uncomment the line below

strategy:
  matrix:
    node-version: [10.x]
    # node-version: [10.x, 12.x, 14.x] to make the buil in other NodeJs versions