Skip to content

Commit fd3dcbd

Browse files
fix(extension): translation keys casing and unit tests
1 parent 9b192a8 commit fd3dcbd

File tree

7 files changed

+31
-31
lines changed

7 files changed

+31
-31
lines changed

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRegistrationContainer.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,12 @@ describe('Testing ConfirmDRepRegistrationContainer component', () => {
161161
url: certificate.anchor?.url
162162
},
163163
translations: {
164-
metadata: t('core.drepRegistration.metadata'),
164+
metadata: t('core.DRepRegistration.metadata'),
165165
labels: {
166-
depositPaid: t('core.drepRegistration.depositPaid'),
167-
drepId: t('core.drepRegistration.drepId'),
168-
hash: t('core.drepRegistration.hash'),
169-
url: t('core.drepRegistration.url')
166+
depositPaid: t('core.DRepRegistration.depositPaid'),
167+
drepId: t('core.DRepRegistration.drepId'),
168+
hash: t('core.DRepRegistration.hash'),
169+
url: t('core.DRepRegistration.url')
170170
}
171171
},
172172
errorMessage

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepRetirementContainer.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ describe('Testing ConfirmDRepRetirementContainer component', () => {
173173
drepId: Cardano.DRepID(HexBlob.toTypedBech32('drep', Wallet.HexBlob(certificate.dRepCredential.hash)))
174174
},
175175
translations: {
176-
metadata: t('core.drepRetirement.metadata'),
176+
metadata: t('core.DRepRetirement.metadata'),
177177
labels: {
178-
depositReturned: t('core.drepRetirement.depositReturned'),
179-
drepId: t('core.drepRetirement.drepId')
178+
depositReturned: t('core.DRepRetirement.depositReturned'),
179+
drepId: t('core.DRepRetirement.drepId')
180180
}
181181
},
182182
errorMessage
@@ -198,7 +198,7 @@ describe('Testing ConfirmDRepRetirementContainer component', () => {
198198
expect(queryByTestId('ConfirmDRepRetirementContainer')).toBeInTheDocument();
199199
expect(
200200
mockConfirmDRepRetirement.mock.calls[mockConfirmDRepRetirement.mock.calls.length - 1][0].errorMessage
201-
).toEqual(t('core.drepRetirement.isOwnRetirement'));
201+
).toEqual(t('core.DRepRetirement.isOwnRetirement'));
202202
});
203203

204204
test('should render ConfirmDRepRetirementContainer component with proper error for not own retirement', async () => {
@@ -215,6 +215,6 @@ describe('Testing ConfirmDRepRetirementContainer component', () => {
215215

216216
expect(
217217
mockConfirmDRepRetirement.mock.calls[mockConfirmDRepRetirement.mock.calls.length - 1][0].errorMessage
218-
).toEqual(t('core.drepRetirement.isNotOwnRetirement'));
218+
).toEqual(t('core.DRepRetirement.isNotOwnRetirement'));
219219
});
220220
});

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmDRepUpdateContainer.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,11 @@ describe('Testing ConfirmDRepUpdateContainer component', () => {
153153
url: certificate.anchor?.url
154154
},
155155
translations: {
156-
metadata: t('core.drepUpdate.metadata'),
156+
metadata: t('core.DRepUpdate.metadata'),
157157
labels: {
158-
drepId: t('core.drepUpdate.drepId'),
159-
hash: t('core.drepUpdate.hash'),
160-
url: t('core.drepUpdate.url')
158+
drepId: t('core.DRepUpdate.drepId'),
159+
hash: t('core.DRepUpdate.hash'),
160+
url: t('core.DRepUpdate.url')
161161
}
162162
},
163163
errorMessage

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/ConfirmVoteDelegationContainer.test.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,12 @@ describe('Testing ConfirmVoteDelegationContainer component', () => {
155155
)
156156
},
157157
translations: {
158-
metadata: t('core.voteDelegation.metadata'),
159-
option: t('core.voteDelegation.option'),
158+
metadata: t('core.VoteDelegation.metadata'),
159+
option: t('core.VoteDelegation.option'),
160160
labels: {
161-
drepId: t('core.voteDelegation.drepId'),
162-
alwaysAbstain: t('core.voteDelegation.alwaysAbstain'),
163-
alwaysNoConfidence: t('core.voteDelegation.alwaysNoConfidence')
161+
drepId: t('core.VoteDelegation.drepId'),
162+
alwaysAbstain: t('core.VoteDelegation.alwaysAbstain'),
163+
alwaysNoConfidence: t('core.VoteDelegation.alwaysNoConfidence')
164164
}
165165
},
166166
errorMessage

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/VotingProceduresContainer.test.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -230,19 +230,19 @@ describe('Testing VotingProceduresContainer component', () => {
230230
}))
231231
})),
232232
translations: {
233-
voterType: t('core.votingProcedures.voterType'),
234-
procedureTitle: t('core.votingProcedures.procedureTitle'),
235-
actionIdTitle: t('core.votingProcedures.actionIdTitle'),
236-
vote: t('core.votingProcedures.vote'),
233+
voterType: t('core.VotingProcedures.voterType'),
234+
procedureTitle: t('core.VotingProcedures.procedureTitle'),
235+
actionIdTitle: t('core.VotingProcedures.actionIdTitle'),
236+
vote: t('core.VotingProcedures.vote'),
237237
actionId: {
238-
index: t('core.votingProcedures.actionId.index'),
239-
txHash: t('core.votingProcedures.actionId.txHash')
238+
index: t('core.VotingProcedures.actionId.index'),
239+
txHash: t('core.VotingProcedures.actionId.txHash')
240240
},
241241
anchor: {
242-
hash: t('core.votingProcedures.anchor.hash'),
243-
url: t('core.votingProcedures.anchor.url')
242+
hash: t('core.VotingProcedures.anchor.hash'),
243+
url: t('core.VotingProcedures.anchor.url')
244244
},
245-
dRepId: t('core.votingProcedures.dRepId')
245+
dRepId: t('core.VotingProcedures.dRepId')
246246
},
247247
errorMessage
248248
},

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/__tests__/utils.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ describe('Testing utils', () => {
152152

153153
test('testing getOwnRetirementMessageKey', () => {
154154
expect(getOwnRetirementMessageKey(undefined)).toEqual('');
155-
expect(getOwnRetirementMessageKey(true)).toEqual('core.drepRetirement.isOwnRetirement');
156-
expect(getOwnRetirementMessageKey(false)).toEqual('core.drepRetirement.isNotOwnRetirement');
155+
expect(getOwnRetirementMessageKey(true)).toEqual('core.DRepRetirement.isOwnRetirement');
156+
expect(getOwnRetirementMessageKey(false)).toEqual('core.DRepRetirement.isNotOwnRetirement');
157157
});
158158
});

apps/browser-extension-wallet/src/features/dapp/components/confirm-transaction/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ export const getOwnRetirementMessageKey = (isOwnRetirement: boolean | undefined)
136136
if (isOwnRetirement === undefined) {
137137
return '';
138138
}
139-
return isOwnRetirement ? 'core.drepRetirement.isOwnRetirement' : 'core.drepRetirement.isNotOwnRetirement';
139+
return isOwnRetirement ? 'core.DRepRetirement.isOwnRetirement' : 'core.DRepRetirement.isNotOwnRetirement';
140140
};

0 commit comments

Comments
 (0)