Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbbcffaf64 | ||
|
|
51d8a84202 | ||
| 66998fbcba | |||
| 55e1019daf | |||
| b7f1e71cbb | |||
| b5ceae6c00 | |||
| 065ff6f3ff | |||
| 2a1cf5ae8f | |||
| 73b7786d1a | |||
| 2d83491839 | |||
| 3290917b1c | |||
| 663569e9dd | |||
| 83c1269d25 | |||
| d826e758ff | |||
| 5ef8c424fd | |||
| 5d34725344 | |||
| de853c4a96 | |||
| 19262ceffe | |||
| 51c57cb80c | |||
| 64c42e15de | |||
| ad369d0bc4 | |||
| 5ae24298ae | |||
| 12d10c427b | |||
| cb94b76726 | |||
| 6ce69867ef | |||
| 7893b25910 | |||
| 397470bc70 | |||
| 872a8b6023 | |||
| f39a9a44a7 | |||
| d51e8d3f0d | |||
| 103a49daef | |||
| bb09df70f5 | |||
| a9eb304a5c | |||
| ae7f8dd77e | |||
| 55220b6cca | |||
| ccc1ec0d0d | |||
| a62d07e97e | |||
| d2b7c4d93c | |||
| d0064d555c | |||
| 0e0842a604 | |||
| a027285357 | |||
| 4b1ac294bd | |||
| 59c085f4d5 | |||
| 69e0f90c5a | |||
| dc3a764aa2 | |||
| b82b9db99a | |||
| 973fabafa3 | |||
| 71bf192289 | |||
| 36bf9b477d |
3
.browserslistrc
Normal file
3
.browserslistrc
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
> 1%
|
||||||
|
last 2 versions
|
||||||
|
not dead
|
||||||
7
.editorconfig
Normal file
7
.editorconfig
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
[*.{js,jsx,ts,tsx,vue}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
max_line_length = 100
|
||||||
22
.eslintrc.js
Normal file
22
.eslintrc.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
env: {
|
||||||
|
node: true
|
||||||
|
},
|
||||||
|
extends: ["plugin:vue/essential", "plugin:prettier/recommended", "eslint:recommended"],
|
||||||
|
parserOptions: {
|
||||||
|
parser: "babel-eslint"
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
|
||||||
|
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off"
|
||||||
|
},
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"],
|
||||||
|
env: {
|
||||||
|
jest: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
26
.gitignore
vendored
Normal file
26
.gitignore
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
/dist
|
||||||
|
|
||||||
|
/tests/e2e/videos/
|
||||||
|
/tests/e2e/screenshots/
|
||||||
|
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Log files
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.idea
|
||||||
|
.vscode
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
34
INSTALL.md
Normal file
34
INSTALL.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# fruit-project
|
||||||
|
|
||||||
|
## Project setup
|
||||||
|
```
|
||||||
|
yarn install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and hot-reloads for development
|
||||||
|
```
|
||||||
|
yarn serve
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compiles and minifies for production
|
||||||
|
```
|
||||||
|
yarn build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run your unit tests
|
||||||
|
```
|
||||||
|
yarn test:unit
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run your end-to-end tests
|
||||||
|
```
|
||||||
|
yarn test:e2e
|
||||||
|
```
|
||||||
|
|
||||||
|
### Lints and fixes files
|
||||||
|
```
|
||||||
|
yarn lint
|
||||||
|
```
|
||||||
|
|
||||||
|
### Customize configuration
|
||||||
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
50
README.md
50
README.md
@@ -1,3 +1,4 @@
|
|||||||
|
[](https://app.netlify.com/sites/elated-raman-ffa420/deploys)
|
||||||
# fruit-project
|
# fruit-project
|
||||||
A test project for Cycloid.io
|
A test project for Cycloid.io
|
||||||
|
|
||||||
@@ -10,26 +11,57 @@ You've been given the task of creating a simple application with create/read/del
|
|||||||
## Task
|
## Task
|
||||||
|
|
||||||
- [x] Create a private repository on Github.
|
- [x] Create a private repository on Github.
|
||||||
- [ ] Create a new Vue project using Vue-CLI within the new repository: you may use any preprocessors, testing frameworks, linting etc that you like.
|
- [x] Create a new Vue project using Vue-CLI within the new repository: you may use any preprocessors, testing frameworks, linting etc that you like.
|
||||||
- [ ] Create a branch off of master, commit all your work to this new branch.
|
- [x] Create a branch off of master, commit all your work to this new branch.
|
||||||
- [ ] When you are finished, open a PR to master (but do not merge it). In the PR description, copy, paste and answer the following:
|
- [x] When you are finished, open a PR to master (but do not merge it). In the PR description, copy, paste and answer the following:
|
||||||
|
|
||||||
|
---
|
||||||
|
## Feedbacks
|
||||||
|
|
||||||
```
|
|
||||||
### Your name
|
### Your name
|
||||||
|
Noé Viricel
|
||||||
|
|
||||||
### What was challenging?
|
### What was challenging?
|
||||||
|
- Cypress.io, as I never used it before, I started to learn the basis from their documentation. It looks very interesting in a product quality point of view, I never had the occasion to go that far in a product development process.
|
||||||
|
- A bit tricky at first to choose which API data to keep.
|
||||||
|
|
||||||
### What did you enjoy doing?
|
### What did you enjoy doing?
|
||||||
|
I appreciated the opportunity to imagine an app from a raw array of data. With no graphical support of any kind. It gave me the opportunity to truly showcase my creativity and skills on different subject.
|
||||||
|
I have taken the time to confirm knowledge and go further into testing data store (Vuex).
|
||||||
|
|
||||||
|
*_**Spoiler:** I admit that I tried to stick to your graphic environement_*
|
||||||
|
|
||||||
### If you had more time, what would you improve/do differently?
|
### If you had more time, what would you improve/do differently?
|
||||||
|
- Improve "Component's dynamic imports" browser support by using Async components, it would offer more control over Component's loading / error states.
|
||||||
|
- Use CSS Framework (I'm fond of AntDesign and Tailwind CSS)
|
||||||
|
- CSS Module as the app will grow, offering styles more modularity.
|
||||||
|
- Vue.js Composition API on a larger app.
|
||||||
|
- Form and Props validation.
|
||||||
|
- Page Transitions
|
||||||
|
- Better loading state management
|
||||||
|
- Setup .env file for environnement isolation (dev / test / prod).
|
||||||
|
- Work on CSS Accessibility
|
||||||
|
- Caching & Lazy Loading
|
||||||
|
- Inject axios globally (as $http)
|
||||||
|
- Notification System (Errors, Infos, Warning, Success)
|
||||||
|
- More unit test
|
||||||
|
- Definitely more End-to-End test :)
|
||||||
|
- and probably more ...
|
||||||
|
|
||||||
|
|
||||||
### How much time (more or less) it took you to complete the task?
|
### How much time (more or less) it took you to complete the task?
|
||||||
|
I've made this app in 5 days of code, more or less 25 hours ... (I did count commits timestamps :weary:)
|
||||||
|
|
||||||
### What do you think about the task itself? (Was it a good experience? If not why?)
|
|
||||||
|
### What do you think about the task itself? (Was it a good experience? If not why?
|
||||||
|
I believe it's a good exercise with enough constraints to let you express yourself (in a coder's mind I mean).
|
||||||
|
I think that this task allows to approach each stage of a Frontent project conception.
|
||||||
|
|
||||||
|
*I rather be tested like that than with a bulk of logic tests (that I find arbitrary) as I am more in a situation to think and develop ideas.*
|
||||||
|
|
||||||
### Summary in a gif
|
### Summary in a gif
|
||||||
```
|
|
||||||
- [ ] Invite us to your repository: @chayaline, @emilyrosina, @adamwardecki, @dangzo, @thomas-lhuillier, @SavanovicN & @Sergeon
|
- [x] Invite us to your repository: @chayaline, @emilyrosina, @adamwardecki, @dangzo, @thomas-lhuillier, @SavanovicN & @Sergeon
|
||||||
|
|
||||||
## The specification
|
## The specification
|
||||||
|
|
||||||
@@ -57,8 +89,8 @@ The API is using the ESM module loader so please make sure that you have at leas
|
|||||||
```
|
```
|
||||||
npm i fruit-api
|
npm i fruit-api
|
||||||
```
|
```
|
||||||
- [ ] Add `"api": "fruit-api"` to the scripts section of your package.json file.
|
- [x] Add `"api": "fruit-api"` to the scripts section of your package.json file.
|
||||||
- [ ] Run `npm run api` to serve the fruit-api you can view the API documentation at https://localhost:3000 (or another port number, if 3000 is already in use).
|
- [x] Run `npm run api` to serve the fruit-api you can view the API documentation at https://localhost:3000 (or another port number, if 3000 is already in use).
|
||||||
|
|
||||||
**Recommended documentation**
|
**Recommended documentation**
|
||||||
| Scaffolding | State Management | Routing |
|
| Scaffolding | State Management | Routing |
|
||||||
|
|||||||
3
babel.config.js
Normal file
3
babel.config.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
presets: ["@vue/cli-plugin-babel/preset"]
|
||||||
|
};
|
||||||
87
coverage/clover.xml
Normal file
87
coverage/clover.xml
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<coverage generated="1607446990049" clover="3.2.0">
|
||||||
|
<project timestamp="1607446990050" name="All files">
|
||||||
|
<metrics statements="39" coveredstatements="12" conditionals="4" coveredconditionals="0" methods="26" coveredmethods="6" elements="69" coveredelements="18" complexity="0" loc="39" ncloc="39" packages="4" files="10" classes="10"/>
|
||||||
|
<package name="components">
|
||||||
|
<metrics statements="9" coveredstatements="9" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="5"/>
|
||||||
|
<file name="AddFruit.vue" path="/Users/viricel/Sites/fruit-project/src/components/AddFruit.vue">
|
||||||
|
<metrics statements="8" coveredstatements="8" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="5"/>
|
||||||
|
<line num="90" count="1" type="stmt"/>
|
||||||
|
<line num="96" count="5" type="stmt"/>
|
||||||
|
<line num="104" count="5" type="stmt"/>
|
||||||
|
<line num="105" count="5" type="stmt"/>
|
||||||
|
<line num="108" count="1" type="stmt"/>
|
||||||
|
<line num="112" count="1" type="stmt"/>
|
||||||
|
<line num="113" count="2" type="stmt"/>
|
||||||
|
<line num="116" count="1" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
<file name="Header.vue" path="/Users/viricel/Sites/fruit-project/src/components/Header.vue">
|
||||||
|
<metrics statements="1" coveredstatements="1" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
||||||
|
<line num="28" count="1" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
</package>
|
||||||
|
<package name="components.Form.ImageUnsplash">
|
||||||
|
<metrics statements="11" coveredstatements="1" conditionals="2" coveredconditionals="0" methods="5" coveredmethods="0"/>
|
||||||
|
<file name="ImageSkeleton.vue" path="/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageSkeleton.vue">
|
||||||
|
<metrics statements="1" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
||||||
|
<line num="13" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
<file name="ImageUnsplash.vue" path="/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageUnsplash.vue">
|
||||||
|
<metrics statements="10" coveredstatements="1" conditionals="2" coveredconditionals="0" methods="5" coveredmethods="0"/>
|
||||||
|
<line num="32" count="1" type="stmt"/>
|
||||||
|
<line num="37" count="0" type="stmt"/>
|
||||||
|
<line num="58" count="0" type="stmt"/>
|
||||||
|
<line num="68" count="0" type="stmt"/>
|
||||||
|
<line num="69" count="0" type="cond" truecount="0" falsecount="2"/>
|
||||||
|
<line num="70" count="0" type="stmt"/>
|
||||||
|
<line num="73" count="0" type="stmt"/>
|
||||||
|
<line num="74" count="0" type="stmt"/>
|
||||||
|
<line num="75" count="0" type="stmt"/>
|
||||||
|
<line num="77" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
</package>
|
||||||
|
<package name="components.Grid">
|
||||||
|
<metrics statements="10" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="8" coveredmethods="1"/>
|
||||||
|
<file name="DeleteItem.vue" path="/Users/viricel/Sites/fruit-project/src/components/Grid/DeleteItem.vue">
|
||||||
|
<metrics statements="3" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="5" coveredmethods="0"/>
|
||||||
|
<line num="27" count="0" type="stmt"/>
|
||||||
|
<line num="33" count="0" type="stmt"/>
|
||||||
|
<line num="36" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
<file name="Grid.vue" path="/Users/viricel/Sites/fruit-project/src/components/Grid/Grid.vue">
|
||||||
|
<metrics statements="3" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="1" coveredmethods="0"/>
|
||||||
|
<line num="16" count="0" type="stmt"/>
|
||||||
|
<line num="17" count="0" type="stmt"/>
|
||||||
|
<line num="23" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
<file name="GridItem.vue" path="/Users/viricel/Sites/fruit-project/src/components/Grid/GridItem.vue">
|
||||||
|
<metrics statements="3" coveredstatements="2" conditionals="0" coveredconditionals="0" methods="2" coveredmethods="1"/>
|
||||||
|
<line num="23" count="1" type="stmt"/>
|
||||||
|
<line num="27" count="0" type="stmt"/>
|
||||||
|
<line num="36" count="2" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
<file name="GridItemSkeleton.vue" path="/Users/viricel/Sites/fruit-project/src/components/Grid/GridItemSkeleton.vue">
|
||||||
|
<metrics statements="1" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="0" coveredmethods="0"/>
|
||||||
|
<line num="16" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
</package>
|
||||||
|
<package name="views">
|
||||||
|
<metrics statements="9" coveredstatements="0" conditionals="2" coveredconditionals="0" methods="8" coveredmethods="0"/>
|
||||||
|
<file name="Fruit.vue" path="/Users/viricel/Sites/fruit-project/src/views/Fruit.vue">
|
||||||
|
<metrics statements="5" coveredstatements="0" conditionals="2" coveredconditionals="0" methods="4" coveredmethods="0"/>
|
||||||
|
<line num="28" count="0" type="stmt"/>
|
||||||
|
<line num="32" count="0" type="stmt"/>
|
||||||
|
<line num="34" count="0" type="stmt"/>
|
||||||
|
<line num="40" count="0" type="stmt"/>
|
||||||
|
<line num="46" count="0" type="cond" truecount="0" falsecount="2"/>
|
||||||
|
</file>
|
||||||
|
<file name="Fruits.vue" path="/Users/viricel/Sites/fruit-project/src/views/Fruits.vue">
|
||||||
|
<metrics statements="4" coveredstatements="0" conditionals="0" coveredconditionals="0" methods="4" coveredmethods="0"/>
|
||||||
|
<line num="13" count="0" type="stmt"/>
|
||||||
|
<line num="17" count="0" type="stmt"/>
|
||||||
|
<line num="22" count="0" type="stmt"/>
|
||||||
|
<line num="27" count="0" type="stmt"/>
|
||||||
|
</file>
|
||||||
|
</package>
|
||||||
|
</project>
|
||||||
|
</coverage>
|
||||||
11
coverage/coverage-final.json
Normal file
11
coverage/coverage-final.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{"/Users/viricel/Sites/fruit-project/src/components/AddFruit.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/AddFruit.vue","statementMap":{"0":{"start":{"line":90,"column":0},"end":{"line":90,"column":null}},"1":{"start":{"line":96,"column":0},"end":{"line":96,"column":null}},"2":{"start":{"line":104,"column":0},"end":{"line":104,"column":null}},"3":{"start":{"line":105,"column":0},"end":{"line":105,"column":null}},"4":{"start":{"line":108,"column":0},"end":{"line":108,"column":null}},"5":{"start":{"line":112,"column":0},"end":{"line":112,"column":null}},"6":{"start":{"line":113,"column":0},"end":{"line":113,"column":null}},"7":{"start":{"line":116,"column":0},"end":{"line":116,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":95,"column":0},"end":{"line":95,"column":null}},"loc":{"start":{"line":95,"column":0},"end":{"line":102,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":103,"column":0},"end":{"line":103,"column":null}},"loc":{"start":{"line":103,"column":0},"end":{"line":106,"column":null}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":107,"column":0},"end":{"line":107,"column":null}},"loc":{"start":{"line":107,"column":0},"end":{"line":109,"column":null}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":111,"column":0},"end":{"line":111,"column":null}},"loc":{"start":{"line":111,"column":0},"end":{"line":117,"column":null}}},"4":{"name":"(anonymous_5)","decl":{"start":{"line":113,"column":0},"end":{"line":113,"column":null}},"loc":{"start":{"line":113,"column":0},"end":{"line":113,"column":null}}}},"branchMap":{},"s":{"0":1,"1":5,"2":5,"3":5,"4":1,"5":1,"6":2,"7":1},"f":{"0":5,"1":5,"2":1,"3":1,"4":1},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Header.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Header.vue","statementMap":{"0":{"start":{"line":28,"column":0},"end":{"line":28,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":1},"f":{},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageSkeleton.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageSkeleton.vue","statementMap":{"0":{"start":{"line":13,"column":0},"end":{"line":13,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":0},"f":{},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageUnsplash.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageUnsplash.vue","statementMap":{"0":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"1":{"start":{"line":37,"column":0},"end":{"line":37,"column":null}},"2":{"start":{"line":58,"column":0},"end":{"line":58,"column":null}},"3":{"start":{"line":68,"column":0},"end":{"line":68,"column":null}},"4":{"start":{"line":69,"column":0},"end":{"line":77,"column":null}},"5":{"start":{"line":70,"column":0},"end":{"line":75,"column":null}},"6":{"start":{"line":73,"column":0},"end":{"line":73,"column":null}},"7":{"start":{"line":74,"column":0},"end":{"line":74,"column":null}},"8":{"start":{"line":75,"column":0},"end":{"line":75,"column":null}},"9":{"start":{"line":77,"column":0},"end":{"line":77,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":37,"column":0},"end":{"line":37,"column":null}},"loc":{"start":{"line":37,"column":0},"end":{"line":37,"column":null}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":57,"column":0},"end":{"line":57,"column":null}},"loc":{"start":{"line":57,"column":0},"end":{"line":62,"column":null}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":67,"column":0},"end":{"line":67,"column":null}},"loc":{"start":{"line":67,"column":0},"end":{"line":78,"column":null}}},"3":{"name":"(anonymous_5)","decl":{"start":{"line":70,"column":0},"end":{"line":70,"column":null}},"loc":{"start":{"line":70,"column":0},"end":{"line":75,"column":null}}},"4":{"name":"(anonymous_6)","decl":{"start":{"line":75,"column":0},"end":{"line":75,"column":null}},"loc":{"start":{"line":75,"column":0},"end":{"line":75,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":69,"column":0},"end":{"line":77,"column":null}},"type":"if","locations":[{"start":{"line":69,"column":0},"end":{"line":77,"column":null}},{"start":{"line":69,"column":0},"end":{"line":77,"column":null}}]}},"s":{"0":1,"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{"0":[0,0]}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Grid/DeleteItem.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Grid/DeleteItem.vue","statementMap":{"0":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}},"1":{"start":{"line":33,"column":0},"end":{"line":33,"column":null}},"2":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}},"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}}},"1":{"name":"(anonymous_2)","decl":{"start":{"line":26,"column":0},"end":{"line":26,"column":null}},"loc":{"start":{"line":26,"column":0},"end":{"line":30,"column":null}}},"2":{"name":"(anonymous_3)","decl":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"loc":{"start":{"line":32,"column":0},"end":{"line":34,"column":null}}},"3":{"name":"(anonymous_4)","decl":{"start":{"line":35,"column":0},"end":{"line":35,"column":null}},"loc":{"start":{"line":35,"column":0},"end":{"line":37,"column":null}}},"4":{"name":"(anonymous_5)","decl":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}},"loc":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}}}},"branchMap":{},"s":{"0":0,"1":0,"2":0},"f":{"0":0,"1":0,"2":0,"3":0,"4":0},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Grid/Grid.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Grid/Grid.vue","statementMap":{"0":{"start":{"line":16,"column":0},"end":{"line":16,"column":null}},"1":{"start":{"line":17,"column":0},"end":{"line":17,"column":null}},"2":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}},"loc":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}}}},"branchMap":{},"s":{"0":0,"1":0,"2":0},"f":{"0":0},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Grid/GridItem.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Grid/GridItem.vue","statementMap":{"0":{"start":{"line":23,"column":0},"end":{"line":23,"column":null}},"1":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}},"2":{"start":{"line":36,"column":0},"end":{"line":36,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}},"loc":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":35,"column":0},"end":{"line":35,"column":null}},"loc":{"start":{"line":35,"column":0},"end":{"line":37,"column":null}}}},"branchMap":{},"s":{"0":1,"1":0,"2":2},"f":{"0":0,"1":2},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/components/Grid/GridItemSkeleton.vue": {"path":"/Users/viricel/Sites/fruit-project/src/components/Grid/GridItemSkeleton.vue","statementMap":{"0":{"start":{"line":16,"column":0},"end":{"line":16,"column":null}}},"fnMap":{},"branchMap":{},"s":{"0":0},"f":{},"b":{}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/views/Fruit.vue": {"path":"/Users/viricel/Sites/fruit-project/src/views/Fruit.vue","statementMap":{"0":{"start":{"line":28,"column":0},"end":{"line":28,"column":null}},"1":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"2":{"start":{"line":34,"column":0},"end":{"line":34,"column":null}},"3":{"start":{"line":40,"column":0},"end":{"line":40,"column":null}},"4":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}},"loc":{"start":{"line":32,"column":0},"end":{"line":32,"column":null}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":33,"column":0},"end":{"line":33,"column":null}},"loc":{"start":{"line":33,"column":0},"end":{"line":37,"column":null}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":39,"column":0},"end":{"line":39,"column":null}},"loc":{"start":{"line":39,"column":0},"end":{"line":41,"column":null}}},"3":{"name":"(anonymous_5)","decl":{"start":{"line":45,"column":0},"end":{"line":45,"column":null}},"loc":{"start":{"line":45,"column":0},"end":{"line":47,"column":null}}}},"branchMap":{"0":{"loc":{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},"type":"cond-expr","locations":[{"start":{"line":46,"column":0},"end":{"line":46,"column":null}},{"start":{"line":46,"column":0},"end":{"line":46,"column":null}}]}},"s":{"0":0,"1":0,"2":0,"3":0,"4":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{"0":[0,0]}}
|
||||||
|
,"/Users/viricel/Sites/fruit-project/src/views/Fruits.vue": {"path":"/Users/viricel/Sites/fruit-project/src/views/Fruits.vue","statementMap":{"0":{"start":{"line":13,"column":0},"end":{"line":13,"column":null}},"1":{"start":{"line":17,"column":0},"end":{"line":17,"column":null}},"2":{"start":{"line":22,"column":0},"end":{"line":22,"column":null}},"3":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}}},"fnMap":{"0":{"name":"(anonymous_1)","decl":{"start":{"line":17,"column":0},"end":{"line":17,"column":null}},"loc":{"start":{"line":17,"column":0},"end":{"line":17,"column":null}}},"1":{"name":"(anonymous_3)","decl":{"start":{"line":21,"column":0},"end":{"line":21,"column":null}},"loc":{"start":{"line":21,"column":0},"end":{"line":25,"column":null}}},"2":{"name":"(anonymous_4)","decl":{"start":{"line":26,"column":0},"end":{"line":26,"column":null}},"loc":{"start":{"line":26,"column":0},"end":{"line":28,"column":null}}},"3":{"name":"(anonymous_5)","decl":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}},"loc":{"start":{"line":27,"column":0},"end":{"line":27,"column":null}}}},"branchMap":{},"s":{"0":0,"1":0,"2":0,"3":0},"f":{"0":0,"1":0,"2":0,"3":0},"b":{}}
|
||||||
|
}
|
||||||
139
coverage/lcov-report/Fruits.vue.html
Normal file
139
coverage/lcov-report/Fruits.vue.html
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for Fruits.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="prettify.css" />
|
||||||
|
<link rel="stylesheet" href="base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="index.html">All files</a> Fruits.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>2/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>1/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>2/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line high'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div>
|
||||||
|
<h1>Fruits Directory</h1>
|
||||||
|
{{ this.fruits }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Fruits",
|
||||||
|
computed: {
|
||||||
|
...mapState(["fruits"])
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.$store.dispatch("getFruits");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Fri Dec 04 2020 02:26:33 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="sorter.js"></script>
|
||||||
|
<script src="block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
224
coverage/lcov-report/base.css
Normal file
224
coverage/lcov-report/base.css
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
body, html {
|
||||||
|
margin:0; padding: 0;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
font-family: Helvetica Neue, Helvetica, Arial;
|
||||||
|
font-size: 14px;
|
||||||
|
color:#333;
|
||||||
|
}
|
||||||
|
.small { font-size: 12px; }
|
||||||
|
*, *:after, *:before {
|
||||||
|
-webkit-box-sizing:border-box;
|
||||||
|
-moz-box-sizing:border-box;
|
||||||
|
box-sizing:border-box;
|
||||||
|
}
|
||||||
|
h1 { font-size: 20px; margin: 0;}
|
||||||
|
h2 { font-size: 14px; }
|
||||||
|
pre {
|
||||||
|
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
-moz-tab-size: 2;
|
||||||
|
-o-tab-size: 2;
|
||||||
|
tab-size: 2;
|
||||||
|
}
|
||||||
|
a { color:#0074D9; text-decoration:none; }
|
||||||
|
a:hover { text-decoration:underline; }
|
||||||
|
.strong { font-weight: bold; }
|
||||||
|
.space-top1 { padding: 10px 0 0 0; }
|
||||||
|
.pad2y { padding: 20px 0; }
|
||||||
|
.pad1y { padding: 10px 0; }
|
||||||
|
.pad2x { padding: 0 20px; }
|
||||||
|
.pad2 { padding: 20px; }
|
||||||
|
.pad1 { padding: 10px; }
|
||||||
|
.space-left2 { padding-left:55px; }
|
||||||
|
.space-right2 { padding-right:20px; }
|
||||||
|
.center { text-align:center; }
|
||||||
|
.clearfix { display:block; }
|
||||||
|
.clearfix:after {
|
||||||
|
content:'';
|
||||||
|
display:block;
|
||||||
|
height:0;
|
||||||
|
clear:both;
|
||||||
|
visibility:hidden;
|
||||||
|
}
|
||||||
|
.fl { float: left; }
|
||||||
|
@media only screen and (max-width:640px) {
|
||||||
|
.col3 { width:100%; max-width:100%; }
|
||||||
|
.hide-mobile { display:none!important; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.quiet {
|
||||||
|
color: #7f7f7f;
|
||||||
|
color: rgba(0,0,0,0.5);
|
||||||
|
}
|
||||||
|
.quiet a { opacity: 0.7; }
|
||||||
|
|
||||||
|
.fraction {
|
||||||
|
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
||||||
|
font-size: 10px;
|
||||||
|
color: #555;
|
||||||
|
background: #E8E8E8;
|
||||||
|
padding: 4px 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.path a:link, div.path a:visited { color: #333; }
|
||||||
|
table.coverage {
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 10px 0 0 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.coverage td {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
table.coverage td.line-count {
|
||||||
|
text-align: right;
|
||||||
|
padding: 0 5px 0 20px;
|
||||||
|
}
|
||||||
|
table.coverage td.line-coverage {
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 10px;
|
||||||
|
min-width:20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
table.coverage td span.cline-any {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0 5px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.missing-if-branch {
|
||||||
|
display: inline-block;
|
||||||
|
margin-right: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: #333;
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
.skip-if-branch {
|
||||||
|
display: none;
|
||||||
|
margin-right: 10px;
|
||||||
|
position: relative;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: #ccc;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.missing-if-branch .typ, .skip-if-branch .typ {
|
||||||
|
color: inherit !important;
|
||||||
|
}
|
||||||
|
.coverage-summary {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
||||||
|
.keyline-all { border: 1px solid #ddd; }
|
||||||
|
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
||||||
|
.coverage-summary tbody { border: 1px solid #bbb; }
|
||||||
|
.coverage-summary td { border-right: 1px solid #bbb; }
|
||||||
|
.coverage-summary td:last-child { border-right: none; }
|
||||||
|
.coverage-summary th {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: normal;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.coverage-summary th.file { border-right: none !important; }
|
||||||
|
.coverage-summary th.pct { }
|
||||||
|
.coverage-summary th.pic,
|
||||||
|
.coverage-summary th.abs,
|
||||||
|
.coverage-summary td.pct,
|
||||||
|
.coverage-summary td.abs { text-align: right; }
|
||||||
|
.coverage-summary td.file { white-space: nowrap; }
|
||||||
|
.coverage-summary td.pic { min-width: 120px !important; }
|
||||||
|
.coverage-summary tfoot td { }
|
||||||
|
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
height: 10px;
|
||||||
|
width: 7px;
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 0.5em;
|
||||||
|
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
||||||
|
}
|
||||||
|
.coverage-summary .sorted .sorter {
|
||||||
|
background-position: 0 -20px;
|
||||||
|
}
|
||||||
|
.coverage-summary .sorted-desc .sorter {
|
||||||
|
background-position: 0 -10px;
|
||||||
|
}
|
||||||
|
.status-line { height: 10px; }
|
||||||
|
/* yellow */
|
||||||
|
.cbranch-no { background: yellow !important; color: #111; }
|
||||||
|
/* dark red */
|
||||||
|
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
||||||
|
.low .chart { border:1px solid #C21F39 }
|
||||||
|
.highlighted,
|
||||||
|
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
||||||
|
background: #C21F39 !important;
|
||||||
|
}
|
||||||
|
/* medium red */
|
||||||
|
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
||||||
|
/* light red */
|
||||||
|
.low, .cline-no { background:#FCE1E5 }
|
||||||
|
/* light green */
|
||||||
|
.high, .cline-yes { background:rgb(230,245,208) }
|
||||||
|
/* medium green */
|
||||||
|
.cstat-yes { background:rgb(161,215,106) }
|
||||||
|
/* dark green */
|
||||||
|
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
||||||
|
.high .chart { border:1px solid rgb(77,146,33) }
|
||||||
|
/* dark yellow (gold) */
|
||||||
|
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
||||||
|
.medium .chart { border:1px solid #f9cd0b; }
|
||||||
|
/* light yellow */
|
||||||
|
.medium { background: #fff4c2; }
|
||||||
|
|
||||||
|
.cstat-skip { background: #ddd; color: #111; }
|
||||||
|
.fstat-skip { background: #ddd; color: #111 !important; }
|
||||||
|
.cbranch-skip { background: #ddd !important; color: #111; }
|
||||||
|
|
||||||
|
span.cline-neutral { background: #eaeaea; }
|
||||||
|
|
||||||
|
.coverage-summary td.empty {
|
||||||
|
opacity: .5;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
line-height: 1;
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cover-fill, .cover-empty {
|
||||||
|
display:inline-block;
|
||||||
|
height: 12px;
|
||||||
|
}
|
||||||
|
.chart {
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
.cover-empty {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.cover-full {
|
||||||
|
border-right: none !important;
|
||||||
|
}
|
||||||
|
pre.prettyprint {
|
||||||
|
border: none !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
|
.com { color: #999 !important; }
|
||||||
|
.ignore-none { color: #999; font-weight: normal; }
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
min-height: 100%;
|
||||||
|
height: auto !important;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0 auto -48px;
|
||||||
|
}
|
||||||
|
.footer, .push {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
79
coverage/lcov-report/block-navigation.js
Normal file
79
coverage/lcov-report/block-navigation.js
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
var jumpToCode = (function init() {
|
||||||
|
// Classes of code we would like to highlight in the file view
|
||||||
|
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
|
||||||
|
|
||||||
|
// Elements to highlight in the file listing view
|
||||||
|
var fileListingElements = ['td.pct.low'];
|
||||||
|
|
||||||
|
// We don't want to select elements that are direct descendants of another match
|
||||||
|
var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
|
||||||
|
|
||||||
|
// Selecter that finds elements on the page to which we can jump
|
||||||
|
var selector =
|
||||||
|
fileListingElements.join(', ') +
|
||||||
|
', ' +
|
||||||
|
notSelector +
|
||||||
|
missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
|
||||||
|
|
||||||
|
// The NodeList of matching elements
|
||||||
|
var missingCoverageElements = document.querySelectorAll(selector);
|
||||||
|
|
||||||
|
var currentIndex;
|
||||||
|
|
||||||
|
function toggleClass(index) {
|
||||||
|
missingCoverageElements
|
||||||
|
.item(currentIndex)
|
||||||
|
.classList.remove('highlighted');
|
||||||
|
missingCoverageElements.item(index).classList.add('highlighted');
|
||||||
|
}
|
||||||
|
|
||||||
|
function makeCurrent(index) {
|
||||||
|
toggleClass(index);
|
||||||
|
currentIndex = index;
|
||||||
|
missingCoverageElements.item(index).scrollIntoView({
|
||||||
|
behavior: 'smooth',
|
||||||
|
block: 'center',
|
||||||
|
inline: 'center'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function goToPrevious() {
|
||||||
|
var nextIndex = 0;
|
||||||
|
if (typeof currentIndex !== 'number' || currentIndex === 0) {
|
||||||
|
nextIndex = missingCoverageElements.length - 1;
|
||||||
|
} else if (missingCoverageElements.length > 1) {
|
||||||
|
nextIndex = currentIndex - 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
makeCurrent(nextIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
function goToNext() {
|
||||||
|
var nextIndex = 0;
|
||||||
|
|
||||||
|
if (
|
||||||
|
typeof currentIndex === 'number' &&
|
||||||
|
currentIndex < missingCoverageElements.length - 1
|
||||||
|
) {
|
||||||
|
nextIndex = currentIndex + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
makeCurrent(nextIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
return function jump(event) {
|
||||||
|
switch (event.which) {
|
||||||
|
case 78: // n
|
||||||
|
case 74: // j
|
||||||
|
goToNext();
|
||||||
|
break;
|
||||||
|
case 66: // b
|
||||||
|
case 75: // k
|
||||||
|
case 80: // p
|
||||||
|
goToPrevious();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
window.addEventListener('keydown', jumpToCode);
|
||||||
721
coverage/lcov-report/components/AddFruit.vue.html
Normal file
721
coverage/lcov-report/components/AddFruit.vue.html
Normal file
@@ -0,0 +1,721 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/AddFruit.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">components</a> AddFruit.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>8/8</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>5/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>8/8</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line high'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a>
|
||||||
|
<a name='L95'></a><a href='#L95'>95</a>
|
||||||
|
<a name='L96'></a><a href='#L96'>96</a>
|
||||||
|
<a name='L97'></a><a href='#L97'>97</a>
|
||||||
|
<a name='L98'></a><a href='#L98'>98</a>
|
||||||
|
<a name='L99'></a><a href='#L99'>99</a>
|
||||||
|
<a name='L100'></a><a href='#L100'>100</a>
|
||||||
|
<a name='L101'></a><a href='#L101'>101</a>
|
||||||
|
<a name='L102'></a><a href='#L102'>102</a>
|
||||||
|
<a name='L103'></a><a href='#L103'>103</a>
|
||||||
|
<a name='L104'></a><a href='#L104'>104</a>
|
||||||
|
<a name='L105'></a><a href='#L105'>105</a>
|
||||||
|
<a name='L106'></a><a href='#L106'>106</a>
|
||||||
|
<a name='L107'></a><a href='#L107'>107</a>
|
||||||
|
<a name='L108'></a><a href='#L108'>108</a>
|
||||||
|
<a name='L109'></a><a href='#L109'>109</a>
|
||||||
|
<a name='L110'></a><a href='#L110'>110</a>
|
||||||
|
<a name='L111'></a><a href='#L111'>111</a>
|
||||||
|
<a name='L112'></a><a href='#L112'>112</a>
|
||||||
|
<a name='L113'></a><a href='#L113'>113</a>
|
||||||
|
<a name='L114'></a><a href='#L114'>114</a>
|
||||||
|
<a name='L115'></a><a href='#L115'>115</a>
|
||||||
|
<a name='L116'></a><a href='#L116'>116</a>
|
||||||
|
<a name='L117'></a><a href='#L117'>117</a>
|
||||||
|
<a name='L118'></a><a href='#L118'>118</a>
|
||||||
|
<a name='L119'></a><a href='#L119'>119</a>
|
||||||
|
<a name='L120'></a><a href='#L120'>120</a>
|
||||||
|
<a name='L121'></a><a href='#L121'>121</a>
|
||||||
|
<a name='L122'></a><a href='#L122'>122</a>
|
||||||
|
<a name='L123'></a><a href='#L123'>123</a>
|
||||||
|
<a name='L124'></a><a href='#L124'>124</a>
|
||||||
|
<a name='L125'></a><a href='#L125'>125</a>
|
||||||
|
<a name='L126'></a><a href='#L126'>126</a>
|
||||||
|
<a name='L127'></a><a href='#L127'>127</a>
|
||||||
|
<a name='L128'></a><a href='#L128'>128</a>
|
||||||
|
<a name='L129'></a><a href='#L129'>129</a>
|
||||||
|
<a name='L130'></a><a href='#L130'>130</a>
|
||||||
|
<a name='L131'></a><a href='#L131'>131</a>
|
||||||
|
<a name='L132'></a><a href='#L132'>132</a>
|
||||||
|
<a name='L133'></a><a href='#L133'>133</a>
|
||||||
|
<a name='L134'></a><a href='#L134'>134</a>
|
||||||
|
<a name='L135'></a><a href='#L135'>135</a>
|
||||||
|
<a name='L136'></a><a href='#L136'>136</a>
|
||||||
|
<a name='L137'></a><a href='#L137'>137</a>
|
||||||
|
<a name='L138'></a><a href='#L138'>138</a>
|
||||||
|
<a name='L139'></a><a href='#L139'>139</a>
|
||||||
|
<a name='L140'></a><a href='#L140'>140</a>
|
||||||
|
<a name='L141'></a><a href='#L141'>141</a>
|
||||||
|
<a name='L142'></a><a href='#L142'>142</a>
|
||||||
|
<a name='L143'></a><a href='#L143'>143</a>
|
||||||
|
<a name='L144'></a><a href='#L144'>144</a>
|
||||||
|
<a name='L145'></a><a href='#L145'>145</a>
|
||||||
|
<a name='L146'></a><a href='#L146'>146</a>
|
||||||
|
<a name='L147'></a><a href='#L147'>147</a>
|
||||||
|
<a name='L148'></a><a href='#L148'>148</a>
|
||||||
|
<a name='L149'></a><a href='#L149'>149</a>
|
||||||
|
<a name='L150'></a><a href='#L150'>150</a>
|
||||||
|
<a name='L151'></a><a href='#L151'>151</a>
|
||||||
|
<a name='L152'></a><a href='#L152'>152</a>
|
||||||
|
<a name='L153'></a><a href='#L153'>153</a>
|
||||||
|
<a name='L154'></a><a href='#L154'>154</a>
|
||||||
|
<a name='L155'></a><a href='#L155'>155</a>
|
||||||
|
<a name='L156'></a><a href='#L156'>156</a>
|
||||||
|
<a name='L157'></a><a href='#L157'>157</a>
|
||||||
|
<a name='L158'></a><a href='#L158'>158</a>
|
||||||
|
<a name='L159'></a><a href='#L159'>159</a>
|
||||||
|
<a name='L160'></a><a href='#L160'>160</a>
|
||||||
|
<a name='L161'></a><a href='#L161'>161</a>
|
||||||
|
<a name='L162'></a><a href='#L162'>162</a>
|
||||||
|
<a name='L163'></a><a href='#L163'>163</a>
|
||||||
|
<a name='L164'></a><a href='#L164'>164</a>
|
||||||
|
<a name='L165'></a><a href='#L165'>165</a>
|
||||||
|
<a name='L166'></a><a href='#L166'>166</a>
|
||||||
|
<a name='L167'></a><a href='#L167'>167</a>
|
||||||
|
<a name='L168'></a><a href='#L168'>168</a>
|
||||||
|
<a name='L169'></a><a href='#L169'>169</a>
|
||||||
|
<a name='L170'></a><a href='#L170'>170</a>
|
||||||
|
<a name='L171'></a><a href='#L171'>171</a>
|
||||||
|
<a name='L172'></a><a href='#L172'>172</a>
|
||||||
|
<a name='L173'></a><a href='#L173'>173</a>
|
||||||
|
<a name='L174'></a><a href='#L174'>174</a>
|
||||||
|
<a name='L175'></a><a href='#L175'>175</a>
|
||||||
|
<a name='L176'></a><a href='#L176'>176</a>
|
||||||
|
<a name='L177'></a><a href='#L177'>177</a>
|
||||||
|
<a name='L178'></a><a href='#L178'>178</a>
|
||||||
|
<a name='L179'></a><a href='#L179'>179</a>
|
||||||
|
<a name='L180'></a><a href='#L180'>180</a>
|
||||||
|
<a name='L181'></a><a href='#L181'>181</a>
|
||||||
|
<a name='L182'></a><a href='#L182'>182</a>
|
||||||
|
<a name='L183'></a><a href='#L183'>183</a>
|
||||||
|
<a name='L184'></a><a href='#L184'>184</a>
|
||||||
|
<a name='L185'></a><a href='#L185'>185</a>
|
||||||
|
<a name='L186'></a><a href='#L186'>186</a>
|
||||||
|
<a name='L187'></a><a href='#L187'>187</a>
|
||||||
|
<a name='L188'></a><a href='#L188'>188</a>
|
||||||
|
<a name='L189'></a><a href='#L189'>189</a>
|
||||||
|
<a name='L190'></a><a href='#L190'>190</a>
|
||||||
|
<a name='L191'></a><a href='#L191'>191</a>
|
||||||
|
<a name='L192'></a><a href='#L192'>192</a>
|
||||||
|
<a name='L193'></a><a href='#L193'>193</a>
|
||||||
|
<a name='L194'></a><a href='#L194'>194</a>
|
||||||
|
<a name='L195'></a><a href='#L195'>195</a>
|
||||||
|
<a name='L196'></a><a href='#L196'>196</a>
|
||||||
|
<a name='L197'></a><a href='#L197'>197</a>
|
||||||
|
<a name='L198'></a><a href='#L198'>198</a>
|
||||||
|
<a name='L199'></a><a href='#L199'>199</a>
|
||||||
|
<a name='L200'></a><a href='#L200'>200</a>
|
||||||
|
<a name='L201'></a><a href='#L201'>201</a>
|
||||||
|
<a name='L202'></a><a href='#L202'>202</a>
|
||||||
|
<a name='L203'></a><a href='#L203'>203</a>
|
||||||
|
<a name='L204'></a><a href='#L204'>204</a>
|
||||||
|
<a name='L205'></a><a href='#L205'>205</a>
|
||||||
|
<a name='L206'></a><a href='#L206'>206</a>
|
||||||
|
<a name='L207'></a><a href='#L207'>207</a>
|
||||||
|
<a name='L208'></a><a href='#L208'>208</a>
|
||||||
|
<a name='L209'></a><a href='#L209'>209</a>
|
||||||
|
<a name='L210'></a><a href='#L210'>210</a>
|
||||||
|
<a name='L211'></a><a href='#L211'>211</a>
|
||||||
|
<a name='L212'></a><a href='#L212'>212</a>
|
||||||
|
<a name='L213'></a><a href='#L213'>213</a>
|
||||||
|
<a name='L214'></a><a href='#L214'>214</a>
|
||||||
|
<a name='L215'></a><a href='#L215'>215</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">5x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">5x</span>
|
||||||
|
<span class="cline-any cline-yes">5x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-yes">2x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div class="modal">
|
||||||
|
<h2>New Fruit</h2>
|
||||||
|
<form id="new-fruit" @submit.prevent="checkForm">
|
||||||
|
<!-- name -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-name">Name</label>
|
||||||
|
<input
|
||||||
|
id="fruit-name"
|
||||||
|
ref="autofocus"
|
||||||
|
type="text"
|
||||||
|
v-model="fruit.name"
|
||||||
|
placeholder="Ex: Banana"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- image finder (with Unsplash API) -->
|
||||||
|
<ImageUnsplash
|
||||||
|
@getValue="url => (fruit.image = url)"
|
||||||
|
label="Image"
|
||||||
|
containerClass="form-field"
|
||||||
|
placeholder="Search: strawberry, apple ..."
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<!-- taste -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-taste">Taste</label>
|
||||||
|
<input
|
||||||
|
id="fruit-taste"
|
||||||
|
type="text"
|
||||||
|
v-model="fruit.taste"
|
||||||
|
placeholder="Ex: sweet"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- color -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-color">Color</label>
|
||||||
|
<input id="fruit-color" type="color" v-model="fruit.color" placeholder="Color" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<!-- price -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-price">Price ($)</label>
|
||||||
|
<input
|
||||||
|
id="fruit-price"
|
||||||
|
type="number"
|
||||||
|
v-model="fruit.price"
|
||||||
|
placeholder="Ex: $13"
|
||||||
|
required
|
||||||
|
min="0"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- expires -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-expires">Expiration Date</label>
|
||||||
|
<input id="fruit-expires" type="date" v-model="fruit.expires" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- description -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-description">Description</label>
|
||||||
|
<textarea
|
||||||
|
id="fruit-description"
|
||||||
|
v-model="fruit.description"
|
||||||
|
placeholder="Ex: malesuada pellentesque elit eget ..."
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<button class="btn btn--cancel" type="button" @click="() => $store.commit('toggleModal')">
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button class="btn btn--success" type="submit">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ImageUnsplash from "./Form/ImageUnsplash/ImageUnsplash";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AddFruit",
|
||||||
|
components: { ImageUnsplash },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fruit: {
|
||||||
|
color: "#000000",
|
||||||
|
isFruit: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs["autofocus"].focus();
|
||||||
|
document.body.classList.add("is-overlayed");
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
document.body.classList.remove("is-overlayed");
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async checkForm(e) {
|
||||||
|
this.fruit.expires = new Date(this.fruit.expires);
|
||||||
|
await this.$store
|
||||||
|
.dispatch("addFruit", this.fruit)
|
||||||
|
.then(() => this.$store.commit("toggleModal"));
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.modal {
|
||||||
|
position: fixed;
|
||||||
|
top: @headerHeight;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
padding: 1rem;
|
||||||
|
z-index: 14;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
form {
|
||||||
|
border: 2px solid @color-1;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='%230c9696' fill-opacity='0.35'%3E%3Cpath fill-rule='evenodd' d='M29.42 29.41c.36-.36.58-.85.58-1.4V0h-4v26H0v4h28c.55 0 1.05-.22 1.41-.58h.01zm0 29.18c.36.36.58.86.58 1.4V88h-4V62H0v-4h28c.56 0 1.05.22 1.41.58zm29.16 0c-.36.36-.58.85-.58 1.4V88h4V62h26v-4H60c-.55 0-1.05.22-1.41.58h-.01zM62 26V0h-4v28c0 .55.22 1.05.58 1.41.37.37.86.59 1.41.59H88v-4H62zM18 36c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm16-26a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 58a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 78a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zM34 4a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm-8 82a2 2 0 1 1 4 0v2h-4v-2zm0-68a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V18zM66 4a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm0 72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm-48 0a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm0-72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm24-4h4v2a2 2 0 1 1-4 0V0zm0 60a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V60zm14-24c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm-28-6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm8 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM36 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-8-8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 68a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-34a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-12a2 2 0 1 0 0 4 6 6 0 1 1 0 12 2 2 0 1 0 0 4 10 10 0 1 0 0-20zm-64 0a2 2 0 1 1 0 4 6 6 0 1 0 0 12 2 2 0 1 1 0 4 10 10 0 1 1 0-20zm56-12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-48 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm24 32a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-4a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm36-36a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM10 44c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm56 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm8 24c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zM3 68c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm0-48c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm71 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm6 66a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 86a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-68A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm36 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
background-attachment: scroll;
|
||||||
|
background-color: rgba(0, 0, 0, 0.06);
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
padding: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 425px;
|
||||||
|
margin: 0 auto 2rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="color"] {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: @color-2;
|
||||||
|
margin: 1rem 0;
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea,
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: lighten(@text-color, 70%);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
color: darken(@color-1, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 1rem 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
background-color: none;
|
||||||
|
margin: 0;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 0.5rem 1.35rem;
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
|
||||||
|
&--success {
|
||||||
|
background-color: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--cancel {
|
||||||
|
background-color: darken(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Form/ImageUnsplash/ImageSkeleton.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../../index.html">All files</a> / <a href="index.html">components/Form/ImageUnsplash</a> ImageSkeleton.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<VueContentLoading
|
||||||
|
:style="{ backgroundColor: '#ffffff', padding: '1rem', borderRadius: '10px' }"
|
||||||
|
primary="#cecece"
|
||||||
|
:width="300"
|
||||||
|
:height="180"
|
||||||
|
>
|
||||||
|
<rect x="0" y="0" rx="4" ry="4" width="300" height="180" />
|
||||||
|
</VueContentLoading>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import VueContentLoading from "vue-content-loading";</span>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ImageSkeleton",
|
||||||
|
components: {
|
||||||
|
VueContentLoading
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../../sorter.js"></script>
|
||||||
|
<script src="../../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
@@ -0,0 +1,475 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Form/ImageUnsplash/ImageUnsplash.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../../index.html">All files</a> / <a href="index.html">components/Form/ImageUnsplash</a> ImageUnsplash.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">10% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/10</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">10% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/10</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a>
|
||||||
|
<a name='L95'></a><a href='#L95'>95</a>
|
||||||
|
<a name='L96'></a><a href='#L96'>96</a>
|
||||||
|
<a name='L97'></a><a href='#L97'>97</a>
|
||||||
|
<a name='L98'></a><a href='#L98'>98</a>
|
||||||
|
<a name='L99'></a><a href='#L99'>99</a>
|
||||||
|
<a name='L100'></a><a href='#L100'>100</a>
|
||||||
|
<a name='L101'></a><a href='#L101'>101</a>
|
||||||
|
<a name='L102'></a><a href='#L102'>102</a>
|
||||||
|
<a name='L103'></a><a href='#L103'>103</a>
|
||||||
|
<a name='L104'></a><a href='#L104'>104</a>
|
||||||
|
<a name='L105'></a><a href='#L105'>105</a>
|
||||||
|
<a name='L106'></a><a href='#L106'>106</a>
|
||||||
|
<a name='L107'></a><a href='#L107'>107</a>
|
||||||
|
<a name='L108'></a><a href='#L108'>108</a>
|
||||||
|
<a name='L109'></a><a href='#L109'>109</a>
|
||||||
|
<a name='L110'></a><a href='#L110'>110</a>
|
||||||
|
<a name='L111'></a><a href='#L111'>111</a>
|
||||||
|
<a name='L112'></a><a href='#L112'>112</a>
|
||||||
|
<a name='L113'></a><a href='#L113'>113</a>
|
||||||
|
<a name='L114'></a><a href='#L114'>114</a>
|
||||||
|
<a name='L115'></a><a href='#L115'>115</a>
|
||||||
|
<a name='L116'></a><a href='#L116'>116</a>
|
||||||
|
<a name='L117'></a><a href='#L117'>117</a>
|
||||||
|
<a name='L118'></a><a href='#L118'>118</a>
|
||||||
|
<a name='L119'></a><a href='#L119'>119</a>
|
||||||
|
<a name='L120'></a><a href='#L120'>120</a>
|
||||||
|
<a name='L121'></a><a href='#L121'>121</a>
|
||||||
|
<a name='L122'></a><a href='#L122'>122</a>
|
||||||
|
<a name='L123'></a><a href='#L123'>123</a>
|
||||||
|
<a name='L124'></a><a href='#L124'>124</a>
|
||||||
|
<a name='L125'></a><a href='#L125'>125</a>
|
||||||
|
<a name='L126'></a><a href='#L126'>126</a>
|
||||||
|
<a name='L127'></a><a href='#L127'>127</a>
|
||||||
|
<a name='L128'></a><a href='#L128'>128</a>
|
||||||
|
<a name='L129'></a><a href='#L129'>129</a>
|
||||||
|
<a name='L130'></a><a href='#L130'>130</a>
|
||||||
|
<a name='L131'></a><a href='#L131'>131</a>
|
||||||
|
<a name='L132'></a><a href='#L132'>132</a>
|
||||||
|
<a name='L133'></a><a href='#L133'>133</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div :class="containerClass" class="image-unsplash">
|
||||||
|
<label for="search-unsplash">{{ label }}</label>
|
||||||
|
<!-- Loading placeholder -->
|
||||||
|
<ImageSkeleton v-if="loading" />
|
||||||
|
|
||||||
|
<!-- Image preview -->
|
||||||
|
<img
|
||||||
|
class="preview"
|
||||||
|
v-if="!loading && !error && preview"
|
||||||
|
:src="preview.urls.regular"
|
||||||
|
:alt="preview.alt_description"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- API error messages -->
|
||||||
|
<p class="error" v-if="error">{{ error }}</p>
|
||||||
|
|
||||||
|
<!-- Search input -->
|
||||||
|
<div class="search-box">
|
||||||
|
<input
|
||||||
|
id="search-unsplash"
|
||||||
|
type="search"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
@change="handleSearch"
|
||||||
|
:required="required"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ImageUnsplash",
|
||||||
|
components: {
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > ImageSkeleton: () => import("./ImageSkeleton")</span></span>
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
containerClass: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: "Image (from Unsplash)"
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: "Type anything !"
|
||||||
|
},
|
||||||
|
required: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
<span class="fstat-no" title="function not covered" > data() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
||||||
|
error: null,
|
||||||
|
preview: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["loading"])
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
<span class="fstat-no" title="function not covered" > async handleSearch(e) {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > this.error = null;</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > if (e.target.value != "") {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > await this.$store</span></span>
|
||||||
|
.dispatch("getImageFromUnsplash", e.target.value)
|
||||||
|
.then(res => {
|
||||||
|
<span class="cstat-no" title="statement not covered" > this.preview = res;</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > this.$emit("getValue", res.urls.regular);</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > })</span></span>
|
||||||
|
.catch(err => (this.error = err.message));
|
||||||
|
<span class="cstat-no" title="statement not covered" > } else this.preview = null;</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.image-unsplash {
|
||||||
|
.preview,
|
||||||
|
.skeleton {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: scale-down;
|
||||||
|
height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: @text-error;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
&:focus-within::after {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 350.439 350.439' style='enable-background:new 0 0 350.439 350.439;' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M312.856,36.464H202.507c-4.87,0-8.83,3.961-8.83,8.832v138.422H52.371c-4.87,0-8.832,3.973-8.832,8.843v108.023 c0,4.87,3.961,8.831,8.832,8.831l260.474-0.071c4.873,0,8.838-3.962,8.838-8.843l0.011-255.211 C321.701,40.425,317.737,36.464,312.856,36.464z M175.216,253.617c0,5.724-4.635,10.353-10.356,10.353h-57.814 c-0.392,0-0.775-0.022-1.155-0.065v0.887l8.294,21.002c0.281,0.7,0.057,1.51-0.551,1.965c-0.301,0.229-0.658,0.344-1.013,0.344 c-0.364,0-0.722-0.12-1.025-0.355l-41.251-31.715c-0.416-0.318-0.657-0.816-0.657-1.33c0-0.531,0.241-1.023,0.657-1.345 l41.251-31.712c0.6-0.463,1.433-0.463,2.038-0.011c0.603,0.459,0.827,1.258,0.551,1.958l-7.776,19.694 c0.21-0.011,0.418-0.033,0.637-0.033h47.462v-34.715c0-5.724,4.637-10.353,10.352-10.353c5.721,0,10.356,4.629,10.356,10.353 V253.617z M332.215,7.41H174.623c-10.062,0-18.221,8.159-18.221,18.225v126.679H18.223C8.159,152.314,0,160.479,0,170.541v154.267 c0,10.063,8.159,18.222,18.223,18.222h157.588c0.346,0,0.667-0.087,1.008-0.099h155.375c10.065,0,18.228-8.164,18.228-18.232 V180.074c0-0.066,0.018-0.121,0.018-0.176V25.635C350.439,15.569,342.273,7.41,332.215,7.41z M329.535,300.512 c0,9.205-7.483,16.69-16.69,16.69H204.052c-0.078,0.043-0.383,0.076-0.705,0.076H52.371c-9.202,0-16.688-7.485-16.688-16.689 V192.571c0-9.209,7.485-16.689,16.688-16.689h133.453V45.295c0-9.201,7.485-16.687,16.684-16.687h110.349 c9.204,0,16.689,7.486,16.689,16.687L329.535,300.512z'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: 50%;
|
||||||
|
right: 0.5rem;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
padding-right: 2.35rem;
|
||||||
|
border: none;
|
||||||
|
background-color: lighten(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="file"] {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../../sorter.js"></script>
|
||||||
|
<script src="../../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
125
coverage/lcov-report/components/Form/ImageUnsplash/index.html
Normal file
125
coverage/lcov-report/components/Form/ImageUnsplash/index.html
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Form/ImageUnsplash</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../../index.html">All files</a> components/Form/ImageUnsplash</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">9.09% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/11</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">9.09% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/11</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file low" data-value="ImageSkeleton.vue"><a href="ImageSkeleton.vue.html">ImageSkeleton.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="ImageUnsplash.vue"><a href="ImageUnsplash.vue.html">ImageUnsplash.vue</a></td>
|
||||||
|
<td data-value="10" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 10%"></div><div class="cover-empty" style="width: 90%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="10" class="pct low">10%</td>
|
||||||
|
<td data-value="10" class="abs low">1/10</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="2" class="abs low">0/2</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="5" class="abs low">0/5</td>
|
||||||
|
<td data-value="10" class="pct low">10%</td>
|
||||||
|
<td data-value="10" class="abs low">1/10</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../../sorter.js"></script>
|
||||||
|
<script src="../../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
199
coverage/lcov-report/components/Grid.vue.html
Normal file
199
coverage/lcov-report/components/Grid.vue.html
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">components</a> Grid.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line high'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div class="grid">
|
||||||
|
<GridItem :key="item.id" v-for="item in data" :item="item" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import GridItem from "./GridItem";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Grid",
|
||||||
|
components: {
|
||||||
|
GridItem
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
data: Array
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
column-gap: 1rem;
|
||||||
|
row-gap: 1.5rem;
|
||||||
|
|
||||||
|
@media screen and (min-width: @md) {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @lg) {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @xl) {
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Sun Dec 06 2020 15:56:50 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
358
coverage/lcov-report/components/Grid/DeleteItem.vue.html
Normal file
358
coverage/lcov-report/components/Grid/DeleteItem.vue.html
Normal file
@@ -0,0 +1,358 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid/DeleteItem.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/Grid</a> DeleteItem.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div>
|
||||||
|
<button class="delete-btn" @click="showPrompt">
|
||||||
|
🚮
|
||||||
|
</button>
|
||||||
|
<div v-if="openPrompt" :class="{ open: openPrompt }" class="prompt">
|
||||||
|
<h3>You will delete '{{ item.name }}'?</h3>
|
||||||
|
<div class="actions">
|
||||||
|
<button class="btn btn--cancel" @click="openPrompt = false">No</button>
|
||||||
|
<button class="btn btn--success" @click="removeFruit(item.id)">Yes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "DeleteItem",
|
||||||
|
props: {
|
||||||
|
item: Object,
|
||||||
|
redirect: {
|
||||||
|
type: Function,
|
||||||
|
<span class="fstat-no" title="function not covered" > default: () => {}</span>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
<span class="fstat-no" title="function not covered" > data() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
||||||
|
openPrompt: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
<span class="fstat-no" title="function not covered" > showPrompt() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > this.openPrompt = true;</span>
|
||||||
|
},
|
||||||
|
<span class="fstat-no" title="function not covered" > removeFruit(id) {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > this.$store.dispatch("removeFruit", id).then(() => this.redirect());</span></span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.prompt {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background: rgb(230, 107, 107);
|
||||||
|
background: linear-gradient(90deg, rgba(230, 107, 107, 1) 0%, rgba(214, 48, 49, 1) 100%);
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
transition: all 0.4s ease-in-out;
|
||||||
|
color: @color-2;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&.open {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 0.5rem 1.35rem;
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
|
||||||
|
&--success {
|
||||||
|
background-color: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--cancel {
|
||||||
|
background-color: darken(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-btn {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 55px;
|
||||||
|
padding: 0.75rem 0.75rem 1.35rem 1.35rem;
|
||||||
|
background: rgb(230, 107, 107);
|
||||||
|
background: linear-gradient(180deg, rgba(230, 107, 107, 0.6) 0%, rgba(214, 48, 49, 1) 100%);
|
||||||
|
border: none;
|
||||||
|
border-bottom-left-radius: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../sorter.js"></script>
|
||||||
|
<script src="../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
325
coverage/lcov-report/components/Grid/Grid.vue.html
Normal file
325
coverage/lcov-report/components/Grid/Grid.vue.html
Normal file
@@ -0,0 +1,325 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid/Grid.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/Grid</a> Grid.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div :class="{ error: !loading && !data.length }" class="grid">
|
||||||
|
<!-- Loading placeholder -->
|
||||||
|
<GridItemSkeleton v-if="loading" />
|
||||||
|
<GridItemSkeleton v-if="loading" />
|
||||||
|
|
||||||
|
<!-- Items -->
|
||||||
|
<GridItem v-else :key="item.id" v-for="item in data" :item="item" />
|
||||||
|
|
||||||
|
<!-- Error messages -->
|
||||||
|
<p v-if="!loading && !data.length" class="alert"><b>💡 Restart API</b>: 0 fruits !</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import { mapState } from "vuex";</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import GridItemSkeleton from "./GridItemSkeleton";</span>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Grid",
|
||||||
|
components: {
|
||||||
|
GridItemSkeleton,
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > GridItem: () => import("./GridItem")</span></span>
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
data: Array
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["loading"])
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
column-gap: 1rem;
|
||||||
|
row-gap: 1.5rem;
|
||||||
|
|
||||||
|
&.error {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @md) {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @lg) {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @xl) {
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80%;
|
||||||
|
background-color: @color-3;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 535px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgb(45, 48, 55);
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../sorter.js"></script>
|
||||||
|
<script src="../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
409
coverage/lcov-report/components/Grid/GridItem.vue.html
Normal file
409
coverage/lcov-report/components/Grid/GridItem.vue.html
Normal file
@@ -0,0 +1,409 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid/GridItem.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/Grid</a> GridItem.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">66.67% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>2/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">50% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>1/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">66.67% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>2/3</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line medium'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a>
|
||||||
|
<a name='L95'></a><a href='#L95'>95</a>
|
||||||
|
<a name='L96'></a><a href='#L96'>96</a>
|
||||||
|
<a name='L97'></a><a href='#L97'>97</a>
|
||||||
|
<a name='L98'></a><a href='#L98'>98</a>
|
||||||
|
<a name='L99'></a><a href='#L99'>99</a>
|
||||||
|
<a name='L100'></a><a href='#L100'>100</a>
|
||||||
|
<a name='L101'></a><a href='#L101'>101</a>
|
||||||
|
<a name='L102'></a><a href='#L102'>102</a>
|
||||||
|
<a name='L103'></a><a href='#L103'>103</a>
|
||||||
|
<a name='L104'></a><a href='#L104'>104</a>
|
||||||
|
<a name='L105'></a><a href='#L105'>105</a>
|
||||||
|
<a name='L106'></a><a href='#L106'>106</a>
|
||||||
|
<a name='L107'></a><a href='#L107'>107</a>
|
||||||
|
<a name='L108'></a><a href='#L108'>108</a>
|
||||||
|
<a name='L109'></a><a href='#L109'>109</a>
|
||||||
|
<a name='L110'></a><a href='#L110'>110</a>
|
||||||
|
<a name='L111'></a><a href='#L111'>111</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">2x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<article class="grid-item">
|
||||||
|
<DeleteItem v-if="deleteMode" :item="item" />
|
||||||
|
<router-link :to="`/fruit/${item.id}`">
|
||||||
|
<div class="thumbnail">
|
||||||
|
<img :src="item.image" :alt="item.name" />
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<h3>
|
||||||
|
{{ item.name }}
|
||||||
|
<span class="tag" :style="{ backgroundColor: item.color }">{{ item.taste }}</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<p class="price">${{ item.price | noDecimal }}</p>
|
||||||
|
</section>
|
||||||
|
</router-link>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "GridItem",
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > components: { DeleteItem: () => import("./DeleteItem") },</span></span>
|
||||||
|
props: {
|
||||||
|
item: Object
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["deleteMode"])
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
noDecimal(value) {
|
||||||
|
return parseInt(value).toFixed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.grid-item {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:hover .thumbnail img {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
height: 285px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
max-width: 100%;
|
||||||
|
transition: transform 0.4s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 1.5rem 1rem;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 0.55rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100px;
|
||||||
|
color: #cece;
|
||||||
|
margin: 1.35rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ff9700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../sorter.js"></script>
|
||||||
|
<script src="../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
157
coverage/lcov-report/components/Grid/GridItemSkeleton.vue.html
Normal file
157
coverage/lcov-report/components/Grid/GridItemSkeleton.vue.html
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid/GridItemSkeleton.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../index.html">All files</a> / <a href="index.html">components/Grid</a> GridItemSkeleton.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<VueContentLoading
|
||||||
|
:style="{ backgroundColor: '#ffffff', padding: '1rem', borderRadius: '10px' }"
|
||||||
|
primary="#cecece"
|
||||||
|
:width="300"
|
||||||
|
:height="220"
|
||||||
|
>
|
||||||
|
<rect x="0" y="0" rx="4" ry="4" width="100%" height="100" />
|
||||||
|
<rect x="30" y="110" rx="4" ry="4" width="80%" height="15" />
|
||||||
|
<rect x="100px" y="150" width="100" height="2" />
|
||||||
|
<rect x="100px" y="175" rx="4" ry="4" width="100" height="35" />
|
||||||
|
</VueContentLoading>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import VueContentLoading from "vue-content-loading";</span>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "GridItemSkeleton",
|
||||||
|
components: {
|
||||||
|
VueContentLoading
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../sorter.js"></script>
|
||||||
|
<script src="../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
155
coverage/lcov-report/components/Grid/index.html
Normal file
155
coverage/lcov-report/components/Grid/index.html
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Grid</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../../index.html">All files</a> components/Grid</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">20% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>2/10</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">12.5% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>1/8</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">20% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>2/10</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file low" data-value="DeleteItem.vue"><a href="DeleteItem.vue.html">DeleteItem.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="3" class="abs low">0/3</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="5" class="abs low">0/5</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="3" class="abs low">0/3</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="Grid.vue"><a href="Grid.vue.html">Grid.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="3" class="abs low">0/3</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="3" class="abs low">0/3</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file medium" data-value="GridItem.vue"><a href="GridItem.vue.html">GridItem.vue</a></td>
|
||||||
|
<td data-value="66.67" class="pic medium">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 66%"></div><div class="cover-empty" style="width: 34%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||||
|
<td data-value="3" class="abs medium">2/3</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="50" class="pct medium">50%</td>
|
||||||
|
<td data-value="2" class="abs medium">1/2</td>
|
||||||
|
<td data-value="66.67" class="pct medium">66.67%</td>
|
||||||
|
<td data-value="3" class="abs medium">2/3</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="GridItemSkeleton.vue"><a href="GridItemSkeleton.vue.html">GridItemSkeleton.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../../sorter.js"></script>
|
||||||
|
<script src="../../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
394
coverage/lcov-report/components/Header.vue.html
Normal file
394
coverage/lcov-report/components/Header.vue.html
Normal file
@@ -0,0 +1,394 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components/Header.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">components</a> Header.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line high'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a>
|
||||||
|
<a name='L95'></a><a href='#L95'>95</a>
|
||||||
|
<a name='L96'></a><a href='#L96'>96</a>
|
||||||
|
<a name='L97'></a><a href='#L97'>97</a>
|
||||||
|
<a name='L98'></a><a href='#L98'>98</a>
|
||||||
|
<a name='L99'></a><a href='#L99'>99</a>
|
||||||
|
<a name='L100'></a><a href='#L100'>100</a>
|
||||||
|
<a name='L101'></a><a href='#L101'>101</a>
|
||||||
|
<a name='L102'></a><a href='#L102'>102</a>
|
||||||
|
<a name='L103'></a><a href='#L103'>103</a>
|
||||||
|
<a name='L104'></a><a href='#L104'>104</a>
|
||||||
|
<a name='L105'></a><a href='#L105'>105</a>
|
||||||
|
<a name='L106'></a><a href='#L106'>106</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<header id="header" class="main-nav">
|
||||||
|
<router-link to="/">
|
||||||
|
<img src="https://www.cycloid.io/themes/cycloid/images/owl_logo.png" alt="Cycloid.io" />
|
||||||
|
<h1>Fruits</h1>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<button
|
||||||
|
:disabled="modalIsOpen"
|
||||||
|
class="action-btn action-btn--delete"
|
||||||
|
@click="() => $store.commit('toggleDeleteMode')"
|
||||||
|
>
|
||||||
|
{{ deleteMode ? "&#x1F6AB;" : "&#x1f5d1;" }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
:disabled="deleteMode"
|
||||||
|
class="action-btn action-btn--add"
|
||||||
|
@click="() => $store.commit('toggleModal')"
|
||||||
|
>
|
||||||
|
{{ modalIsOpen ? "&#x1F6AB;" : "&#x2795;" }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Header",
|
||||||
|
computed: {
|
||||||
|
...mapState(["deleteMode", "modalIsOpen"])
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
header {
|
||||||
|
background-color: @color-2;
|
||||||
|
box-shadow: 0 0px 14px 0px #cecece;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: lighter;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.main-nav {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 15;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 1rem;
|
||||||
|
height: @headerHeight;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
width: 42px;
|
||||||
|
height: 42px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: @color-2;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 1rem;
|
||||||
|
padding-top: 2px;
|
||||||
|
background: lighten(#cecece, 10%);
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--delete {
|
||||||
|
border: 1px solid @text-error;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--add {
|
||||||
|
border: 1px solid @color-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
125
coverage/lcov-report/components/index.html
Normal file
125
coverage/lcov-report/components/index.html
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for components</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> components</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>9/9</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>5/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>9/9</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line high'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file high" data-value="AddFruit.vue"><a href="AddFruit.vue.html">AddFruit.vue</a></td>
|
||||||
|
<td data-value="100" class="pic high">
|
||||||
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="8" class="abs high">8/8</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="5" class="abs high">5/5</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="8" class="abs high">8/8</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file high" data-value="Header.vue"><a href="Header.vue.html">Header.vue</a></td>
|
||||||
|
<td data-value="100" class="pic high">
|
||||||
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="1" class="abs high">1/1</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="1" class="abs high">1/1</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
155
coverage/lcov-report/index.html
Normal file
155
coverage/lcov-report/index.html
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for All files</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="prettify.css" />
|
||||||
|
<link rel="stylesheet" href="base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1>All files</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">30.77% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>12/39</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/4</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">23.08% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>6/26</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">30.77% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>12/39</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file high" data-value="components"><a href="components/index.html">components</a></td>
|
||||||
|
<td data-value="100" class="pic high">
|
||||||
|
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="9" class="abs high">9/9</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="5" class="abs high">5/5</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="9" class="abs high">9/9</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="components/Form/ImageUnsplash"><a href="components/Form/ImageUnsplash/index.html">components/Form/ImageUnsplash</a></td>
|
||||||
|
<td data-value="9.09" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 9%"></div><div class="cover-empty" style="width: 91%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="9.09" class="pct low">9.09%</td>
|
||||||
|
<td data-value="11" class="abs low">1/11</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="2" class="abs low">0/2</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="5" class="abs low">0/5</td>
|
||||||
|
<td data-value="9.09" class="pct low">9.09%</td>
|
||||||
|
<td data-value="11" class="abs low">1/11</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="components/Grid"><a href="components/Grid/index.html">components/Grid</a></td>
|
||||||
|
<td data-value="20" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 20%"></div><div class="cover-empty" style="width: 80%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="20" class="pct low">20%</td>
|
||||||
|
<td data-value="10" class="abs low">2/10</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="12.5" class="pct low">12.5%</td>
|
||||||
|
<td data-value="8" class="abs low">1/8</td>
|
||||||
|
<td data-value="20" class="pct low">20%</td>
|
||||||
|
<td data-value="10" class="abs low">2/10</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="views"><a href="views/index.html">views</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="9" class="abs low">0/9</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="2" class="abs low">0/2</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="8" class="abs low">0/8</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="9" class="abs low">0/9</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="sorter.js"></script>
|
||||||
|
<script src="block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
1
coverage/lcov-report/prettify.css
Normal file
1
coverage/lcov-report/prettify.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
|
||||||
2
coverage/lcov-report/prettify.js
Normal file
2
coverage/lcov-report/prettify.js
Normal file
File diff suppressed because one or more lines are too long
BIN
coverage/lcov-report/sort-arrow-sprite.png
Normal file
BIN
coverage/lcov-report/sort-arrow-sprite.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 209 B |
170
coverage/lcov-report/sorter.js
Normal file
170
coverage/lcov-report/sorter.js
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
/* eslint-disable */
|
||||||
|
var addSorting = (function() {
|
||||||
|
'use strict';
|
||||||
|
var cols,
|
||||||
|
currentSort = {
|
||||||
|
index: 0,
|
||||||
|
desc: false
|
||||||
|
};
|
||||||
|
|
||||||
|
// returns the summary table element
|
||||||
|
function getTable() {
|
||||||
|
return document.querySelector('.coverage-summary');
|
||||||
|
}
|
||||||
|
// returns the thead element of the summary table
|
||||||
|
function getTableHeader() {
|
||||||
|
return getTable().querySelector('thead tr');
|
||||||
|
}
|
||||||
|
// returns the tbody element of the summary table
|
||||||
|
function getTableBody() {
|
||||||
|
return getTable().querySelector('tbody');
|
||||||
|
}
|
||||||
|
// returns the th element for nth column
|
||||||
|
function getNthColumn(n) {
|
||||||
|
return getTableHeader().querySelectorAll('th')[n];
|
||||||
|
}
|
||||||
|
|
||||||
|
// loads all columns
|
||||||
|
function loadColumns() {
|
||||||
|
var colNodes = getTableHeader().querySelectorAll('th'),
|
||||||
|
colNode,
|
||||||
|
cols = [],
|
||||||
|
col,
|
||||||
|
i;
|
||||||
|
|
||||||
|
for (i = 0; i < colNodes.length; i += 1) {
|
||||||
|
colNode = colNodes[i];
|
||||||
|
col = {
|
||||||
|
key: colNode.getAttribute('data-col'),
|
||||||
|
sortable: !colNode.getAttribute('data-nosort'),
|
||||||
|
type: colNode.getAttribute('data-type') || 'string'
|
||||||
|
};
|
||||||
|
cols.push(col);
|
||||||
|
if (col.sortable) {
|
||||||
|
col.defaultDescSort = col.type === 'number';
|
||||||
|
colNode.innerHTML =
|
||||||
|
colNode.innerHTML + '<span class="sorter"></span>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cols;
|
||||||
|
}
|
||||||
|
// attaches a data attribute to every tr element with an object
|
||||||
|
// of data values keyed by column name
|
||||||
|
function loadRowData(tableRow) {
|
||||||
|
var tableCols = tableRow.querySelectorAll('td'),
|
||||||
|
colNode,
|
||||||
|
col,
|
||||||
|
data = {},
|
||||||
|
i,
|
||||||
|
val;
|
||||||
|
for (i = 0; i < tableCols.length; i += 1) {
|
||||||
|
colNode = tableCols[i];
|
||||||
|
col = cols[i];
|
||||||
|
val = colNode.getAttribute('data-value');
|
||||||
|
if (col.type === 'number') {
|
||||||
|
val = Number(val);
|
||||||
|
}
|
||||||
|
data[col.key] = val;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
// loads all row data
|
||||||
|
function loadData() {
|
||||||
|
var rows = getTableBody().querySelectorAll('tr'),
|
||||||
|
i;
|
||||||
|
|
||||||
|
for (i = 0; i < rows.length; i += 1) {
|
||||||
|
rows[i].data = loadRowData(rows[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// sorts the table using the data for the ith column
|
||||||
|
function sortByIndex(index, desc) {
|
||||||
|
var key = cols[index].key,
|
||||||
|
sorter = function(a, b) {
|
||||||
|
a = a.data[key];
|
||||||
|
b = b.data[key];
|
||||||
|
return a < b ? -1 : a > b ? 1 : 0;
|
||||||
|
},
|
||||||
|
finalSorter = sorter,
|
||||||
|
tableBody = document.querySelector('.coverage-summary tbody'),
|
||||||
|
rowNodes = tableBody.querySelectorAll('tr'),
|
||||||
|
rows = [],
|
||||||
|
i;
|
||||||
|
|
||||||
|
if (desc) {
|
||||||
|
finalSorter = function(a, b) {
|
||||||
|
return -1 * sorter(a, b);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < rowNodes.length; i += 1) {
|
||||||
|
rows.push(rowNodes[i]);
|
||||||
|
tableBody.removeChild(rowNodes[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
rows.sort(finalSorter);
|
||||||
|
|
||||||
|
for (i = 0; i < rows.length; i += 1) {
|
||||||
|
tableBody.appendChild(rows[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// removes sort indicators for current column being sorted
|
||||||
|
function removeSortIndicators() {
|
||||||
|
var col = getNthColumn(currentSort.index),
|
||||||
|
cls = col.className;
|
||||||
|
|
||||||
|
cls = cls.replace(/ sorted$/, '').replace(/ sorted-desc$/, '');
|
||||||
|
col.className = cls;
|
||||||
|
}
|
||||||
|
// adds sort indicators for current column being sorted
|
||||||
|
function addSortIndicators() {
|
||||||
|
getNthColumn(currentSort.index).className += currentSort.desc
|
||||||
|
? ' sorted-desc'
|
||||||
|
: ' sorted';
|
||||||
|
}
|
||||||
|
// adds event listeners for all sorter widgets
|
||||||
|
function enableUI() {
|
||||||
|
var i,
|
||||||
|
el,
|
||||||
|
ithSorter = function ithSorter(i) {
|
||||||
|
var col = cols[i];
|
||||||
|
|
||||||
|
return function() {
|
||||||
|
var desc = col.defaultDescSort;
|
||||||
|
|
||||||
|
if (currentSort.index === i) {
|
||||||
|
desc = !currentSort.desc;
|
||||||
|
}
|
||||||
|
sortByIndex(i, desc);
|
||||||
|
removeSortIndicators();
|
||||||
|
currentSort.index = i;
|
||||||
|
currentSort.desc = desc;
|
||||||
|
addSortIndicators();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
for (i = 0; i < cols.length; i += 1) {
|
||||||
|
if (cols[i].sortable) {
|
||||||
|
// add the click event handler on the th so users
|
||||||
|
// dont have to click on those tiny arrows
|
||||||
|
el = getNthColumn(i).querySelector('.sorter').parentElement;
|
||||||
|
if (el.addEventListener) {
|
||||||
|
el.addEventListener('click', ithSorter(i));
|
||||||
|
} else {
|
||||||
|
el.attachEvent('onclick', ithSorter(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// adds sorting functionality to the UI
|
||||||
|
return function() {
|
||||||
|
if (!getTable()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cols = loadColumns();
|
||||||
|
loadData();
|
||||||
|
addSortIndicators();
|
||||||
|
enableUI();
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
window.addEventListener('load', addSorting);
|
||||||
110
coverage/lcov-report/store/index.html
Normal file
110
coverage/lcov-report/store/index.html
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for store</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> store</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">50% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">50% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line medium'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file medium" data-value="index.js"><a href="index.js.html">index.js</a></td>
|
||||||
|
<td data-value="50" class="pic medium">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 50%"></div><div class="cover-empty" style="width: 50%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="50" class="pct medium">50%</td>
|
||||||
|
<td data-value="2" class="abs medium">1/2</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="1" class="abs low">0/1</td>
|
||||||
|
<td data-value="50" class="pct medium">50%</td>
|
||||||
|
<td data-value="2" class="abs medium">1/2</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Thu Dec 03 2020 23:19:50 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
130
coverage/lcov-report/store/index.js.html
Normal file
130
coverage/lcov-report/store/index.js.html
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for store/index.js</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">store</a> index.js</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">50% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>1/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/1</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">50% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>1/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line medium'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-yes">1x</span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import Vue from "vue";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
|
||||||
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state: {
|
||||||
|
fruits: []
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
<span class="fstat-no" title="function not covered" > se</span>tFruits(state, fruits) {
|
||||||
|
<span class="cstat-no" title="statement not covered" > state.fruits = fruits;</span>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
actions: {},
|
||||||
|
modules: {}
|
||||||
|
});
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Thu Dec 03 2020 23:19:50 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
499
coverage/lcov-report/views/Fruit.vue.html
Normal file
499
coverage/lcov-report/views/Fruit.vue.html
Normal file
@@ -0,0 +1,499 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for views/Fruit.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">views</a> Fruit.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/4</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/5</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a>
|
||||||
|
<a name='L64'></a><a href='#L64'>64</a>
|
||||||
|
<a name='L65'></a><a href='#L65'>65</a>
|
||||||
|
<a name='L66'></a><a href='#L66'>66</a>
|
||||||
|
<a name='L67'></a><a href='#L67'>67</a>
|
||||||
|
<a name='L68'></a><a href='#L68'>68</a>
|
||||||
|
<a name='L69'></a><a href='#L69'>69</a>
|
||||||
|
<a name='L70'></a><a href='#L70'>70</a>
|
||||||
|
<a name='L71'></a><a href='#L71'>71</a>
|
||||||
|
<a name='L72'></a><a href='#L72'>72</a>
|
||||||
|
<a name='L73'></a><a href='#L73'>73</a>
|
||||||
|
<a name='L74'></a><a href='#L74'>74</a>
|
||||||
|
<a name='L75'></a><a href='#L75'>75</a>
|
||||||
|
<a name='L76'></a><a href='#L76'>76</a>
|
||||||
|
<a name='L77'></a><a href='#L77'>77</a>
|
||||||
|
<a name='L78'></a><a href='#L78'>78</a>
|
||||||
|
<a name='L79'></a><a href='#L79'>79</a>
|
||||||
|
<a name='L80'></a><a href='#L80'>80</a>
|
||||||
|
<a name='L81'></a><a href='#L81'>81</a>
|
||||||
|
<a name='L82'></a><a href='#L82'>82</a>
|
||||||
|
<a name='L83'></a><a href='#L83'>83</a>
|
||||||
|
<a name='L84'></a><a href='#L84'>84</a>
|
||||||
|
<a name='L85'></a><a href='#L85'>85</a>
|
||||||
|
<a name='L86'></a><a href='#L86'>86</a>
|
||||||
|
<a name='L87'></a><a href='#L87'>87</a>
|
||||||
|
<a name='L88'></a><a href='#L88'>88</a>
|
||||||
|
<a name='L89'></a><a href='#L89'>89</a>
|
||||||
|
<a name='L90'></a><a href='#L90'>90</a>
|
||||||
|
<a name='L91'></a><a href='#L91'>91</a>
|
||||||
|
<a name='L92'></a><a href='#L92'>92</a>
|
||||||
|
<a name='L93'></a><a href='#L93'>93</a>
|
||||||
|
<a name='L94'></a><a href='#L94'>94</a>
|
||||||
|
<a name='L95'></a><a href='#L95'>95</a>
|
||||||
|
<a name='L96'></a><a href='#L96'>96</a>
|
||||||
|
<a name='L97'></a><a href='#L97'>97</a>
|
||||||
|
<a name='L98'></a><a href='#L98'>98</a>
|
||||||
|
<a name='L99'></a><a href='#L99'>99</a>
|
||||||
|
<a name='L100'></a><a href='#L100'>100</a>
|
||||||
|
<a name='L101'></a><a href='#L101'>101</a>
|
||||||
|
<a name='L102'></a><a href='#L102'>102</a>
|
||||||
|
<a name='L103'></a><a href='#L103'>103</a>
|
||||||
|
<a name='L104'></a><a href='#L104'>104</a>
|
||||||
|
<a name='L105'></a><a href='#L105'>105</a>
|
||||||
|
<a name='L106'></a><a href='#L106'>106</a>
|
||||||
|
<a name='L107'></a><a href='#L107'>107</a>
|
||||||
|
<a name='L108'></a><a href='#L108'>108</a>
|
||||||
|
<a name='L109'></a><a href='#L109'>109</a>
|
||||||
|
<a name='L110'></a><a href='#L110'>110</a>
|
||||||
|
<a name='L111'></a><a href='#L111'>111</a>
|
||||||
|
<a name='L112'></a><a href='#L112'>112</a>
|
||||||
|
<a name='L113'></a><a href='#L113'>113</a>
|
||||||
|
<a name='L114'></a><a href='#L114'>114</a>
|
||||||
|
<a name='L115'></a><a href='#L115'>115</a>
|
||||||
|
<a name='L116'></a><a href='#L116'>116</a>
|
||||||
|
<a name='L117'></a><a href='#L117'>117</a>
|
||||||
|
<a name='L118'></a><a href='#L118'>118</a>
|
||||||
|
<a name='L119'></a><a href='#L119'>119</a>
|
||||||
|
<a name='L120'></a><a href='#L120'>120</a>
|
||||||
|
<a name='L121'></a><a href='#L121'>121</a>
|
||||||
|
<a name='L122'></a><a href='#L122'>122</a>
|
||||||
|
<a name='L123'></a><a href='#L123'>123</a>
|
||||||
|
<a name='L124'></a><a href='#L124'>124</a>
|
||||||
|
<a name='L125'></a><a href='#L125'>125</a>
|
||||||
|
<a name='L126'></a><a href='#L126'>126</a>
|
||||||
|
<a name='L127'></a><a href='#L127'>127</a>
|
||||||
|
<a name='L128'></a><a href='#L128'>128</a>
|
||||||
|
<a name='L129'></a><a href='#L129'>129</a>
|
||||||
|
<a name='L130'></a><a href='#L130'>130</a>
|
||||||
|
<a name='L131'></a><a href='#L131'>131</a>
|
||||||
|
<a name='L132'></a><a href='#L132'>132</a>
|
||||||
|
<a name='L133'></a><a href='#L133'>133</a>
|
||||||
|
<a name='L134'></a><a href='#L134'>134</a>
|
||||||
|
<a name='L135'></a><a href='#L135'>135</a>
|
||||||
|
<a name='L136'></a><a href='#L136'>136</a>
|
||||||
|
<a name='L137'></a><a href='#L137'>137</a>
|
||||||
|
<a name='L138'></a><a href='#L138'>138</a>
|
||||||
|
<a name='L139'></a><a href='#L139'>139</a>
|
||||||
|
<a name='L140'></a><a href='#L140'>140</a>
|
||||||
|
<a name='L141'></a><a href='#L141'>141</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div>
|
||||||
|
<h2><span @click="() => this.$router.push('/')">◀</span> Details</h2>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<img :src="fruit.image" :alt="fruit.name" />
|
||||||
|
<section>
|
||||||
|
<DeleteItem v-if="deleteMode" :item="fruit" :redirect="() => $router.push('/')" />
|
||||||
|
<h3>
|
||||||
|
{{ fruit.name }}
|
||||||
|
<span class="tag" :style="{ backgroundColor: fruit.color }">{{ fruit.taste }}</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>{{ fruit.description }}</p>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<p class="price">${{ fruit.price | noDecimal }}</p>
|
||||||
|
<div class="alert">
|
||||||
|
{{ "This offer " + expirationState }} {{ fruit.expires | moment("from", "now") }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import { mapState } from "vuex";</span>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "FruitDetails",
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > components: { DeleteItem: () => import("@/components/Grid/DeleteItem") },</span></span>
|
||||||
|
<span class="fstat-no" title="function not covered" > data() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
||||||
|
modalOpen: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
<span class="fstat-no" title="function not covered" > noDecimal(value) {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return parseInt(value).toFixed();</span>
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["fruit", "deleteMode"]),
|
||||||
|
<span class="fstat-no" title="function not covered" > expirationState() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return new Date(this.fruit.expires) < new Date() ? "expired" : "expires";</span>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
h2 span {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-flow: column;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: scale-down;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
padding: 1.5rem 2rem;
|
||||||
|
background-color: @color-2;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-bottom: 0.55rem;
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100px;
|
||||||
|
color: #cece;
|
||||||
|
margin: 1.35rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 485px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-height: 435px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-right: 1.5rem;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
background: linear-gradient(112.4deg, #1c9797 11.05%, #147171 89.93%);
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
265
coverage/lcov-report/views/Fruits.vue.html
Normal file
265
coverage/lcov-report/views/Fruits.vue.html
Normal file
@@ -0,0 +1,265 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for views/Fruits.vue</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> / <a href="index.html">views</a> Fruits.vue</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/4</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">100% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/0</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/4</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/4</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<pre><table class="coverage">
|
||||||
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
||||||
|
<a name='L2'></a><a href='#L2'>2</a>
|
||||||
|
<a name='L3'></a><a href='#L3'>3</a>
|
||||||
|
<a name='L4'></a><a href='#L4'>4</a>
|
||||||
|
<a name='L5'></a><a href='#L5'>5</a>
|
||||||
|
<a name='L6'></a><a href='#L6'>6</a>
|
||||||
|
<a name='L7'></a><a href='#L7'>7</a>
|
||||||
|
<a name='L8'></a><a href='#L8'>8</a>
|
||||||
|
<a name='L9'></a><a href='#L9'>9</a>
|
||||||
|
<a name='L10'></a><a href='#L10'>10</a>
|
||||||
|
<a name='L11'></a><a href='#L11'>11</a>
|
||||||
|
<a name='L12'></a><a href='#L12'>12</a>
|
||||||
|
<a name='L13'></a><a href='#L13'>13</a>
|
||||||
|
<a name='L14'></a><a href='#L14'>14</a>
|
||||||
|
<a name='L15'></a><a href='#L15'>15</a>
|
||||||
|
<a name='L16'></a><a href='#L16'>16</a>
|
||||||
|
<a name='L17'></a><a href='#L17'>17</a>
|
||||||
|
<a name='L18'></a><a href='#L18'>18</a>
|
||||||
|
<a name='L19'></a><a href='#L19'>19</a>
|
||||||
|
<a name='L20'></a><a href='#L20'>20</a>
|
||||||
|
<a name='L21'></a><a href='#L21'>21</a>
|
||||||
|
<a name='L22'></a><a href='#L22'>22</a>
|
||||||
|
<a name='L23'></a><a href='#L23'>23</a>
|
||||||
|
<a name='L24'></a><a href='#L24'>24</a>
|
||||||
|
<a name='L25'></a><a href='#L25'>25</a>
|
||||||
|
<a name='L26'></a><a href='#L26'>26</a>
|
||||||
|
<a name='L27'></a><a href='#L27'>27</a>
|
||||||
|
<a name='L28'></a><a href='#L28'>28</a>
|
||||||
|
<a name='L29'></a><a href='#L29'>29</a>
|
||||||
|
<a name='L30'></a><a href='#L30'>30</a>
|
||||||
|
<a name='L31'></a><a href='#L31'>31</a>
|
||||||
|
<a name='L32'></a><a href='#L32'>32</a>
|
||||||
|
<a name='L33'></a><a href='#L33'>33</a>
|
||||||
|
<a name='L34'></a><a href='#L34'>34</a>
|
||||||
|
<a name='L35'></a><a href='#L35'>35</a>
|
||||||
|
<a name='L36'></a><a href='#L36'>36</a>
|
||||||
|
<a name='L37'></a><a href='#L37'>37</a>
|
||||||
|
<a name='L38'></a><a href='#L38'>38</a>
|
||||||
|
<a name='L39'></a><a href='#L39'>39</a>
|
||||||
|
<a name='L40'></a><a href='#L40'>40</a>
|
||||||
|
<a name='L41'></a><a href='#L41'>41</a>
|
||||||
|
<a name='L42'></a><a href='#L42'>42</a>
|
||||||
|
<a name='L43'></a><a href='#L43'>43</a>
|
||||||
|
<a name='L44'></a><a href='#L44'>44</a>
|
||||||
|
<a name='L45'></a><a href='#L45'>45</a>
|
||||||
|
<a name='L46'></a><a href='#L46'>46</a>
|
||||||
|
<a name='L47'></a><a href='#L47'>47</a>
|
||||||
|
<a name='L48'></a><a href='#L48'>48</a>
|
||||||
|
<a name='L49'></a><a href='#L49'>49</a>
|
||||||
|
<a name='L50'></a><a href='#L50'>50</a>
|
||||||
|
<a name='L51'></a><a href='#L51'>51</a>
|
||||||
|
<a name='L52'></a><a href='#L52'>52</a>
|
||||||
|
<a name='L53'></a><a href='#L53'>53</a>
|
||||||
|
<a name='L54'></a><a href='#L54'>54</a>
|
||||||
|
<a name='L55'></a><a href='#L55'>55</a>
|
||||||
|
<a name='L56'></a><a href='#L56'>56</a>
|
||||||
|
<a name='L57'></a><a href='#L57'>57</a>
|
||||||
|
<a name='L58'></a><a href='#L58'>58</a>
|
||||||
|
<a name='L59'></a><a href='#L59'>59</a>
|
||||||
|
<a name='L60'></a><a href='#L60'>60</a>
|
||||||
|
<a name='L61'></a><a href='#L61'>61</a>
|
||||||
|
<a name='L62'></a><a href='#L62'>62</a>
|
||||||
|
<a name='L63'></a><a href='#L63'>63</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-no"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span>
|
||||||
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js"><template>
|
||||||
|
<div class="fruits">
|
||||||
|
<h2>Directory</h2>
|
||||||
|
<Grid v-if="!error" :data="this.fruits" />
|
||||||
|
<div class="alert" v-else>
|
||||||
|
{{ error }}
|
||||||
|
<pre><span>$</span> yarn run api</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
<span class="cstat-no" title="statement not covered" >import { mapState } from "vuex";</span>
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Fruits",
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > components: { Grid: () => import("@/components/Grid/Grid") },</span></span>
|
||||||
|
computed: {
|
||||||
|
...mapState(["fruits"])
|
||||||
|
},
|
||||||
|
<span class="fstat-no" title="function not covered" > data() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
||||||
|
error: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
<span class="fstat-no" title="function not covered" > async created() {</span>
|
||||||
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" > await this.$store.dispatch("getFruits").catch(err => (this.error = err));</span></span>
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.fruits {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80%;
|
||||||
|
background-color: @text-error;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 535px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgb(45, 48, 55);
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</pre></td></tr></table></pre>
|
||||||
|
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
125
coverage/lcov-report/views/index.html
Normal file
125
coverage/lcov-report/views/index.html
Normal file
@@ -0,0 +1,125 @@
|
|||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<title>Code coverage report for views</title>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="stylesheet" href="../prettify.css" />
|
||||||
|
<link rel="stylesheet" href="../base.css" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type='text/css'>
|
||||||
|
.coverage-summary .sorter {
|
||||||
|
background-image: url(../sort-arrow-sprite.png);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class='wrapper'>
|
||||||
|
<div class='pad1'>
|
||||||
|
<h1><a href="../index.html">All files</a> views</h1>
|
||||||
|
<div class='clearfix'>
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Statements</span>
|
||||||
|
<span class='fraction'>0/9</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Branches</span>
|
||||||
|
<span class='fraction'>0/2</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Functions</span>
|
||||||
|
<span class='fraction'>0/8</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class='fl pad1y space-right2'>
|
||||||
|
<span class="strong">0% </span>
|
||||||
|
<span class="quiet">Lines</span>
|
||||||
|
<span class='fraction'>0/9</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<p class="quiet">
|
||||||
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class='status-line low'></div>
|
||||||
|
<div class="pad1">
|
||||||
|
<table class="coverage-summary">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
|
||||||
|
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
|
||||||
|
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
|
||||||
|
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
|
||||||
|
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
|
||||||
|
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
|
||||||
|
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody><tr>
|
||||||
|
<td class="file low" data-value="Fruit.vue"><a href="Fruit.vue.html">Fruit.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="5" class="abs low">0/5</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="2" class="abs low">0/2</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="4" class="abs low">0/4</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="5" class="abs low">0/5</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="file low" data-value="Fruits.vue"><a href="Fruits.vue.html">Fruits.vue</a></td>
|
||||||
|
<td data-value="0" class="pic low">
|
||||||
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
||||||
|
</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="4" class="abs low">0/4</td>
|
||||||
|
<td data-value="100" class="pct high">100%</td>
|
||||||
|
<td data-value="0" class="abs high">0/0</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="4" class="abs low">0/4</td>
|
||||||
|
<td data-value="0" class="pct low">0%</td>
|
||||||
|
<td data-value="4" class="abs low">0/4</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class='push'></div><!-- for sticky footer -->
|
||||||
|
</div><!-- /wrapper -->
|
||||||
|
<div class='footer quiet pad2 space-top1 center small'>
|
||||||
|
Code coverage generated by
|
||||||
|
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
||||||
|
at Tue Dec 08 2020 18:03:10 GMT+0100 (Central European Standard Time)
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script src="../prettify.js"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function () {
|
||||||
|
prettyPrint();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<script src="../sorter.js"></script>
|
||||||
|
<script src="../block-navigation.js"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
185
coverage/lcov.info
Normal file
185
coverage/lcov.info
Normal file
@@ -0,0 +1,185 @@
|
|||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/AddFruit.vue
|
||||||
|
FN:95,(anonymous_1)
|
||||||
|
FN:103,(anonymous_2)
|
||||||
|
FN:107,(anonymous_3)
|
||||||
|
FN:111,(anonymous_4)
|
||||||
|
FN:113,(anonymous_5)
|
||||||
|
FNF:5
|
||||||
|
FNH:5
|
||||||
|
FNDA:5,(anonymous_1)
|
||||||
|
FNDA:5,(anonymous_2)
|
||||||
|
FNDA:1,(anonymous_3)
|
||||||
|
FNDA:1,(anonymous_4)
|
||||||
|
FNDA:1,(anonymous_5)
|
||||||
|
DA:90,1
|
||||||
|
DA:96,5
|
||||||
|
DA:104,5
|
||||||
|
DA:105,5
|
||||||
|
DA:108,1
|
||||||
|
DA:112,1
|
||||||
|
DA:113,2
|
||||||
|
DA:116,1
|
||||||
|
LF:8
|
||||||
|
LH:8
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Header.vue
|
||||||
|
FNF:0
|
||||||
|
FNH:0
|
||||||
|
DA:28,1
|
||||||
|
LF:1
|
||||||
|
LH:1
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageSkeleton.vue
|
||||||
|
FNF:0
|
||||||
|
FNH:0
|
||||||
|
DA:13,0
|
||||||
|
LF:1
|
||||||
|
LH:0
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Form/ImageUnsplash/ImageUnsplash.vue
|
||||||
|
FN:37,(anonymous_1)
|
||||||
|
FN:57,(anonymous_3)
|
||||||
|
FN:67,(anonymous_4)
|
||||||
|
FN:70,(anonymous_5)
|
||||||
|
FN:75,(anonymous_6)
|
||||||
|
FNF:5
|
||||||
|
FNH:0
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
FNDA:0,(anonymous_3)
|
||||||
|
FNDA:0,(anonymous_4)
|
||||||
|
FNDA:0,(anonymous_5)
|
||||||
|
FNDA:0,(anonymous_6)
|
||||||
|
DA:32,1
|
||||||
|
DA:37,0
|
||||||
|
DA:58,0
|
||||||
|
DA:68,0
|
||||||
|
DA:69,0
|
||||||
|
DA:70,0
|
||||||
|
DA:73,0
|
||||||
|
DA:74,0
|
||||||
|
DA:75,0
|
||||||
|
DA:77,0
|
||||||
|
LF:10
|
||||||
|
LH:1
|
||||||
|
BRDA:69,0,0,0
|
||||||
|
BRDA:69,0,1,0
|
||||||
|
BRF:2
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Grid/DeleteItem.vue
|
||||||
|
FN:23,(anonymous_1)
|
||||||
|
FN:26,(anonymous_2)
|
||||||
|
FN:32,(anonymous_3)
|
||||||
|
FN:35,(anonymous_4)
|
||||||
|
FN:36,(anonymous_5)
|
||||||
|
FNF:5
|
||||||
|
FNH:0
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
FNDA:0,(anonymous_2)
|
||||||
|
FNDA:0,(anonymous_3)
|
||||||
|
FNDA:0,(anonymous_4)
|
||||||
|
FNDA:0,(anonymous_5)
|
||||||
|
DA:27,0
|
||||||
|
DA:33,0
|
||||||
|
DA:36,0
|
||||||
|
LF:3
|
||||||
|
LH:0
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Grid/Grid.vue
|
||||||
|
FN:23,(anonymous_1)
|
||||||
|
FNF:1
|
||||||
|
FNH:0
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
DA:16,0
|
||||||
|
DA:17,0
|
||||||
|
DA:23,0
|
||||||
|
LF:3
|
||||||
|
LH:0
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Grid/GridItem.vue
|
||||||
|
FN:27,(anonymous_1)
|
||||||
|
FN:35,(anonymous_3)
|
||||||
|
FNF:2
|
||||||
|
FNH:1
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
FNDA:2,(anonymous_3)
|
||||||
|
DA:23,1
|
||||||
|
DA:27,0
|
||||||
|
DA:36,2
|
||||||
|
LF:3
|
||||||
|
LH:2
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/components/Grid/GridItemSkeleton.vue
|
||||||
|
FNF:0
|
||||||
|
FNH:0
|
||||||
|
DA:16,0
|
||||||
|
LF:1
|
||||||
|
LH:0
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/views/Fruit.vue
|
||||||
|
FN:32,(anonymous_1)
|
||||||
|
FN:33,(anonymous_3)
|
||||||
|
FN:39,(anonymous_4)
|
||||||
|
FN:45,(anonymous_5)
|
||||||
|
FNF:4
|
||||||
|
FNH:0
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
FNDA:0,(anonymous_3)
|
||||||
|
FNDA:0,(anonymous_4)
|
||||||
|
FNDA:0,(anonymous_5)
|
||||||
|
DA:28,0
|
||||||
|
DA:32,0
|
||||||
|
DA:34,0
|
||||||
|
DA:40,0
|
||||||
|
DA:46,0
|
||||||
|
LF:5
|
||||||
|
LH:0
|
||||||
|
BRDA:46,0,0,0
|
||||||
|
BRDA:46,0,1,0
|
||||||
|
BRF:2
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
|
TN:
|
||||||
|
SF:/Users/viricel/Sites/fruit-project/src/views/Fruits.vue
|
||||||
|
FN:17,(anonymous_1)
|
||||||
|
FN:21,(anonymous_3)
|
||||||
|
FN:26,(anonymous_4)
|
||||||
|
FN:27,(anonymous_5)
|
||||||
|
FNF:4
|
||||||
|
FNH:0
|
||||||
|
FNDA:0,(anonymous_1)
|
||||||
|
FNDA:0,(anonymous_3)
|
||||||
|
FNDA:0,(anonymous_4)
|
||||||
|
FNDA:0,(anonymous_5)
|
||||||
|
DA:13,0
|
||||||
|
DA:17,0
|
||||||
|
DA:22,0
|
||||||
|
DA:27,0
|
||||||
|
LF:4
|
||||||
|
LH:0
|
||||||
|
BRF:0
|
||||||
|
BRH:0
|
||||||
|
end_of_record
|
||||||
3
cypress.json
Normal file
3
cypress.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"pluginsFile": "tests/e2e/plugins/index.js"
|
||||||
|
}
|
||||||
15
jest.config.js
Normal file
15
jest.config.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
module.exports = {
|
||||||
|
preset: "@vue/cli-plugin-unit-jest",
|
||||||
|
moduleNameMapper: {
|
||||||
|
"^@/(.*)$": "<rootDir>/src/$1",
|
||||||
|
"^~/(.*)$": "<rootDir>/src/$1",
|
||||||
|
"^vue$": "vue/dist/vue.common.js"
|
||||||
|
},
|
||||||
|
moduleFileExtensions: ["js", "vue", "json"],
|
||||||
|
transform: {
|
||||||
|
"^.+\\.js$": "babel-jest",
|
||||||
|
".*\\.(vue)$": "vue-jest"
|
||||||
|
},
|
||||||
|
collectCoverage: true,
|
||||||
|
collectCoverageFrom: ["<rootDir>/src/components/**/*.vue", "<rootDir>/src/views/**/*.vue"]
|
||||||
|
};
|
||||||
43
package.json
Normal file
43
package.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "fruit-project",
|
||||||
|
"description": "A test project for Cycloid.io.",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"serve": "vue-cli-service serve",
|
||||||
|
"build": "vue-cli-service build",
|
||||||
|
"test:unit": "vue-cli-service test:unit",
|
||||||
|
"test:e2e": "vue-cli-service test:e2e",
|
||||||
|
"lint": "vue-cli-service lint",
|
||||||
|
"api": "fruit-api"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"axios": "^0.21.0",
|
||||||
|
"core-js": "^3.6.5",
|
||||||
|
"fruit-api": "^1.1.3",
|
||||||
|
"vue": "^2.6.11",
|
||||||
|
"vue-content-loading": "^1.6.0",
|
||||||
|
"vue-moment": "^4.1.0",
|
||||||
|
"vue-router": "^3.2.0",
|
||||||
|
"vuex": "^3.4.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vue/cli-plugin-babel": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-e2e-cypress": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-router": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-unit-jest": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||||
|
"@vue/cli-service": "~4.5.0",
|
||||||
|
"@vue/test-utils": "^1.0.3",
|
||||||
|
"babel-eslint": "^10.1.0",
|
||||||
|
"eslint": "^6.7.2",
|
||||||
|
"eslint-config-prettier": "^6.15.0",
|
||||||
|
"eslint-plugin-import": "^2.20.2",
|
||||||
|
"eslint-plugin-prettier": "^3.2.0",
|
||||||
|
"eslint-plugin-vue": "^6.2.2",
|
||||||
|
"less": "^3.12.2",
|
||||||
|
"less-loader": "^7.1.0",
|
||||||
|
"vue-template-compiler": "^2.6.11"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
public/_redirects
Normal file
2
public/_redirects
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
# Netlify settings for single-page application
|
||||||
|
/* /index.html 200
|
||||||
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
17
public/index.html
Normal file
17
public/index.html
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||||
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>
|
||||||
|
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||||
|
</noscript>
|
||||||
|
<div id="app"></div>
|
||||||
|
<!-- built files will be auto injected -->
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
75
src/App.vue
Normal file
75
src/App.vue
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
<template>
|
||||||
|
<div id="app">
|
||||||
|
<Header />
|
||||||
|
<main>
|
||||||
|
<router-view />
|
||||||
|
</main>
|
||||||
|
<AddFruit v-if="modalIsOpen" />
|
||||||
|
<Footer />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
import Footer from "@/components/Footer";
|
||||||
|
import Header from "@/components/Header";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "App",
|
||||||
|
components: {
|
||||||
|
Footer,
|
||||||
|
Header,
|
||||||
|
AddFruit: () => import("@/components/AddFruit")
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["modalIsOpen"])
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
#app {
|
||||||
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
color: @text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:visited {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body.is-overlayed {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
padding: 2rem 1rem;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='%230c9696' fill-opacity='0.35'%3E%3Cpath fill-rule='evenodd' d='M29.42 29.41c.36-.36.58-.85.58-1.4V0h-4v26H0v4h28c.55 0 1.05-.22 1.41-.58h.01zm0 29.18c.36.36.58.86.58 1.4V88h-4V62H0v-4h28c.56 0 1.05.22 1.41.58zm29.16 0c-.36.36-.58.85-.58 1.4V88h4V62h26v-4H60c-.55 0-1.05.22-1.41.58h-.01zM62 26V0h-4v28c0 .55.22 1.05.58 1.41.37.37.86.59 1.41.59H88v-4H62zM18 36c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm16-26a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 58a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 78a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zM34 4a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm-8 82a2 2 0 1 1 4 0v2h-4v-2zm0-68a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V18zM66 4a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm0 72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm-48 0a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm0-72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm24-4h4v2a2 2 0 1 1-4 0V0zm0 60a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V60zm14-24c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm-28-6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm8 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM36 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-8-8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 68a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-34a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-12a2 2 0 1 0 0 4 6 6 0 1 1 0 12 2 2 0 1 0 0 4 10 10 0 1 0 0-20zm-64 0a2 2 0 1 1 0 4 6 6 0 1 0 0 12 2 2 0 1 1 0 4 10 10 0 1 1 0-20zm56-12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-48 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm24 32a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-4a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm36-36a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM10 44c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm56 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm8 24c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zM3 68c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm0-48c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm71 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm6 66a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 86a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-68A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm36 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-color: rgba(0, 0, 0, 0.06);
|
||||||
|
min-height: calc(100vh - @headerHeight - @footerHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 0 auto 1em auto;
|
||||||
|
width: max-content;
|
||||||
|
padding: 0.85rem 2rem 0.75rem 2rem;
|
||||||
|
border-radius: 25px;
|
||||||
|
font-size: 28px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-transform: capitalize;
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
293
src/assets/less/reset.less
Normal file
293
src/assets/less/reset.less
Normal file
@@ -0,0 +1,293 @@
|
|||||||
|
/*! normalize.css v3.0.1 | MIT License | git.io/normalize */
|
||||||
|
|
||||||
|
// * 1. Set default font family to sans-serif.
|
||||||
|
// * 2. Prevent iOS text size adjust after orientation change, without disabling user zoom.
|
||||||
|
html {
|
||||||
|
font-family: sans-serif;
|
||||||
|
-ms-text-size-adjust: 100%;
|
||||||
|
-webkit-text-size-adjust: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove default margin.
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// HTML5 display definitions ==========================================================================
|
||||||
|
// * Correct `block` display not defined for any HTML5 element in IE 8/9.
|
||||||
|
// * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
|
||||||
|
// * Correct `block` display not defined for `main` in IE 11.
|
||||||
|
article,
|
||||||
|
aside,
|
||||||
|
details,
|
||||||
|
figcaption,
|
||||||
|
figure,
|
||||||
|
footer,
|
||||||
|
header,
|
||||||
|
hgroup,
|
||||||
|
main,
|
||||||
|
nav,
|
||||||
|
section,
|
||||||
|
summary {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * 1. Correct `inline-block` display not defined in IE 8/9.
|
||||||
|
// * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
||||||
|
audio,
|
||||||
|
canvas,
|
||||||
|
progress,
|
||||||
|
video {
|
||||||
|
display: inline-block;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Prevent modern browsers from displaying `audio` without controls.
|
||||||
|
// * Remove excess height in iOS 5 devices.
|
||||||
|
audio:not([controls]) {
|
||||||
|
display: none;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address `[hidden]` styling not present in IE 8/9/10.
|
||||||
|
// * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
|
||||||
|
[hidden],
|
||||||
|
template {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Links ==========================================================================
|
||||||
|
// * Remove the gray background color from active links in IE 10.
|
||||||
|
a {
|
||||||
|
background: transparent;
|
||||||
|
// * Improve readability when focused and also mouse hovered in all browsers.
|
||||||
|
&:active,
|
||||||
|
&:hover {
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Text-level semantics ==========================================================================
|
||||||
|
|
||||||
|
// * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
||||||
|
abbr[title] {
|
||||||
|
border-bottom: 1px dotted;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
|
||||||
|
b,
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address styling not present in Safari and Chrome.
|
||||||
|
dfn {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari, and Chrome.
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
margin: 0.67em 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address styling not present in IE 8/9.
|
||||||
|
mark {
|
||||||
|
background: #ff0;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address inconsistent and variable font size in all browsers.
|
||||||
|
small {
|
||||||
|
font-size: 80%;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||||
|
sub,
|
||||||
|
sup {
|
||||||
|
font-size: 75%;
|
||||||
|
line-height: 0;
|
||||||
|
position: relative;
|
||||||
|
vertical-align: baseline;
|
||||||
|
}
|
||||||
|
|
||||||
|
sup {
|
||||||
|
top: -0.5em;
|
||||||
|
}
|
||||||
|
sub {
|
||||||
|
bottom: -0.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Embedded content ==========================================================================
|
||||||
|
// * Remove border when inside `a` element in IE 8/9/10.
|
||||||
|
img {
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Correct overflow not hidden in IE 9/10/11.
|
||||||
|
svg:not(:root) {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Grouping content ==========================================================================
|
||||||
|
// * Address margin not present in IE 8/9 and Safari.
|
||||||
|
figure {
|
||||||
|
margin: 1em 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address differences between Firefox and other browsers.
|
||||||
|
hr {
|
||||||
|
box-sizing: content-box;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Contain overflow in all browsers.
|
||||||
|
pre {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address odd `em`-unit font size rendering in all browsers.
|
||||||
|
code,
|
||||||
|
kbd,
|
||||||
|
pre,
|
||||||
|
samp {
|
||||||
|
font-family: monospace, monospace;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Forms ==========================================================================
|
||||||
|
// * Known limitation: by default, Chrome and Safari on OS X allow very limited
|
||||||
|
// * styling of `select`, unless a `border` property is set.
|
||||||
|
|
||||||
|
// * 1. Correct color not being inherited.
|
||||||
|
// * Known issue: affects color of disabled elements.
|
||||||
|
// * 2. Correct font properties not being inherited.
|
||||||
|
// * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
||||||
|
button,
|
||||||
|
input,
|
||||||
|
optgroup,
|
||||||
|
select,
|
||||||
|
textarea {
|
||||||
|
color: inherit;
|
||||||
|
font: inherit;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address `overflow` set to `hidden` in IE 8/9/10/11.
|
||||||
|
button {
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||||
|
// * All other form control elements do not inherit `text-transform` values.
|
||||||
|
// * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
||||||
|
// * Correct `select` style inheritance in Firefox.
|
||||||
|
button,
|
||||||
|
select {
|
||||||
|
text-transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
|
||||||
|
// * 2. Correct inability to style clickable `input` types in iOS.
|
||||||
|
// * 3. Improve usability and consistency of cursor style between image-type `input` and others.
|
||||||
|
button,
|
||||||
|
html input[type="button"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Re-set default cursor for disabled elements.
|
||||||
|
button[disabled],
|
||||||
|
html input[disabled] {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Remove inner padding and border in Firefox 4+.
|
||||||
|
button input {
|
||||||
|
&::-moz-focus-inner {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet.
|
||||||
|
input {
|
||||||
|
line-height: normal;
|
||||||
|
&[type="reset"],
|
||||||
|
&[type="submit"] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * It's recommended that you don't attempt to style these elements.
|
||||||
|
// * Firefox's implementation doesn't respect box-sizing, padding, or width.
|
||||||
|
// * 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||||
|
// * 2. Remove excess padding in IE 8/9/10.
|
||||||
|
&[type="checkbox"],
|
||||||
|
&[type="radio"] {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
||||||
|
// * `font-size` values of the `input`, it causes the cursor style of the
|
||||||
|
// * decrement button to change from `default` to `text`.
|
||||||
|
&[type="number"] {
|
||||||
|
&::-webkit-inner-spin-button,
|
||||||
|
&::-webkit-outer-spin-button {
|
||||||
|
height: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
||||||
|
// * 2. Address `box-sizing` set to `border-box` in Safari and Chrome (include `-moz` to future-proof).
|
||||||
|
&[type="search"] {
|
||||||
|
-webkit-appearance: textfield;
|
||||||
|
box-sizing: content-box;
|
||||||
|
|
||||||
|
// * Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
||||||
|
// * Safari (but not Chrome) clips the cancel button when the search input has
|
||||||
|
// * padding (and `textfield` appearance).
|
||||||
|
&::-webkit-search-cancel-button,
|
||||||
|
&::-webkit-search-decoration {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Define consistent border, margin, and padding.
|
||||||
|
fieldset {
|
||||||
|
border: 1px solid #c0c0c0;
|
||||||
|
margin: 0 2px;
|
||||||
|
padding: 0.35em 0.625em 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * 1. Correct `color` not being inherited in IE 8/9/10/11.
|
||||||
|
// * 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||||
|
legend {
|
||||||
|
border: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Remove default vertical scrollbar in IE 8/9/10/11.
|
||||||
|
textarea {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
// * Don't inherit the `font-weight` (applied by a rule above).
|
||||||
|
// * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
||||||
|
optgroup {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tables ==========================================================================
|
||||||
|
// * Remove most spacing between table cells.
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
border-spacing: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td,
|
||||||
|
th {
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
19
src/assets/less/variables.less
Normal file
19
src/assets/less/variables.less
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
@color-1: #0c9696;
|
||||||
|
@color-2: #ffffff;
|
||||||
|
@color-3: #ff9700;
|
||||||
|
@text-color: #333;
|
||||||
|
@text-error: #d63031;
|
||||||
|
|
||||||
|
@headerHeight: 58px;
|
||||||
|
@footerHeight: 58px;
|
||||||
|
|
||||||
|
@sm: 640px;
|
||||||
|
// => @media (min-width: 640px) { ... }
|
||||||
|
@md: 768px;
|
||||||
|
// => @media (min-width: 768px) { ... }
|
||||||
|
@lg: 1024px;
|
||||||
|
// => @media (min-width: 1024px) { ... }
|
||||||
|
@xl: 1280px;
|
||||||
|
// => @media (min-width: 1280px) { ... }
|
||||||
|
@2xl: 1536px;
|
||||||
|
// => @media (min-width: 1536px) { ... }
|
||||||
214
src/components/AddFruit.vue
Normal file
214
src/components/AddFruit.vue
Normal file
@@ -0,0 +1,214 @@
|
|||||||
|
<template>
|
||||||
|
<div class="modal">
|
||||||
|
<h2>New Fruit</h2>
|
||||||
|
<form id="new-fruit" @submit.prevent="checkForm">
|
||||||
|
<!-- name -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-name">Name</label>
|
||||||
|
<input
|
||||||
|
id="fruit-name"
|
||||||
|
ref="autofocus"
|
||||||
|
type="text"
|
||||||
|
v-model="fruit.name"
|
||||||
|
placeholder="Ex: Banana"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- image finder (with Unsplash API) -->
|
||||||
|
<ImageUnsplash
|
||||||
|
@getValue="url => (fruit.image = url)"
|
||||||
|
label="Image"
|
||||||
|
containerClass="form-field"
|
||||||
|
placeholder="Search: strawberry, apple ..."
|
||||||
|
:required="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<!-- taste -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-taste">Taste</label>
|
||||||
|
<input
|
||||||
|
id="fruit-taste"
|
||||||
|
type="text"
|
||||||
|
v-model="fruit.taste"
|
||||||
|
placeholder="Ex: sweet"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- color -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-color">Color</label>
|
||||||
|
<input id="fruit-color" type="color" v-model="fruit.color" placeholder="Color" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<!-- price -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-price">Price ($)</label>
|
||||||
|
<input
|
||||||
|
id="fruit-price"
|
||||||
|
type="number"
|
||||||
|
v-model="fruit.price"
|
||||||
|
placeholder="Ex: $13"
|
||||||
|
required
|
||||||
|
min="0"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- expires -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-expires">Expiration Date</label>
|
||||||
|
<input id="fruit-expires" type="date" v-model="fruit.expires" required />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- description -->
|
||||||
|
<div class="form-field">
|
||||||
|
<label for="fruit-description">Description</label>
|
||||||
|
<textarea
|
||||||
|
id="fruit-description"
|
||||||
|
v-model="fruit.description"
|
||||||
|
placeholder="Ex: malesuada pellentesque elit eget ..."
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<button class="btn btn--cancel" type="button" @click="() => $store.commit('toggleModal')">
|
||||||
|
Cancel
|
||||||
|
</button>
|
||||||
|
<button class="btn btn--success" type="submit">Save</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ImageUnsplash from "./Form/ImageUnsplash/ImageUnsplash";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AddFruit",
|
||||||
|
components: { ImageUnsplash },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
fruit: {
|
||||||
|
color: "#000000",
|
||||||
|
isFruit: true
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.$refs["autofocus"].focus();
|
||||||
|
document.body.classList.add("is-overlayed");
|
||||||
|
},
|
||||||
|
destroyed() {
|
||||||
|
document.body.classList.remove("is-overlayed");
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async checkForm(e) {
|
||||||
|
this.fruit.expires = new Date(this.fruit.expires);
|
||||||
|
await this.$store
|
||||||
|
.dispatch("addFruit", this.fruit)
|
||||||
|
.then(() => this.$store.commit("toggleModal"));
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.modal {
|
||||||
|
position: fixed;
|
||||||
|
top: @headerHeight;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
padding: 1rem;
|
||||||
|
z-index: 14;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
form {
|
||||||
|
border: 2px solid @color-1;
|
||||||
|
border-radius: 10px;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88' viewBox='0 0 88 88'%3E%3Cg fill='%230c9696' fill-opacity='0.35'%3E%3Cpath fill-rule='evenodd' d='M29.42 29.41c.36-.36.58-.85.58-1.4V0h-4v26H0v4h28c.55 0 1.05-.22 1.41-.58h.01zm0 29.18c.36.36.58.86.58 1.4V88h-4V62H0v-4h28c.56 0 1.05.22 1.41.58zm29.16 0c-.36.36-.58.85-.58 1.4V88h4V62h26v-4H60c-.55 0-1.05.22-1.41.58h-.01zM62 26V0h-4v28c0 .55.22 1.05.58 1.41.37.37.86.59 1.41.59H88v-4H62zM18 36c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H20a2 2 0 0 1-2-2zm16-26a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 58a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v4a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-4zM34 78a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-6zM34 4a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm16 0a2 2 0 0 1 2-2 2 2 0 0 1 2 2v6a2 2 0 0 1-2 2 2 2 0 0 1-2-2V4zm-8 82a2 2 0 1 1 4 0v2h-4v-2zm0-68a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V18zM66 4a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm0 72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm-48 0a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0v-8zm0-72a2 2 0 1 1 4 0v8a2 2 0 1 1-4 0V4zm24-4h4v2a2 2 0 1 1-4 0V0zm0 60a2 2 0 1 1 4 0v10a2 2 0 1 1-4 0V60zm14-24c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm0 16c0-1.1.9-2 2-2h10a2 2 0 1 1 0 4H58a2 2 0 0 1-2-2zm-28-6a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm8 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM36 20a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-8-8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 68a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-34a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm16-12a2 2 0 1 0 0 4 6 6 0 1 1 0 12 2 2 0 1 0 0 4 10 10 0 1 0 0-20zm-64 0a2 2 0 1 1 0 4 6 6 0 1 0 0 12 2 2 0 1 1 0 4 10 10 0 1 1 0-20zm56-12a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm-48 0a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-48a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm24 32a10 10 0 1 1 0-20 10 10 0 0 1 0 20zm0-4a6 6 0 1 0 0-12 6 6 0 0 0 0 12zm36-36a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM10 44c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm56 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm8 24c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zM3 68c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm0-48c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4H5a2 2 0 0 1-2-2zm71 0c0-1.1.9-2 2-2h8a2 2 0 1 1 0 4h-8a2 2 0 0 1-2-2zm6 66a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zM8 86a6 6 0 1 1 0-12 6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0-68A6 6 0 1 1 8 2a6 6 0 0 1 0 12zm0-4a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm36 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4z'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
background-attachment: scroll;
|
||||||
|
background-color: rgba(0, 0, 0, 0.06);
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
padding: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 425px;
|
||||||
|
margin: 0 auto 2rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="color"] {
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
background-color: @color-2;
|
||||||
|
margin: 1rem 0;
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea,
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: lighten(@text-color, 70%);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
color: darken(@color-1, 20%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.form-group {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 1rem 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
|
||||||
|
.form-field {
|
||||||
|
background-color: none;
|
||||||
|
margin: 0;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 0.5rem 1.35rem;
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
|
||||||
|
&--success {
|
||||||
|
background-color: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--cancel {
|
||||||
|
background-color: darken(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
30
src/components/Footer.vue
Normal file
30
src/components/Footer.vue
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<template>
|
||||||
|
<footer>
|
||||||
|
<p>
|
||||||
|
©2020 Made with <span style="color: red;">♥</span> by
|
||||||
|
<a href="https://wazo-lab.io" target="_blank">Wazo Lab</a>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
footer {
|
||||||
|
background-color: #111111;
|
||||||
|
color: @color-2;
|
||||||
|
text-align: center;
|
||||||
|
line-height: @footerHeight;
|
||||||
|
height: @footerHeight;
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 0;
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: rgba(255, 152, 0, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
23
src/components/Form/ImageUnsplash/ImageSkeleton.vue
Normal file
23
src/components/Form/ImageUnsplash/ImageSkeleton.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<template>
|
||||||
|
<VueContentLoading
|
||||||
|
:style="{ backgroundColor: '#ffffff', padding: '1rem', borderRadius: '10px' }"
|
||||||
|
primary="#cecece"
|
||||||
|
:width="300"
|
||||||
|
:height="180"
|
||||||
|
>
|
||||||
|
<rect x="0" y="0" rx="4" ry="4" width="300" height="180" />
|
||||||
|
</VueContentLoading>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import VueContentLoading from "vue-content-loading";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ImageSkeleton",
|
||||||
|
components: {
|
||||||
|
VueContentLoading
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
132
src/components/Form/ImageUnsplash/ImageUnsplash.vue
Normal file
132
src/components/Form/ImageUnsplash/ImageUnsplash.vue
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="containerClass" class="image-unsplash">
|
||||||
|
<label for="search-unsplash">{{ label }}</label>
|
||||||
|
<!-- Loading placeholder -->
|
||||||
|
<ImageSkeleton v-if="loading" />
|
||||||
|
|
||||||
|
<!-- Image preview -->
|
||||||
|
<img
|
||||||
|
class="preview"
|
||||||
|
v-if="!loading && !error && preview"
|
||||||
|
:src="preview.urls.regular"
|
||||||
|
:alt="preview.alt_description"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- API error messages -->
|
||||||
|
<p class="error" v-if="error">{{ error }}</p>
|
||||||
|
|
||||||
|
<!-- Search input -->
|
||||||
|
<div class="search-box">
|
||||||
|
<input
|
||||||
|
id="search-unsplash"
|
||||||
|
type="search"
|
||||||
|
:placeholder="placeholder"
|
||||||
|
@change="handleSearch"
|
||||||
|
:required="required"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "ImageUnsplash",
|
||||||
|
components: {
|
||||||
|
ImageSkeleton: () => import("./ImageSkeleton")
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
containerClass: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
type: String,
|
||||||
|
default: "Image (from Unsplash)"
|
||||||
|
},
|
||||||
|
placeholder: {
|
||||||
|
type: String,
|
||||||
|
default: "Type anything !"
|
||||||
|
},
|
||||||
|
required: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
error: null,
|
||||||
|
preview: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["loading"])
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async handleSearch(e) {
|
||||||
|
this.error = null;
|
||||||
|
if (e.target.value != "") {
|
||||||
|
await this.$store
|
||||||
|
.dispatch("getImageFromUnsplash", e.target.value)
|
||||||
|
.then(res => {
|
||||||
|
this.preview = res;
|
||||||
|
this.$emit("getValue", res.urls.regular);
|
||||||
|
})
|
||||||
|
.catch(err => (this.error = err.message));
|
||||||
|
} else this.preview = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.image-unsplash {
|
||||||
|
.preview,
|
||||||
|
.skeleton {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.preview {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: scale-down;
|
||||||
|
height: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: @text-error;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-box {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
|
||||||
|
&:focus-within::after {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: url("data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 350.439 350.439' style='enable-background:new 0 0 350.439 350.439;' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M312.856,36.464H202.507c-4.87,0-8.83,3.961-8.83,8.832v138.422H52.371c-4.87,0-8.832,3.973-8.832,8.843v108.023 c0,4.87,3.961,8.831,8.832,8.831l260.474-0.071c4.873,0,8.838-3.962,8.838-8.843l0.011-255.211 C321.701,40.425,317.737,36.464,312.856,36.464z M175.216,253.617c0,5.724-4.635,10.353-10.356,10.353h-57.814 c-0.392,0-0.775-0.022-1.155-0.065v0.887l8.294,21.002c0.281,0.7,0.057,1.51-0.551,1.965c-0.301,0.229-0.658,0.344-1.013,0.344 c-0.364,0-0.722-0.12-1.025-0.355l-41.251-31.715c-0.416-0.318-0.657-0.816-0.657-1.33c0-0.531,0.241-1.023,0.657-1.345 l41.251-31.712c0.6-0.463,1.433-0.463,2.038-0.011c0.603,0.459,0.827,1.258,0.551,1.958l-7.776,19.694 c0.21-0.011,0.418-0.033,0.637-0.033h47.462v-34.715c0-5.724,4.637-10.353,10.352-10.353c5.721,0,10.356,4.629,10.356,10.353 V253.617z M332.215,7.41H174.623c-10.062,0-18.221,8.159-18.221,18.225v126.679H18.223C8.159,152.314,0,160.479,0,170.541v154.267 c0,10.063,8.159,18.222,18.223,18.222h157.588c0.346,0,0.667-0.087,1.008-0.099h155.375c10.065,0,18.228-8.164,18.228-18.232 V180.074c0-0.066,0.018-0.121,0.018-0.176V25.635C350.439,15.569,342.273,7.41,332.215,7.41z M329.535,300.512 c0,9.205-7.483,16.69-16.69,16.69H204.052c-0.078,0.043-0.383,0.076-0.705,0.076H52.371c-9.202,0-16.688-7.485-16.688-16.689 V192.571c0-9.209,7.485-16.689,16.688-16.689h133.453V45.295c0-9.201,7.485-16.687,16.684-16.687h110.349 c9.204,0,16.689,7.486,16.689,16.687L329.535,300.512z'/%3E%3C/g%3E%3C/svg%3E");
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: 50%;
|
||||||
|
right: 0.5rem;
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="search"] {
|
||||||
|
padding-right: 2.35rem;
|
||||||
|
border: none;
|
||||||
|
background-color: lighten(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[type="file"] {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
93
src/components/Grid/DeleteItem.vue
Normal file
93
src/components/Grid/DeleteItem.vue
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<button class="delete-btn" @click="showPrompt">
|
||||||
|
🚮
|
||||||
|
</button>
|
||||||
|
<div v-if="openPrompt" :class="{ open: openPrompt }" class="prompt">
|
||||||
|
<h3>You will delete '{{ item.name }}'?</h3>
|
||||||
|
<div class="actions">
|
||||||
|
<button class="btn btn--cancel" @click="openPrompt = false">No</button>
|
||||||
|
<button class="btn btn--success" @click="removeFruit(item.id)">Yes</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "DeleteItem",
|
||||||
|
props: {
|
||||||
|
item: Object,
|
||||||
|
redirect: {
|
||||||
|
type: Function,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
openPrompt: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showPrompt() {
|
||||||
|
this.openPrompt = true;
|
||||||
|
},
|
||||||
|
removeFruit(id) {
|
||||||
|
this.$store.dispatch("removeFruit", id).then(() => this.redirect());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.prompt {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 2;
|
||||||
|
background: rgb(230, 107, 107);
|
||||||
|
background: linear-gradient(90deg, rgba(230, 107, 107, 1) 0%, rgba(214, 48, 49, 1) 100%);
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
transition: all 0.4s ease-in-out;
|
||||||
|
color: @color-2;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&.open {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 0.5rem 1.35rem;
|
||||||
|
margin: 0 0.5rem;
|
||||||
|
|
||||||
|
&--success {
|
||||||
|
background-color: #2ecc71;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--cancel {
|
||||||
|
background-color: darken(#cecece, 15%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.delete-btn {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 55px;
|
||||||
|
padding: 0.75rem 0.75rem 1.35rem 1.35rem;
|
||||||
|
background: rgb(230, 107, 107);
|
||||||
|
background: linear-gradient(180deg, rgba(230, 107, 107, 0.6) 0%, rgba(214, 48, 49, 1) 100%);
|
||||||
|
border: none;
|
||||||
|
border-bottom-left-radius: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
82
src/components/Grid/Grid.vue
Normal file
82
src/components/Grid/Grid.vue
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<div :class="{ error: !loading && !data.length }" class="grid">
|
||||||
|
<!-- Loading placeholder -->
|
||||||
|
<GridItemSkeleton v-if="loading" />
|
||||||
|
<GridItemSkeleton v-if="loading" />
|
||||||
|
|
||||||
|
<!-- Items -->
|
||||||
|
<GridItem v-else :key="item.id" v-for="item in data" :item="item" />
|
||||||
|
|
||||||
|
<!-- Error messages -->
|
||||||
|
<p v-if="!loading && !data.length" class="alert"><b>💡 Restart API</b>: 0 fruits !</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
import GridItemSkeleton from "./GridItemSkeleton";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Grid",
|
||||||
|
components: {
|
||||||
|
GridItemSkeleton,
|
||||||
|
GridItem: () => import("./GridItem")
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
data: Array
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["loading"])
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
column-gap: 1rem;
|
||||||
|
row-gap: 1.5rem;
|
||||||
|
|
||||||
|
&.error {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @md) {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @lg) {
|
||||||
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @xl) {
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80%;
|
||||||
|
background-color: @color-3;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 535px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgb(45, 48, 55);
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
110
src/components/Grid/GridItem.vue
Normal file
110
src/components/Grid/GridItem.vue
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
<template>
|
||||||
|
<article class="grid-item">
|
||||||
|
<DeleteItem v-if="deleteMode" :item="item" />
|
||||||
|
<router-link :to="`/fruit/${item.id}`">
|
||||||
|
<div class="thumbnail">
|
||||||
|
<img :src="item.image" :alt="item.name" />
|
||||||
|
</div>
|
||||||
|
<section>
|
||||||
|
<h3>
|
||||||
|
{{ item.name }}
|
||||||
|
<span class="tag" :style="{ backgroundColor: item.color }">{{ item.taste }}</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<p class="price">${{ item.price | noDecimal }}</p>
|
||||||
|
</section>
|
||||||
|
</router-link>
|
||||||
|
</article>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "GridItem",
|
||||||
|
components: { DeleteItem: () => import("./DeleteItem") },
|
||||||
|
props: {
|
||||||
|
item: Object
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["deleteMode"])
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
noDecimal(value) {
|
||||||
|
return parseInt(value).toFixed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.grid-item {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
background-color: @color-2;
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
&:hover .thumbnail img {
|
||||||
|
transform: scale(1.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: block;
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
.thumbnail {
|
||||||
|
height: 285px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
|
||||||
|
img {
|
||||||
|
border-radius: 10px 10px 0 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
max-width: 100%;
|
||||||
|
transition: transform 0.4s ease-in-out;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 1.5rem 1rem;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: 0.55rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100px;
|
||||||
|
color: #cece;
|
||||||
|
margin: 1.35rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #ff9700;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
26
src/components/Grid/GridItemSkeleton.vue
Normal file
26
src/components/Grid/GridItemSkeleton.vue
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<template>
|
||||||
|
<VueContentLoading
|
||||||
|
:style="{ backgroundColor: '#ffffff', padding: '1rem', borderRadius: '10px' }"
|
||||||
|
primary="#cecece"
|
||||||
|
:width="300"
|
||||||
|
:height="220"
|
||||||
|
>
|
||||||
|
<rect x="0" y="0" rx="4" ry="4" width="100%" height="100" />
|
||||||
|
<rect x="30" y="110" rx="4" ry="4" width="80%" height="15" />
|
||||||
|
<rect x="100px" y="150" width="100" height="2" />
|
||||||
|
<rect x="100px" y="175" rx="4" ry="4" width="100" height="35" />
|
||||||
|
</VueContentLoading>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import VueContentLoading from "vue-content-loading";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "GridItemSkeleton",
|
||||||
|
components: {
|
||||||
|
VueContentLoading
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
105
src/components/Header.vue
Normal file
105
src/components/Header.vue
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
<template>
|
||||||
|
<header id="header" class="main-nav">
|
||||||
|
<router-link to="/">
|
||||||
|
<img src="https://www.cycloid.io/themes/cycloid/images/owl_logo.png" alt="Cycloid.io" />
|
||||||
|
<h1>Fruits</h1>
|
||||||
|
</router-link>
|
||||||
|
|
||||||
|
<div class="actions">
|
||||||
|
<button
|
||||||
|
:disabled="modalIsOpen"
|
||||||
|
class="action-btn action-btn--delete"
|
||||||
|
@click="() => $store.commit('toggleDeleteMode')"
|
||||||
|
>
|
||||||
|
{{ deleteMode ? "🚫" : "🗑" }}
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
:disabled="deleteMode"
|
||||||
|
class="action-btn action-btn--add"
|
||||||
|
@click="() => $store.commit('toggleModal')"
|
||||||
|
>
|
||||||
|
{{ modalIsOpen ? "🚫" : "➕" }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Header",
|
||||||
|
computed: {
|
||||||
|
...mapState(["deleteMode", "modalIsOpen"])
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
header {
|
||||||
|
background-color: @color-2;
|
||||||
|
box-shadow: 0 0px 14px 0px #cecece;
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: lighter;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.main-nav {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 15;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 0 1rem;
|
||||||
|
height: @headerHeight;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
|
||||||
|
a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 35px;
|
||||||
|
height: 35px;
|
||||||
|
margin-right: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.action-btn {
|
||||||
|
width: 42px;
|
||||||
|
height: 42px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 50%;
|
||||||
|
color: @color-2;
|
||||||
|
font-size: 24px;
|
||||||
|
font-weight: lighter;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: 1rem;
|
||||||
|
padding-top: 2px;
|
||||||
|
background: lighten(#cecece, 10%);
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--delete {
|
||||||
|
border: 1px solid @text-error;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--add {
|
||||||
|
border: 1px solid @color-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
15
src/main.js
Normal file
15
src/main.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import "@/assets/less/reset.less";
|
||||||
|
import Vue from "vue";
|
||||||
|
import App from "./App.vue";
|
||||||
|
import router from "./router";
|
||||||
|
import store from "./store";
|
||||||
|
|
||||||
|
Vue.use(require("vue-moment"));
|
||||||
|
|
||||||
|
Vue.config.productionTip = false;
|
||||||
|
|
||||||
|
new Vue({
|
||||||
|
router,
|
||||||
|
store,
|
||||||
|
render: h => h(App)
|
||||||
|
}).$mount("#app");
|
||||||
32
src/router/index.js
Normal file
32
src/router/index.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import VueRouter from "vue-router";
|
||||||
|
import Fruits from "@/views/Fruits.vue";
|
||||||
|
import Fruit from "@/views/Fruit.vue";
|
||||||
|
import store from "@/store/index";
|
||||||
|
|
||||||
|
Vue.use(VueRouter);
|
||||||
|
|
||||||
|
const routes = [
|
||||||
|
{
|
||||||
|
path: "/",
|
||||||
|
name: "FruitsDirectory",
|
||||||
|
component: Fruits
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/fruit/:id",
|
||||||
|
name: "FruitDetails",
|
||||||
|
component: Fruit,
|
||||||
|
beforeEnter: async (to, from, next) => {
|
||||||
|
await store.dispatch("getFruit", to.params.id);
|
||||||
|
next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
const router = new VueRouter({
|
||||||
|
mode: "history",
|
||||||
|
base: process.env.BASE_URL,
|
||||||
|
routes
|
||||||
|
});
|
||||||
|
|
||||||
|
export default router;
|
||||||
54
src/store/actions.js
Normal file
54
src/store/actions.js
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
getFruits: async ({ commit }) => {
|
||||||
|
await axios
|
||||||
|
.get("http://localhost:3000/fruit")
|
||||||
|
.then(res => {
|
||||||
|
commit("setFruits", res.data.data);
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
if (err.message === "Network Error") throw "Check API connectivity ...";
|
||||||
|
})
|
||||||
|
.finally(() => commit("setLoading", false));
|
||||||
|
},
|
||||||
|
getFruit: async ({ commit }, id) => {
|
||||||
|
await axios.get(`http://localhost:3000/fruit/${id}`).then(res => commit("setFruit", res.data));
|
||||||
|
},
|
||||||
|
addFruit: async ({ commit }, fruit) => {
|
||||||
|
commit("setLoading", true);
|
||||||
|
await axios
|
||||||
|
.post("http://localhost:3000/fruit", fruit)
|
||||||
|
.then(res => commit("addFruit", res.data))
|
||||||
|
.catch(err => {
|
||||||
|
throw new Error(err.message);
|
||||||
|
})
|
||||||
|
.finally(() => commit("setLoading", false));
|
||||||
|
},
|
||||||
|
removeFruit: async ({ commit }, id) => {
|
||||||
|
await axios
|
||||||
|
.delete(`http://localhost:3000/fruit/${id}`)
|
||||||
|
.then(() => {
|
||||||
|
commit("removeFruit", id);
|
||||||
|
commit("toggleDeleteMode");
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
throw new Error(err.message);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getImageFromUnsplash: async ({ commit }, keyword) => {
|
||||||
|
commit("setLoading", true);
|
||||||
|
return await axios
|
||||||
|
.get(`https://api.unsplash.com/search/photos?query=${keyword}&w=800&h=400`, {
|
||||||
|
headers: {
|
||||||
|
Authorization: "Client-ID NjFwGYsnksnzH2uh12W55aobUpTe0h06oSVACd5cWt0",
|
||||||
|
"X-Total": 1
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
if (res.data.total === 0) throw new Error("0 found.");
|
||||||
|
return res.data.results[0];
|
||||||
|
})
|
||||||
|
.finally(() => commit("setLoading", false));
|
||||||
|
}
|
||||||
|
};
|
||||||
1
src/store/getters.js
Normal file
1
src/store/getters.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export default {};
|
||||||
22
src/store/index.js
Normal file
22
src/store/index.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
import Vue from "vue";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
import mutations from "./mutations";
|
||||||
|
import actions from "./actions";
|
||||||
|
import getters from "./getters";
|
||||||
|
|
||||||
|
export const state = {
|
||||||
|
fruits: [],
|
||||||
|
fruit: {},
|
||||||
|
modalIsOpen: false,
|
||||||
|
loading: true,
|
||||||
|
deleteMode: false
|
||||||
|
};
|
||||||
|
|
||||||
|
Vue.use(Vuex);
|
||||||
|
|
||||||
|
export default new Vuex.Store({
|
||||||
|
state,
|
||||||
|
mutations,
|
||||||
|
actions,
|
||||||
|
getters
|
||||||
|
});
|
||||||
25
src/store/mutations.js
Normal file
25
src/store/mutations.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import parser from "@/utils/parser";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
setFruits: (state, fruits) => {
|
||||||
|
state.fruits = parser(fruits, "isFruit");
|
||||||
|
},
|
||||||
|
setFruit: (state, fruit) => {
|
||||||
|
state.fruit = fruit;
|
||||||
|
},
|
||||||
|
addFruit: (state, fruit) => {
|
||||||
|
state.fruits = [...state.fruits, fruit];
|
||||||
|
},
|
||||||
|
removeFruit: (state, id) => {
|
||||||
|
state.fruits = state.fruits.filter(item => item.id != id);
|
||||||
|
},
|
||||||
|
toggleModal: state => {
|
||||||
|
state.modalIsOpen = !state.modalIsOpen;
|
||||||
|
},
|
||||||
|
setLoading: (state, loading) => {
|
||||||
|
state.loading = loading;
|
||||||
|
},
|
||||||
|
toggleDeleteMode: state => {
|
||||||
|
state.deleteMode = !state.deleteMode;
|
||||||
|
}
|
||||||
|
};
|
||||||
59
src/utils/parser.js
Normal file
59
src/utils/parser.js
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
// TODO: Create a class from that file.
|
||||||
|
export default (data, keyToFind) => {
|
||||||
|
let result = [];
|
||||||
|
|
||||||
|
// Keep only levels with { isFruit: true }.
|
||||||
|
JSON.stringify(data, (_, nestedValue) => {
|
||||||
|
if (nestedValue && nestedValue[keyToFind]) {
|
||||||
|
result.push(nestedValue);
|
||||||
|
}
|
||||||
|
return nestedValue;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Check for a Fruit structure.
|
||||||
|
result = result.filter(fruit => {
|
||||||
|
return fruit_structure(fruit, [
|
||||||
|
"color",
|
||||||
|
"description",
|
||||||
|
"expires",
|
||||||
|
"id",
|
||||||
|
"image",
|
||||||
|
"isFruit",
|
||||||
|
"name",
|
||||||
|
"price",
|
||||||
|
"taste"
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort fruits by id.
|
||||||
|
result.sort((a, b) => {
|
||||||
|
return a.id - b.id;
|
||||||
|
});
|
||||||
|
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check for a Fruit structure.
|
||||||
|
*
|
||||||
|
* @param {Object} obj
|
||||||
|
* @param {Array} attrs
|
||||||
|
*/
|
||||||
|
function fruit_structure(obj, attrs) {
|
||||||
|
// Check if a field is missing.
|
||||||
|
for (let i = 0; i < attrs.length; ++i) {
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(obj, attrs[i])) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for additional fields.
|
||||||
|
Object.fromEntries(
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
Object.entries(obj).filter(([key, value]) => {
|
||||||
|
// It mutates the initial object by reference.
|
||||||
|
if (key === "does") delete obj[key];
|
||||||
|
return attrs.includes(key);
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
140
src/views/Fruit.vue
Normal file
140
src/views/Fruit.vue
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h2><span @click="() => this.$router.push('/')">◀</span> Details</h2>
|
||||||
|
|
||||||
|
<article>
|
||||||
|
<img :src="fruit.image" :alt="fruit.name" />
|
||||||
|
<section>
|
||||||
|
<DeleteItem v-if="deleteMode" :item="fruit" :redirect="() => $router.push('/')" />
|
||||||
|
<h3>
|
||||||
|
{{ fruit.name }}
|
||||||
|
<span class="tag" :style="{ backgroundColor: fruit.color }">{{ fruit.taste }}</span>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<p>{{ fruit.description }}</p>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<p class="price">${{ fruit.price | noDecimal }}</p>
|
||||||
|
<div class="alert">
|
||||||
|
{{ "This offer " + expirationState }} {{ fruit.expires | moment("from", "now") }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "FruitDetails",
|
||||||
|
components: { DeleteItem: () => import("@/components/Grid/DeleteItem") },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
modalOpen: true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
noDecimal(value) {
|
||||||
|
return parseInt(value).toFixed();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(["fruit", "deleteMode"]),
|
||||||
|
expirationState() {
|
||||||
|
return new Date(this.fruit.expires) < new Date() ? "expired" : "expires";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
h2 span {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
article {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-flow: column;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: scale-down;
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
box-shadow: 0 1px 4px 1px #d2d2f2;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
|
padding: 1.5rem 2rem;
|
||||||
|
background-color: @color-2;
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
margin-bottom: 0.55rem;
|
||||||
|
font-size: 34px;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
width: 100px;
|
||||||
|
color: #cece;
|
||||||
|
margin: 1.35rem auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
border-radius: 25px;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
margin-left: 0.75rem;
|
||||||
|
color: #ffffff;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
|
text-transform: lowercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.price {
|
||||||
|
text-align: center;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 28px;
|
||||||
|
font-weight: bold;
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
flex-flow: row;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
img,
|
||||||
|
section {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 485px;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
max-height: 435px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
margin-right: 1.5rem;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
background: linear-gradient(112.4deg, #1c9797 11.05%, #147171 89.93%);
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
62
src/views/Fruits.vue
Normal file
62
src/views/Fruits.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<div class="fruits">
|
||||||
|
<h2>Directory</h2>
|
||||||
|
<Grid v-if="!error" :data="this.fruits" />
|
||||||
|
<div class="alert" v-else>
|
||||||
|
{{ error }}
|
||||||
|
<pre><span>$</span> yarn run api</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Fruits",
|
||||||
|
components: { Grid: () => import("@/components/Grid/Grid") },
|
||||||
|
computed: {
|
||||||
|
...mapState(["fruits"])
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
error: null
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
await this.$store.dispatch("getFruits").catch(err => (this.error = err));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.fruits {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 80%;
|
||||||
|
background-color: @text-error;
|
||||||
|
color: @color-2;
|
||||||
|
padding: 1rem 1.5rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
|
||||||
|
@media screen and (min-width: @sm) {
|
||||||
|
width: 50%;
|
||||||
|
max-width: 535px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
padding: 1rem;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-color: rgb(45, 48, 55);
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: @color-3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
10
tests/e2e/.eslintrc.js
Normal file
10
tests/e2e/.eslintrc.js
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
module.exports = {
|
||||||
|
plugins: ["cypress"],
|
||||||
|
env: {
|
||||||
|
mocha: true,
|
||||||
|
"cypress/globals": true
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
strict: "off"
|
||||||
|
}
|
||||||
|
};
|
||||||
26
tests/e2e/plugins/index.js
Normal file
26
tests/e2e/plugins/index.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/* eslint-disable arrow-body-style */
|
||||||
|
// https://docs.cypress.io/guides/guides/plugins-guide.html
|
||||||
|
|
||||||
|
// if you need a custom webpack configuration you can uncomment the following import
|
||||||
|
// and then use the `file:preprocessor` event
|
||||||
|
// as explained in the cypress docs
|
||||||
|
// https://docs.cypress.io/api/plugins/preprocessors-api.html#Examples
|
||||||
|
|
||||||
|
// /* eslint-disable import/no-extraneous-dependencies, global-require */
|
||||||
|
// const webpack = require('@cypress/webpack-preprocessor')
|
||||||
|
|
||||||
|
module.exports = (on, config) => {
|
||||||
|
// on('file:preprocessor', webpack({
|
||||||
|
// webpackOptions: require('@vue/cli-service/webpack.config'),
|
||||||
|
// watchOptions: {}
|
||||||
|
// }))
|
||||||
|
|
||||||
|
return {
|
||||||
|
...config,
|
||||||
|
fixturesFolder: "tests/e2e/fixtures",
|
||||||
|
integrationFolder: "tests/e2e/specs",
|
||||||
|
screenshotsFolder: "tests/e2e/screenshots",
|
||||||
|
videosFolder: "tests/e2e/videos",
|
||||||
|
supportFile: "tests/e2e/support/index.js"
|
||||||
|
};
|
||||||
|
};
|
||||||
23
tests/e2e/specs/test.js
Normal file
23
tests/e2e/specs/test.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// https://docs.cypress.io/api/introduction/api.html
|
||||||
|
|
||||||
|
describe("Homepage", () => {
|
||||||
|
it("Visits the app root url", () => {
|
||||||
|
cy.visit("http://localhost:8080");
|
||||||
|
cy.contains("h2", "Directory");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Deletes a fruit", () => {
|
||||||
|
cy.get(".action-btn--delete").click();
|
||||||
|
cy.get(".grid-item:first-of-type .delete-btn").click();
|
||||||
|
cy.get(".btn--success").click();
|
||||||
|
cy.url().should("equal", "http://localhost:8080/");
|
||||||
|
});
|
||||||
|
|
||||||
|
it("Navigates to fruit details", () => {
|
||||||
|
const fruitElmt = cy.get(".grid-item:first-of-type a");
|
||||||
|
fruitElmt.get("h3").then(elmt => {
|
||||||
|
fruitElmt.click();
|
||||||
|
cy.contains("h3", elmt.text());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
25
tests/e2e/support/commands.js
Normal file
25
tests/e2e/support/commands.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
// ***********************************************
|
||||||
|
// This example commands.js shows you how to
|
||||||
|
// create various custom commands and overwrite
|
||||||
|
// existing commands.
|
||||||
|
//
|
||||||
|
// For more comprehensive examples of custom
|
||||||
|
// commands please read more here:
|
||||||
|
// https://on.cypress.io/custom-commands
|
||||||
|
// ***********************************************
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a parent command --
|
||||||
|
// Cypress.Commands.add("login", (email, password) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a child command --
|
||||||
|
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is a dual command --
|
||||||
|
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -- This is will overwrite an existing command --
|
||||||
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
||||||
20
tests/e2e/support/index.js
Normal file
20
tests/e2e/support/index.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
// ***********************************************************
|
||||||
|
// This example support/index.js is processed and
|
||||||
|
// loaded automatically before your test files.
|
||||||
|
//
|
||||||
|
// This is a great place to put global configuration and
|
||||||
|
// behavior that modifies Cypress.
|
||||||
|
//
|
||||||
|
// You can change the location of this file or turn off
|
||||||
|
// automatically serving support files with the
|
||||||
|
// 'supportFile' configuration option.
|
||||||
|
//
|
||||||
|
// You can read more here:
|
||||||
|
// https://on.cypress.io/configuration
|
||||||
|
// ***********************************************************
|
||||||
|
|
||||||
|
// Import commands.js using ES2015 syntax:
|
||||||
|
import "./commands";
|
||||||
|
|
||||||
|
// Alternatively you can use CommonJS syntax:
|
||||||
|
// require('./commands')
|
||||||
63
tests/unit/AddFruit.spec.js
Normal file
63
tests/unit/AddFruit.spec.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
import { shallowMount, createLocalVue } from "@vue/test-utils";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
import AddFruit from "@/components/AddFruit";
|
||||||
|
|
||||||
|
const localVue = createLocalVue();
|
||||||
|
localVue.use(Vuex);
|
||||||
|
|
||||||
|
describe("Test AddFruit component.", () => {
|
||||||
|
let actions, mutations, store;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
actions = {
|
||||||
|
addFruit: jest.fn()
|
||||||
|
};
|
||||||
|
mutations = {
|
||||||
|
toggleModal: jest.fn()
|
||||||
|
};
|
||||||
|
store = new Vuex.Store({ actions, mutations });
|
||||||
|
});
|
||||||
|
|
||||||
|
it("takes a snapshot of the component.", () => {
|
||||||
|
const wrapper = shallowMount(AddFruit, { store, localVue });
|
||||||
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("checks initial data.", () => {
|
||||||
|
const wrapper = shallowMount(AddFruit, { store, localVue });
|
||||||
|
expect(wrapper.vm.$data.fruit).toEqual({
|
||||||
|
color: "#000000",
|
||||||
|
isFruit: true
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it("closes AddFruit modal on Cancel click.", () => {
|
||||||
|
const wrapper = shallowMount(AddFruit, {
|
||||||
|
store,
|
||||||
|
localVue
|
||||||
|
});
|
||||||
|
const cancelBtn = wrapper.find(".btn--cancel");
|
||||||
|
cancelBtn.trigger("click");
|
||||||
|
expect(mutations.toggleModal).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("dispatches addFruit action on form submission.", () => {
|
||||||
|
const wrapper = shallowMount(AddFruit, {
|
||||||
|
store,
|
||||||
|
localVue
|
||||||
|
});
|
||||||
|
const form = wrapper.find("form");
|
||||||
|
form.trigger("submit");
|
||||||
|
expect(actions.addFruit).toHaveBeenCalled();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("checks that 'is-overlayed' class is added/removed to <body> on mounted/destroy.", () => {
|
||||||
|
const wrapper = shallowMount(AddFruit, {
|
||||||
|
store,
|
||||||
|
localVue
|
||||||
|
});
|
||||||
|
expect(document.body.classList).toContain("is-overlayed");
|
||||||
|
wrapper.destroy();
|
||||||
|
expect(document.body.classList).not.toContain("is-overlayed");
|
||||||
|
});
|
||||||
|
});
|
||||||
49
tests/unit/GridItem.spec.js
Normal file
49
tests/unit/GridItem.spec.js
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
import { mount, RouterLinkStub, createLocalVue } from "@vue/test-utils";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
import GridItem from "@/components/Grid/GridItem.vue";
|
||||||
|
|
||||||
|
const localVue = createLocalVue();
|
||||||
|
localVue.use(Vuex);
|
||||||
|
|
||||||
|
describe("Test GridItem component.", () => {
|
||||||
|
let store;
|
||||||
|
|
||||||
|
const item = {
|
||||||
|
id: 3,
|
||||||
|
isFruit: true,
|
||||||
|
name: "banana",
|
||||||
|
image: "/image/path.jpg",
|
||||||
|
price: "907.00",
|
||||||
|
color: "#763e44",
|
||||||
|
description: "Iusto illum vero voluptatem.",
|
||||||
|
taste: "Handcrafted",
|
||||||
|
expires: "2021-04-11T08:54:24.588Z"
|
||||||
|
};
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
store = new Vuex.Store();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("takes a snapshot of the component.", () => {
|
||||||
|
const wrapper = mount(GridItem, {
|
||||||
|
store,
|
||||||
|
localVue,
|
||||||
|
propsData: { item },
|
||||||
|
stubs: ["router-link"]
|
||||||
|
});
|
||||||
|
expect(wrapper.html()).toMatchSnapshot();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("checks link.", async () => {
|
||||||
|
const wrapper = mount(GridItem, {
|
||||||
|
store,
|
||||||
|
localVue,
|
||||||
|
propsData: { item },
|
||||||
|
stubs: {
|
||||||
|
RouterLink: RouterLinkStub
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(wrapper.findComponent(RouterLinkStub).props().to).toBe("/fruit/3");
|
||||||
|
});
|
||||||
|
});
|
||||||
23
tests/unit/__snapshots__/AddFruit.spec.js.snap
Normal file
23
tests/unit/__snapshots__/AddFruit.spec.js.snap
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Test AddFruit component. takes a snapshot of the component. 1`] = `
|
||||||
|
<div class="modal">
|
||||||
|
<h2>New Fruit</h2>
|
||||||
|
<form id="new-fruit">
|
||||||
|
<div class="form-field"><label for="fruit-name">Name</label> <input id="fruit-name" type="text" placeholder="Ex: Banana" required="required"></div>
|
||||||
|
<imageunsplash-stub containerclass="form-field" label="Image" placeholder="Search: strawberry, apple ..." required="true"></imageunsplash-stub>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-field"><label for="fruit-taste">Taste</label> <input id="fruit-taste" type="text" placeholder="Ex: sweet" required="required"></div>
|
||||||
|
<div class="form-field"><label for="fruit-color">Color</label> <input id="fruit-color" type="color" placeholder="Color" required="required"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-field"><label for="fruit-price">Price ($)</label> <input id="fruit-price" type="number" placeholder="Ex: $13" required="required" min="0"></div>
|
||||||
|
<div class="form-field"><label for="fruit-expires">Expiration Date</label> <input id="fruit-expires" type="date" required="required"></div>
|
||||||
|
</div>
|
||||||
|
<div class="form-field"><label for="fruit-description">Description</label> <textarea id="fruit-description" placeholder="Ex: malesuada pellentesque elit eget ..." required="required"></textarea></div>
|
||||||
|
<div class="actions"><button type="button" class="btn btn--cancel">
|
||||||
|
Cancel
|
||||||
|
</button> <button type="submit" class="btn btn--success">Save</button></div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
18
tests/unit/__snapshots__/GridItem.spec.js.snap
Normal file
18
tests/unit/__snapshots__/GridItem.spec.js.snap
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`Test GridItem component. takes a snapshot of the component. 1`] = `
|
||||||
|
<article class="grid-item">
|
||||||
|
<!---->
|
||||||
|
<router-link-stub to="/fruit/3">
|
||||||
|
<div class="thumbnail"><img src="/image/path.jpg" alt="banana"></div>
|
||||||
|
<section>
|
||||||
|
<h3>
|
||||||
|
banana
|
||||||
|
<span class="tag" style="background-color: rgb(118, 62, 68);">Handcrafted</span>
|
||||||
|
</h3>
|
||||||
|
<hr>
|
||||||
|
<p class="price">$907</p>
|
||||||
|
</section>
|
||||||
|
</router-link-stub>
|
||||||
|
</article>
|
||||||
|
`;
|
||||||
24
tests/unit/global.spec.js
Normal file
24
tests/unit/global.spec.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import { mount, createLocalVue } from "@vue/test-utils";
|
||||||
|
import Vuex from "vuex";
|
||||||
|
import App from "@/App.vue";
|
||||||
|
|
||||||
|
const localVue = createLocalVue();
|
||||||
|
localVue.use(Vuex);
|
||||||
|
|
||||||
|
describe("App", () => {
|
||||||
|
let store;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
store = new Vuex.Store();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should be a Vue instance", () => {
|
||||||
|
const wrapper = mount(App, { store, localVue, stubs: ["router-link", "router-view"] });
|
||||||
|
expect(wrapper.vm).toBeTruthy();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("renders correctly", () => {
|
||||||
|
const wrapper = mount(App, { store, localVue, stubs: ["router-link", "router-view"] });
|
||||||
|
expect(wrapper.find("#app")).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
43
tests/unit/mutations.spec.js
Normal file
43
tests/unit/mutations.spec.js
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import { state } from "@/store";
|
||||||
|
import mutations from "@/store/mutations";
|
||||||
|
|
||||||
|
const { setFruits, setFruit, addFruit, removeFruit } = mutations;
|
||||||
|
|
||||||
|
const fruit = {
|
||||||
|
id: 3,
|
||||||
|
isFruit: true,
|
||||||
|
name: "banana",
|
||||||
|
image: "/image/path.jpg",
|
||||||
|
price: "907.00",
|
||||||
|
color: "#763e44",
|
||||||
|
description: "Iusto illum vero voluptatem.",
|
||||||
|
taste: "Handcrafted",
|
||||||
|
expires: "2021-04-11T08:54:24.588Z"
|
||||||
|
};
|
||||||
|
|
||||||
|
describe("Vuex mutations.", () => {
|
||||||
|
it("tests setFruits mutation.", () => {
|
||||||
|
setFruits(state, [fruit]);
|
||||||
|
expect(state.fruits[0].id).toBe(3);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("tests setFruit mutation.", () => {
|
||||||
|
setFruit(state, fruit);
|
||||||
|
expect(state.fruit.id).toBe(3);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("tests addFruit mutation.", () => {
|
||||||
|
const newFruit = Object.assign({}, fruit);
|
||||||
|
newFruit.id = 4;
|
||||||
|
addFruit(state, newFruit);
|
||||||
|
expect(state.fruits[0].id).toBe(3);
|
||||||
|
expect(state.fruits[1].id).toBe(4);
|
||||||
|
expect(state.fruits.length).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
it("tests removeFruit mutation.", () => {
|
||||||
|
removeFruit(state, 4);
|
||||||
|
expect(state.fruits[0].id).toBe(3);
|
||||||
|
expect(state.fruits.length).toBe(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
9
vue.config.js
Normal file
9
vue.config.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
module.exports = {
|
||||||
|
css: {
|
||||||
|
loaderOptions: {
|
||||||
|
less: {
|
||||||
|
additionalData: `@import "~@/assets/less/variables.less";`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user