In this assignment, we expect to see tests like
Counter.vue
<div class="counter-container">
<button @click="decrease">Decrease</button>
<span>{{ count }}k</span>
<button @click="increase">Increase</button>
</div>
- Component Exist Check
- Increase button exist check
- Decrease button exist check
- Increase button functionality check
- Decrease button functionality check
- 2 increase + decrease functionality check together
- Count text show check
App.vue
<template>
<div>
<div id="app">
<h1>Daily Corona Cases in Turkey</h1>
<div
class="notificationArea"
:class="{
danger: getCount >= 10,
normal: getCount >= 5 && getCount < 10,
safe: getCount < 5,
}"
>
{{ message }}
</div>
</div>
<Counter />
</div>
</template>
- h1 exists
- h1 text equals to
Daily Corona Cases in Turkey
check - notificationArea class check based on
getCount
value - notificationArea text message check
yarn install
yarn serve
yarn build
yarn test:unit