Rename Money/Url to Currency/Link and remove snake_case from composite fields (#2536)
* Rename Money/Url to Currency/Link * regenerate front types * renaming money/url field types * fix double text * fix tests * fix server tests * fix generate-target-column-map * fix currency convert * fix: tests --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
@ -12,21 +12,21 @@ describe('generateTargetColumnMap', () => {
|
||||
);
|
||||
expect(textMap).toEqual({ value: 'name' });
|
||||
|
||||
const urlMap = generateTargetColumnMap(
|
||||
FieldMetadataType.URL,
|
||||
const linkMap = generateTargetColumnMap(
|
||||
FieldMetadataType.LINK,
|
||||
false,
|
||||
'website',
|
||||
);
|
||||
expect(urlMap).toEqual({ text: 'website_text', link: 'website_link' });
|
||||
expect(linkMap).toEqual({ label: 'websiteLabel', url: 'websiteUrl' });
|
||||
|
||||
const moneyMap = generateTargetColumnMap(
|
||||
FieldMetadataType.MONEY,
|
||||
const currencyMap = generateTargetColumnMap(
|
||||
FieldMetadataType.CURRENCY,
|
||||
true,
|
||||
'price',
|
||||
);
|
||||
expect(moneyMap).toEqual({
|
||||
amount: '_price_amount',
|
||||
currency: '_price_currency',
|
||||
expect(currencyMap).toEqual({
|
||||
amountMicros: '_priceAmountMicros',
|
||||
currencyCode: '_priceCurrencyCode',
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user