Skip to content

Commit 5bb90a3

Browse files
domain tx and cred tests
1 parent d62f271 commit 5bb90a3

File tree

20 files changed

+329
-9
lines changed

20 files changed

+329
-9
lines changed

public/locales/ca-CA/translations.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,5 +561,8 @@
561561
"enable_amendment_name": null,
562562
"amendment_status": null,
563563
"expected_date": null,
564-
"credential_type": null
564+
"credential_type": null,
565+
"subject": null,
566+
"expiration": null,
567+
"domain_id": null
565568
}

public/locales/en-US/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@
566566
"expected_date": "Expected Date",
567567
"credential_type": "Credential Type",
568568
"subject": "Subject",
569-
"expiration": "Expiration"
569+
"expiration": "Expiration",
570+
"domain_id": "Domain ID"
570571

571572
}

public/locales/es-ES/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,5 +559,6 @@
559559
"expected_date": null,
560560
"credential_type": null,
561561
"subject": null,
562-
"expiration": null
562+
"expiration": null,
563+
"domain_id": null
563564
}

public/locales/fr-FR/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,5 +560,6 @@
560560
"expected_date": null,
561561
"credential_type": null,
562562
"subject": null,
563-
"expiration": null
563+
"expiration": null,
564+
"domain_id": null
564565
}

public/locales/ja-JP/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,5 +559,6 @@
559559
"expected_date": null,
560560
"credential_type": null,
561561
"subject": null,
562-
"expiration": null
562+
"expiration": null,
563+
"domain_id": null
563564
}

public/locales/ko-KR/translations.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,5 +557,6 @@
557557
"expected_date": null,
558558
"credential_type": null,
559559
"subject": null,
560-
"expiration": null
560+
"expiration": null,
561+
"domain_id": null
561562
}

src/containers/shared/components/Transaction/CredentialCreate/Simple.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const Simple: TransactionSimpleComponent = (
1616
<>
1717
{Account && (
1818
<SimpleRow label={t('account')} data-test="account">
19-
{convertHexToString(Account)}
19+
{Account}
2020
</SimpleRow>
2121
)}
2222
{Subject && (
2323
<SimpleRow label={t('subject')} data-test="subject">
24-
{convertHexToString(Subject)}
24+
{Subject}
2525
</SimpleRow>
2626
)}
2727
{CredentialType && (
@@ -31,7 +31,7 @@ const Simple: TransactionSimpleComponent = (
3131
)}
3232
{Expiration && (
3333
<SimpleRow label={t('expiration')} data-test="expiration">
34-
{convertHexToString(Expiration)}
34+
{Expiration}
3535
</SimpleRow>
3636
)}
3737
{URI && (
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { createSimpleWrapperFactory, expectSimpleRowText } from '../../test'
2+
import { Simple } from '../Simple'
3+
import CredentialCreate from './mock_data/CredentialCreate.json'
4+
5+
const createWrapper = createSimpleWrapperFactory(Simple)
6+
7+
describe('CredentialCreate: Simple', () => {
8+
it('renders', () => {
9+
const wrapper = createWrapper(CredentialCreate)
10+
expectSimpleRowText(
11+
wrapper,
12+
'account',
13+
'r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc',
14+
)
15+
expectSimpleRowText(
16+
wrapper,
17+
'credential-type',
18+
'4D7920746573742063726564656E7469616C',
19+
)
20+
expectSimpleRowText(wrapper, 'fee', '120')
21+
expectSimpleRowText(wrapper, 'expiration', '')
22+
expectSimpleRowText(wrapper, 'uri', '')
23+
24+
wrapper.unmount()
25+
})
26+
})
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"close_time_iso": "2025-01-15T20:16:42Z",
3+
"ctid": "C07369C900010002",
4+
"hash": "6BB9EB8E4A367AC1A4A93BB39922A114A6F96C4856FB70F70B3ECED37BEEA102",
5+
"ledger_hash": "5424C54CBFE09C5A821C4CC64A5D52EAE448DBA00AD80D8A6557E94A21B61D6C",
6+
"ledger_index": 7563721,
7+
"meta": {
8+
"AffectedNodes": [
9+
{
10+
"ModifiedNode": {
11+
"FinalFields": {
12+
"Account": "r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc",
13+
"Balance": "99999880",
14+
"Flags": 0,
15+
"OwnerCount": 1,
16+
"Sequence": 7563718
17+
},
18+
"LedgerEntryType": "AccountRoot",
19+
"LedgerIndex": "5A756AC618962AFEBFE49B7C57C95D4CE6EB1F88904A925E3C5D649FF94C29D3",
20+
"PreviousFields": {
21+
"Balance": "100000000",
22+
"OwnerCount": 0,
23+
"Sequence": 7563717
24+
},
25+
"PreviousTxnID": "996AC52E9478156146CF756EAAA5175A43FB807192015A86BD09E1C23D9698E7",
26+
"PreviousTxnLgrSeq": 7563717
27+
}
28+
},
29+
{
30+
"CreatedNode": {
31+
"LedgerEntryType": "DirectoryNode",
32+
"LedgerIndex": "81CC36FA2EAE5028D2965EF6F2C80ED7F5221F34967A2A02CFA567FF602899AF",
33+
"NewFields": {
34+
"Owner": "rNcwphrUgoPv6GoJMZgkaqGXP3tseK9hDi",
35+
"RootIndex": "81CC36FA2EAE5028D2965EF6F2C80ED7F5221F34967A2A02CFA567FF602899AF"
36+
}
37+
}
38+
},
39+
{
40+
"CreatedNode": {
41+
"LedgerEntryType": "DirectoryNode",
42+
"LedgerIndex": "C1B1A38B10D770D12E929FAEEE570A63E1AB43370B4F75D60B7A95A53D53596C",
43+
"NewFields": {
44+
"Owner": "r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc",
45+
"RootIndex": "C1B1A38B10D770D12E929FAEEE570A63E1AB43370B4F75D60B7A95A53D53596C"
46+
}
47+
}
48+
},
49+
{
50+
"CreatedNode": {
51+
"LedgerEntryType": "Credential",
52+
"LedgerIndex": "EE35EC6AB60F859F58A612B96623586BD19ED6780D6187AD9C84665053DA4C7A",
53+
"NewFields": {
54+
"CredentialType": "4D7920746573742063726564656E7469616C",
55+
"Issuer": "r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc",
56+
"Subject": "rNcwphrUgoPv6GoJMZgkaqGXP3tseK9hDi"
57+
}
58+
}
59+
}
60+
],
61+
"TransactionIndex": 1,
62+
"TransactionResult": "tesSUCCESS"
63+
},
64+
"tx": {
65+
"Account": "r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc",
66+
"CredentialType": "4D7920746573742063726564656E7469616C",
67+
"Fee": "120",
68+
"Flags": 0,
69+
"LastLedgerSequence": 7563739,
70+
"Sequence": 7563717,
71+
"SigningPubKey": "ED86E9A5E421440F96E2A93D8E0D981447A112790964745068474C90DE4F0E93C3",
72+
"Subject": "rNcwphrUgoPv6GoJMZgkaqGXP3tseK9hDi",
73+
"TransactionType": "CredentialCreate",
74+
"TxnSignature": "B880DAB04C5F1F7946E573EB6BB6F681BAED04812416E5E135A00CCBA243935B88451F7BB701F127FEE2724B1E316D6982AB0496B12B6E7AE7C222F190561700",
75+
"date": 790287402,
76+
"ledger_index": 7563721
77+
},
78+
"validated": true
79+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { createSimpleWrapperFactory, expectSimpleRowText } from '../../test'
2+
import { Simple } from '../Simple'
3+
import CredentialDelete from './mock_data/CredentialDelete.json'
4+
5+
const createWrapper = createSimpleWrapperFactory(Simple)
6+
7+
describe('CredentialDelete: Simple', () => {
8+
it('renders', () => {
9+
const wrapper = createWrapper(CredentialDelete)
10+
expectSimpleRowText(
11+
wrapper,
12+
'account',
13+
'r3ZenwRbVqtkqrZsP9BVxKS8iDu3EsCwyc',
14+
)
15+
expectSimpleRowText(
16+
wrapper,
17+
'credential-type',
18+
'4D7920746573742063726564656E7469616C',
19+
)
20+
expectSimpleRowText(wrapper, 'subject', '120')
21+
expectSimpleRowText(wrapper, 'issuer', '')
22+
23+
wrapper.unmount()
24+
})
25+
})

0 commit comments

Comments
 (0)