Project for a restaurant or bar to do the command control. Each item and order with their respective values are stored in memories to perform the necessary calculations and close the account.
These instructions will allow you to get a copy of the project running on your local machine for development and testing purposes..
Need to have installed node
^16.17 - node
It is recommended to use yarn to install packages, but you can use npm
yarn install
or
npm install
For a more secure execution of the system, it is important to raise the GraphQL currency conversion API on port 3000
. But has configuration mock server with mirage API, that's why sisytem won't break
For the automated unit tests run
yarn test:unit
or
npm run test:unit
Unit tests check the consistency of base components of the system (UI components). They also test useful functions that are shared at various points in the application
import { describe, it, expect } from "vitest";
import { mount } from "@vue/test-utils";
import AccordionUI from "../components-ui/AccordionUI.vue";
describe("AccordionUI", () => {
it("Should renders properly for title", () => {
const wrapper = mount(AccordionUI, { props: { title: "Bebidas" } });
expect(wrapper.text()).toContain("Bebidas");
});
it("Should renders properly for title", () => {
const wrapper = mount(AccordionUI, { props: { isOpen: true } });
expect(wrapper.find("#summary-details").exists()).toBe(true);
});
it("Should renders slot List", () => {
const wrapper = mount(AccordionUI, {
props: {
isOpen: true,
},
slots: {
list: "<div>List</div>",
},
});
expect(wrapper.html()).toContain("<div>List</div>");
});
});
import { describe, it, expect } from "vitest";
import { getFormattedHour, getFormattedDateWithHour } from "../formatDate";
describe("Format Date", () => {
it("Should formatted Hour", () => {
expect(getFormattedHour(new Date("2023-01-24T01:12:19.836Z"))).equals(
"21:12",
);
});
it("Should formatted Date with hour", () => {
expect(
getFormattedDateWithHour(new Date("2023-01-24T01:12:19.836Z")),
).equals("23/01/2023 21:12");
});
});
Storybooks are for recording the behavior of UI components. Important documentation for compressing components.
For the storybook run
yarn storybook
or
npm run storybook
Project will run on port http://locahost:8080
. To run the project locally
yarn dev
or
npm run dev
- Vue 3 - The Progressive JavaScript Framework
- Vite - Build Project
- TypeScript - Code Base
- Axios - Request API Rest
- MirageJS - Mocke server API
- Appolo Client - Request API GrapqhQL
- Codegen - Generate code from GraphQL schema
- Pinia - Store
- SASS - Style SCSS
- Storybook - DOCS components UI
- Vue Test Utils - Components Test Unit
- ESLint - Code analyzer
- Prettier - Prettier analyzer
- Husky - Conventional commits prepare
Used in the Semantic Versioning project and Conventional Commits
- Dev - Frontend Developer - Rebeca Lopes