Skip to content
Snippets Groups Projects
Commit 7642b4ce authored by Yasin Ali Marouga's avatar Yasin Ali Marouga
Browse files

Merge branch 'dev' into chrore/maketest

merge
parents 02c85be3 1048fd4b
No related branches found
No related tags found
2 merge requests!68merge dev into main,!63chore: implement make test
Pipeline #285036 passed with stages
in 7 minutes and 50 seconds
# idatt2106_2024_02_frontend
<p align="center">
<a href="https://gitlab.stud.idi.ntnu.no/idatt2106-gruppe-2/idatt2106_2024_02_backend" target="_blank">
<img width="50%" src="https://media.discordapp.net/attachments/1229758481150640209/1235586776824021103/avatar1.png?ex=6635921b&is=6634409b&hm=8818fe5e10a69e6df7b9da102e5fb65dcdbd962b2614d392be2578d6542822c4&=&format=webp&quality=lossless&width=1135&height=1137">
</a>
</p>
<h1 align="center">
Sparesti frontend
</h1>
This template should help get you started developing with Vue 3 in Vite.
## Recommended IDE Setup
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
## 🚀Getting started
## Type Support for `.vue` Imports in TS
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
### Requirements
## Customize configuration
To run the application you need the following installed:
See [Vite Configuration Reference](https://vitejs.dev/config/).
- Vue
- Make
- Docker
- Git
## Project Setup
### ⚙️Setup
```sh
npm install
```
### Compile and Hot-Reload for Development
#### The application can be run with one command in the following [Joint-Repository](https://gitlab.stud.idi.ntnu.no/idatt2106-gruppe-2/idatt2106_2024_02)
```sh
npm run dev
```
#### If you want to run the frontend independently, follow these instructions:
### Type-Check, Compile and Minify for Production
1. Clone the repository
```sh
npm run build
```
git clone https://gitlab.stud.idi.ntnu.no/idatt2106-gruppe-2/idatt2106_2024_02_frontend.git
```
### Run Unit Tests with [Vitest](https://vitest.dev/)
```sh
npm run test:unit
2. Navigate to project root folder
```
cd idatt2106_2024_02_frontend
```
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
### 🚗Running the application
```sh
npm run test:e2e:dev
1. Run the application (NOTE: make sure Docker is running)
```
make run
```
This runs the end-to-end tests against the Vite development server.
It is much faster than the production build.
The application is now running on localhost
But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):
NOTE: if you don't have make installed, use the following command instead:
```sh
npm run build
npm run test:e2e
```
docker compose up
```
##### Exiting the application
To exit the application, use CTRL + C.
### Lint with [ESLint](https://eslint.org/)
### 🧪 Test data
The database is populated with a pre-configured user at runtime which
can be used to experiment with the application. You can log in with the following credentials:
- Username: ```username```
- Password: ```Test123!```
```sh
npm run lint
### 📋 Running tests
You can run unit and integration tests with:
```
make test
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment