Skip to content

Commit 3858aad

Browse files
feat(feedback_store): update components/tests
BREAKING CHANGE: Changes components names
1 parent 8491f0a commit 3858aad

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed
File renamed without changes.

components/Errors/Snackers.vue renamed to components/FeedBack/Snackers.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<v-snackbar
33
v-for="(feedback, index) in feedback_store.feedbacks"
44
:key="feedback"
5+
v-model="show"
56
:style="{ 'margin-bottom': calc_margin(index) }"
67
:color="feedback.type"
78
location="bottom right"
89
transition="slide-x-reverse-transition"
9-
width="200px"
10+
max-width="200px"
1011
height="20px"
11-
z-index="99999"
1212
>
1313
<v-row dense class="flex-nowrap">
1414
<v-col cols="auto">
@@ -61,6 +61,7 @@
6161

6262
<script setup>
6363
const feedback_store = use_feedback_store()
64+
const show = true
6465
6566
function calc_margin(index) {
6667
return index * 60 + 8 + "px"

test/components/Errors/ErrorsBanner.nuxt.test.js renamed to test/components/FeedBack/ErrorsBanner.nuxt.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import { createVuetify } from "vuetify"
66
import * as components from "vuetify/components"
77
import * as directives from "vuetify/directives"
88

9-
import ErrorsBanner from "@/components/Errors/Banner.vue"
9+
import FeedBackErrorBanner from "@/components/FeedBack/ErrorBanner.vue"
1010

1111
const vuetify = createVuetify({
1212
components,
1313
directives,
1414
})
1515

16-
describe("ErrorsBanner.vue", async () => {
16+
describe("FeedBackErrorBanner.vue", async () => {
1717
test(`Test reload`, async () => {
18-
const wrapper = mount(ErrorsBanner, {
18+
const wrapper = mount(FeedBackErrorBanner, {
1919
global: {
2020
plugins: [vuetify],
2121
},
@@ -30,7 +30,7 @@ describe("ErrorsBanner.vue", async () => {
3030
expect(reload_spy).toHaveBeenCalledTimes(1)
3131
}),
3232
test(`Test delete error`, async () => {
33-
const wrapper = mount(ErrorsBanner, {
33+
const wrapper = mount(FeedBackErrorBanner, {
3434
global: {
3535
plugins: [vuetify],
3636
},

test/components/Errors/ErrorsSnackers.nuxt.test.js renamed to test/components/FeedBack/Snackers.nuxt.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ import { createVuetify } from "vuetify"
66
import * as components from "vuetify/components"
77
import * as directives from "vuetify/directives"
88

9-
import ErrorsSnackers from "@/components/Errors/Snackers.vue"
9+
import FeedBackSnackers from "@/components/FeedBack/Snackers.vue"
1010

1111
const vuetify = createVuetify({
1212
components,
1313
directives,
1414
})
1515

16-
describe("ErrorsSnackers.vue", async () => {
16+
describe("FeedBackSnackers.vue", async () => {
1717
test(`Test delete error`, async () => {
1818
const wrapper = mount(
1919
{
20-
template: "<v-layout><ErrorsSnackers/></v-layout>",
20+
template: "<v-layout><FeedBackSnackers/></v-layout>",
2121
},
2222
{
2323
props: {},
2424
global: {
2525
components: {
26-
ErrorsSnackers,
26+
FeedBackSnackers,
2727
},
2828
plugins: [vuetify],
2929
},

0 commit comments

Comments
 (0)