@dcrackel/hematournamentui 1.0.702 → 1.0.703
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { shallowMount } from '@vue/test-utils';
|
|
2
|
+
import { describe, expect, it } from 'vitest';
|
|
3
|
+
import BoutCard from '../../Cards/BoutCard/BoutCard.vue';
|
|
4
|
+
import Tableau from './Tableau.vue';
|
|
5
|
+
|
|
6
|
+
const bout = {
|
|
7
|
+
BoutId: 42,
|
|
8
|
+
DEBoutId: 1,
|
|
9
|
+
RoundLabel: 'Final',
|
|
10
|
+
Status: 'Scheduled',
|
|
11
|
+
Person1: { PersonId: 1, DisplayName: 'Fencer One' },
|
|
12
|
+
Person2: { PersonId: 2, DisplayName: 'Fencer Two' },
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const mountListView = () => shallowMount(Tableau, {
|
|
16
|
+
props: {
|
|
17
|
+
bouts: [bout],
|
|
18
|
+
bracketSize: 'Final',
|
|
19
|
+
hostingClubColors: {},
|
|
20
|
+
largeCards: true,
|
|
21
|
+
listView: true,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
describe('Tableau list view', () => {
|
|
26
|
+
it('enables bout interaction and emits the full bout when starting', async () => {
|
|
27
|
+
const wrapper = mountListView();
|
|
28
|
+
const boutCard = wrapper.findComponent(BoutCard);
|
|
29
|
+
|
|
30
|
+
expect(boutCard.props('editMode')).toBe(true);
|
|
31
|
+
|
|
32
|
+
boutCard.vm.$emit('action:startBout', { BoutId: bout.BoutId });
|
|
33
|
+
await wrapper.vm.$nextTick();
|
|
34
|
+
|
|
35
|
+
expect(wrapper.emitted('action:directingBout')).toEqual([[bout]]);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
<div class="border-b border-dropdownSelect mb-5"></div>
|
|
20
20
|
|
|
21
21
|
<div v-for="bout in assignedBoutsToMe" :key="bout.BoutId" class="mb-4">
|
|
22
|
-
<BoutCard
|
|
23
|
-
:bout="bout"
|
|
24
|
-
:hostingClubColors="hostingClubColors"
|
|
25
|
-
:editMode="
|
|
26
|
-
:reorderMode="false"
|
|
27
|
-
:isAdmin="isAdmin"
|
|
22
|
+
<BoutCard
|
|
23
|
+
:bout="bout"
|
|
24
|
+
:hostingClubColors="hostingClubColors"
|
|
25
|
+
:editMode="true"
|
|
26
|
+
:reorderMode="false"
|
|
27
|
+
:isAdmin="isAdmin"
|
|
28
28
|
@action:startBout="handleDirectingFromIds"
|
|
29
29
|
@action:resumeBout="handleDirectingFromIds"
|
|
30
30
|
@action:editBout="handleEditFromIds"
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
<BaseText class="my-5" color="primaryHighlight" size="sm" :text="roundName" weight="bold"/>
|
|
43
43
|
|
|
44
44
|
<div v-for="bout in bouts" :key="bout.BoutId" class="mb-4">
|
|
45
|
-
<BoutCard
|
|
46
|
-
:bout="bout"
|
|
47
|
-
:hostingClubColors="hostingClubColors"
|
|
48
|
-
:editMode="
|
|
49
|
-
:reorderMode="false"
|
|
50
|
-
:isAdmin="isAdmin"
|
|
45
|
+
<BoutCard
|
|
46
|
+
:bout="bout"
|
|
47
|
+
:hostingClubColors="hostingClubColors"
|
|
48
|
+
:editMode="true"
|
|
49
|
+
:reorderMode="false"
|
|
50
|
+
:isAdmin="isAdmin"
|
|
51
51
|
@action:startBout="handleDirectingFromIds"
|
|
52
52
|
@action:resumeBout="handleDirectingFromIds"
|
|
53
53
|
@action:editBout="handleEditFromIds"
|