forked from omegaup/omegaup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Edit.test.ts
43 lines (37 loc) · 1.16 KB
/
Edit.test.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { mount, shallowMount } from '@vue/test-utils';
import expect from 'expect';
import T from '../../lang';
import { AvailableTabs } from './Edit.vue';
import group_Edit from './Edit.vue';
describe('Edit.vue', () => {
it('Should handle edit view with empty scoreboards and identities', () => {
const wrapper = shallowMount(group_Edit, {
propsData: {
groupAlias: 'Hello',
groupName: 'Hello omegaUp',
countries: [{ country_id: 'MX', name: 'Mexico' }],
isOrganizer: true,
tab: AvailableTabs.Members,
identities: [],
identitiesCsv: [],
scoreboards: [],
},
});
expect(wrapper.text()).toContain('Hello omegaUp');
});
it('Should handle edit view getting the subcomponents info', () => {
const wrapper = mount(group_Edit, {
propsData: {
groupAlias: 'Hello',
groupName: 'Hello omegaUp',
countries: [{ country_id: 'MX', name: 'Mexico' }],
isOrganizer: true,
tab: AvailableTabs.Members,
identities: [],
identitiesCsv: [],
scoreboards: [],
},
});
expect(wrapper.text()).toContain(T.groupEditMembers);
});
});