From ae160ff8e672b6c6f7073eaabeb9c809b61ef0c7 Mon Sep 17 00:00:00 2001 From: Phan An Date: Sat, 23 Jul 2022 12:00:14 +0200 Subject: [PATCH] fix(test): queueStore tests --- .../js/__tests__/factory/songFactory.ts | 3 +- .../js/components/screens/QueueScreen.vue | 11 ++- resources/assets/js/stores/queueStore.spec.ts | 97 +++++++++++++------ 3 files changed, 78 insertions(+), 33 deletions(-) diff --git a/resources/assets/js/__tests__/factory/songFactory.ts b/resources/assets/js/__tests__/factory/songFactory.ts index e662f684..6ce909a1 100644 --- a/resources/assets/js/__tests__/factory/songFactory.ts +++ b/resources/assets/js/__tests__/factory/songFactory.ts @@ -22,7 +22,8 @@ const generate = (partOfCompilation = false): Song => { lyrics: faker.lorem.paragraph(), play_count: faker.datatype.number(), liked: faker.datatype.boolean(), - created_at: faker.date.past().toISOString() + created_at: faker.date.past().toISOString(), + playback_state: 'Stopped' } } diff --git a/resources/assets/js/components/screens/QueueScreen.vue b/resources/assets/js/components/screens/QueueScreen.vue index 045b17ae..fdedaa1d 100644 --- a/resources/assets/js/components/screens/QueueScreen.vue +++ b/resources/assets/js/components/screens/QueueScreen.vue @@ -50,7 +50,7 @@