Skip to content

Commit 7704141

Browse files
committed
test: Adjusting tests to recent changes in API
1 parent eb3d6d9 commit 7704141

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

tests/__util__/order/card.ts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,19 @@ export const createHostContext = (id: string) => {
2121
companyName: 'fake companyName' as string | null,
2222
companyLegalName: 'fake companyLegalName' as string | null,
2323
companyLegalAddress: 'fake companyLegalAddress' as string | null,
24-
companyINN: 'fake companyINN' as string | null,
25-
companyOKPO: 'fake companyOKPO' as string | null,
26-
companyBIK: 'fake companyBIK' as string | null,
2724
companyBank: 'fake companyBank' as string | null,
2825
companyBankAddress: 'fake companyBankAddress' as string | null,
29-
companyCorrAccount: 'fake companyCorrAccount' as string | null,
3026
companyBankAccount: 'fake companyBankAccount' as string | null,
27+
companyCorrAccount: 'fake companyCorrAccount' as string | null,
28+
companyContragentType: 'enterpreneur' as 'enterpreneur' | 'legal-entity' | 'individual',
29+
companyCertificateNumber: 'fake companyCertificateNumber' as string | null,
30+
companyCertificateDate: 'fake companyCertificateDate' as string | null,
31+
companyOGRN: 'fake companyOGRN' as string | null,
32+
companyOGRNIP: 'fake companyOGRNIP' as string | null,
33+
companyINN: 'fake companyINN' as string | null,
34+
companyKPP: 'fake companyKPP' as string | null,
35+
companyOKPO: 'fake companyOKPO' as string | null,
36+
companyBIK: 'fake companyBIK' as string | null,
3137
},
3238
delivery: {
3339
address: 'Улица Краља Милутина 2 11000 Београд Србија' as string | null,
@@ -54,7 +60,13 @@ export const createHostContext = (id: string) => {
5460
'company.name': () => data.customer.companyName,
5561
'company.legalName': () => data.customer.companyLegalName,
5662
'company.legalAddress': () => data.customer.companyLegalAddress,
63+
'company.contragentType': () => data.customer.companyContragentType,
64+
'company.certificateNumber': () => data.customer.companyCertificateNumber,
65+
'company.certificateDate': () => data.customer.companyCertificateDate,
66+
'company.OGRN': () => data.customer.companyOGRN,
67+
'company.OGRNIP': () => data.customer.companyOGRNIP,
5768
'company.INN': () => data.customer.companyINN,
69+
'company.KPP': () => data.customer.companyKPP,
5870
'company.OKPO': () => data.customer.companyOKPO,
5971
'company.BIK': () => data.customer.companyBIK,
6072
'company.bank': () => data.customer.companyBank,
@@ -71,13 +83,18 @@ export const createHostContext = (id: string) => {
7183
'company.name': (value) => { data.customer.companyName = value },
7284
'company.legalName': (value) => { data.customer.companyLegalName = value },
7385
'company.legalAddress': (value) => { data.customer.companyLegalAddress = value },
74-
'company.INN': (value) => { data.customer.companyINN = value },
75-
'company.OKPO': (value) => { data.customer.companyOKPO = value },
76-
'company.BIK': (value) => { data.customer.companyBIK = value },
7786
'company.bank': (value) => { data.customer.companyBank = value },
7887
'company.bankAddress': (value) => { data.customer.companyBankAddress = value },
79-
'company.corrAccount': (value) => { data.customer.companyCorrAccount = value },
8088
'company.bankAccount': (value) => { data.customer.companyBankAccount = value },
89+
'company.corrAccount': (value) => { data.customer.companyCorrAccount = value },
90+
'company.certificateNumber': (value) => { data.customer.companyCertificateNumber = value },
91+
'company.certificateDate': (value) => { data.customer.companyCertificateDate = value },
92+
'company.OGRN': (value) => { data.customer.companyOGRN = value },
93+
'company.OGRNIP': (value) => { data.customer.companyOGRNIP = value },
94+
'company.INN': (value) => { data.customer.companyINN = value },
95+
'company.KPP': (value) => { data.customer.companyKPP = value },
96+
'company.OKPO': (value) => { data.customer.companyOKPO = value },
97+
'company.BIK': (value) => { data.customer.companyBIK = value },
8198
'delivery.address': (value) => { data.delivery.address = value },
8299
}),
83100
}

tests/__util__/settings.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import { reactive } from 'vue'
55

66
export const createHostContext = (id: string) => {
77
const data = reactive({
8+
image: {
9+
workers: [] as string[],
10+
},
811
system: {
912
locale: 'en-GB' as Locale,
1013
},
@@ -13,6 +16,7 @@ export const createHostContext = (id: string) => {
1316
return {
1417
data,
1518
accessor: createAccessor<Schema>(id, {
19+
'image.workers': () => data.image.workers,
1620
'system.locale': () => data.system.locale,
1721
}, {}),
1822
}

0 commit comments

Comments
 (0)