diff --git a/src/containers/Transactions/DetailTab/HookDetails.tsx b/src/containers/Transactions/DetailTab/HookDetails.tsx index 0d8d9e9ad..57397e7a6 100644 --- a/src/containers/Transactions/DetailTab/HookDetails.tsx +++ b/src/containers/Transactions/DetailTab/HookDetails.tsx @@ -18,7 +18,7 @@ const renderHookParameterName = (name: string) => { const EmitDetails: FC<{ emitDetails: any }> = ({ emitDetails }) => { const { t } = useTranslation() return ( -
+
{t('emit_details')}
  • = ({ data }) => { if (!tx.EmitDetails && !tx.HookParameters && !meta.HookExecutions) return null return ( -
    +
    {t('hooks')}
    {tx.EmitDetails && } {tx.HookParameters && ( -
    +
    {t('hook_parameters')}
    {tx.HookParameters.map(HookParameter)}
    )} {meta.HookExecutions && ( -
    +
    {t('hook_executions')}
    {meta.HookExecutions.map(HookExecution)}
    diff --git a/src/containers/Transactions/DetailTab/index.tsx b/src/containers/Transactions/DetailTab/index.tsx index f2870ee54..030d117e3 100644 --- a/src/containers/Transactions/DetailTab/index.tsx +++ b/src/containers/Transactions/DetailTab/index.tsx @@ -38,7 +38,7 @@ export const DetailTab: FC<{ data: any }> = ({ data }) => { } return ( -
    +
    {t('status')}
    {line1} {t('transaction_validated')} diff --git a/src/containers/Transactions/SimpleTab.tsx b/src/containers/Transactions/SimpleTab.tsx index 6f22553e3..1db2ba9fc 100644 --- a/src/containers/Transactions/SimpleTab.tsx +++ b/src/containers/Transactions/SimpleTab.tsx @@ -44,21 +44,21 @@ export const SimpleTab: FC<{ data: any; width: number }> = ({ <> {time} - + {ledgerIndex} {account && ( - + )} - + = ({ isHook={isHook} /> - + {fee} diff --git a/src/containers/Transactions/test/Description.test.tsx b/src/containers/Transactions/test/Description.test.tsx index 4c6074494..3f8b7abc1 100644 --- a/src/containers/Transactions/test/Description.test.tsx +++ b/src/containers/Transactions/test/Description.test.tsx @@ -33,7 +33,7 @@ describe('Description container', () => { it('renders sequence number with ticket', () => { const wrapper = createWrapper(OfferCreateTicket) - expect(wrapper.find(`[data-test="sequence"]`)).toHaveText( + expect(wrapper.find(`[data-testid="sequence"]`)).toHaveText( '79469284 (a Ticket was used for this Transaction)', ) wrapper.unmount() @@ -41,7 +41,7 @@ describe('Description container', () => { it('renders sequence number with hook', () => { const wrapper = createWrapper(EmittedPayment) - expect(wrapper.find(`[data-test="sequence"]`)).toHaveText( + expect(wrapper.find(`[data-testid="sequence"]`)).toHaveText( '0 (this Transaction was emitted by a Hook)', ) wrapper.unmount() diff --git a/src/containers/Transactions/test/DetailTab.test.tsx b/src/containers/Transactions/test/DetailTab.test.tsx index 46ff5488c..198661780 100644 --- a/src/containers/Transactions/test/DetailTab.test.tsx +++ b/src/containers/Transactions/test/DetailTab.test.tsx @@ -55,32 +55,34 @@ describe('DetailTab container', () => { it('renders failed transaction', () => { const wrapper = createWrapper(FailedTransaction) - expect(wrapper.find('.detail-section[data-test="status"]').text()).toEqual( + expect( + wrapper.find('.detail-section[data-testid="status"]').text(), + ).toEqual( expect.stringContaining( 'This transaction failed with a status code of tecINSUFFICIENT_RESERVE, and validated in ledger 37375929 on', ), ) expect( - wrapper.find('.detail-section[data-test="status"] .fail').text(), + wrapper.find('.detail-section[data-testid="status"] .fail').text(), ).toEqual('tecINSUFFICIENT_RESERVE') wrapper.unmount() }) it('renders hooks section', () => { const wrapper = createWrapper(HookPayment) - expect(wrapper.find('.detail-section[data-test="hooks"]')).toHaveLength(1) + expect(wrapper.find('.detail-section[data-testid="hooks"]')).toHaveLength(1) - const hooksWrapper = wrapper.find('.detail-section[data-test="hooks"]') + const hooksWrapper = wrapper.find('.detail-section[data-testid="hooks"]') expect( - hooksWrapper.find('.detail-subsection[data-test="emit-details"]'), + hooksWrapper.find('.detail-subsection[data-testid="emit-details"]'), ).toHaveLength(0) expect( - hooksWrapper.find('.detail-subsection[data-test="hook-params"]'), + hooksWrapper.find('.detail-subsection[data-testid="hook-params"]'), ).toHaveLength(1) const paramWrapper = hooksWrapper.find( - '.detail-subsection[data-test="hook-params"]', + '.detail-subsection[data-testid="hook-params"]', ) expect(paramWrapper.find('li')).toHaveLength(2) expect(paramWrapper.find('li').at(0)).toHaveText('EVR2: evnHostUpdateReg') @@ -89,10 +91,10 @@ describe('DetailTab container', () => { ) expect( - hooksWrapper.find('.detail-subsection[data-test="hook-executions"]'), + hooksWrapper.find('.detail-subsection[data-testid="hook-executions"]'), ).toHaveLength(1) const execWrapper = hooksWrapper.find( - '.detail-subsection[data-test="hook-executions"]', + '.detail-subsection[data-testid="hook-executions"]', ) expect(execWrapper.find('li')).toHaveLength(1) expect(execWrapper.find('.detail-line')).toHaveLength(4) @@ -115,15 +117,15 @@ describe('DetailTab container', () => { it('renders hooks section for emitted tx', () => { const wrapper = createWrapper(EmittedPayment) - expect(wrapper.find('.detail-section[data-test="hooks"]')).toHaveLength(1) + expect(wrapper.find('.detail-section[data-testid="hooks"]')).toHaveLength(1) - const hooksWrapper = wrapper.find('.detail-section[data-test="hooks"]') + const hooksWrapper = wrapper.find('.detail-section[data-testid="hooks"]') expect( - hooksWrapper.find('.detail-subsection[data-test="emit-details"]'), + hooksWrapper.find('.detail-subsection[data-testid="emit-details"]'), ).toHaveLength(1) const emitWrapper = hooksWrapper.find( - '.detail-subsection[data-test="emit-details"]', + '.detail-subsection[data-testid="emit-details"]', ) expect(emitWrapper.find('.detail-line')).toHaveLength(4) expect(emitWrapper.find('.detail-line').at(0)).toHaveText( @@ -142,14 +144,14 @@ describe('DetailTab container', () => { expect(emitWrapper.find('.detail-line').at(3).find('a')).toExist() expect( - hooksWrapper.find('.detail-subsection[data-test="hook-params"]'), + hooksWrapper.find('.detail-subsection[data-testid="hook-params"]'), ).toHaveLength(0) expect( - hooksWrapper.find('.detail-subsection[data-test="hook-executions"]'), + hooksWrapper.find('.detail-subsection[data-testid="hook-executions"]'), ).toHaveLength(1) const execWrapper = hooksWrapper.find( - '.detail-subsection[data-test="hook-executions"]', + '.detail-subsection[data-testid="hook-executions"]', ) expect(execWrapper.find('li')).toHaveLength(1) expect(execWrapper.find('.detail-line')).toHaveLength(4) diff --git a/src/containers/Validators/Simple/index.tsx b/src/containers/Validators/Simple/index.tsx index ff115adec..6d55d659b 100644 --- a/src/containers/Validators/Simple/index.tsx +++ b/src/containers/Validators/Simple/index.tsx @@ -17,7 +17,7 @@ const Simple = ({ data }: SimpleProps) => { label: string, ) => d ? ( -
    +
    {label}
    { return ( <> {data.domain || 'Unknown'} - + {data.server_version}
    diff --git a/src/containers/Validators/SimpleTab.tsx b/src/containers/Validators/SimpleTab.tsx index 8098577f8..802ed35a1 100644 --- a/src/containers/Validators/SimpleTab.tsx +++ b/src/containers/Validators/SimpleTab.tsx @@ -47,7 +47,7 @@ export const SimpleTab: FC<{ label={`Last Ledger ${t('formatted_date', { timeZone: TIME_ZONE, })}`} - data-test="ledger-time" + data-testid="ledger-time" > {localizeDate(new Date(lastLedgerTime), language, DATE_OPTIONS)} @@ -55,7 +55,7 @@ export const SimpleTab: FC<{ {ledgerIndex && ( {ledgerIndex} diff --git a/src/containers/Validators/test/Validator.test.js b/src/containers/Validators/test/Validator.test.js index c7a52bfe9..56475634f 100644 --- a/src/containers/Validators/test/Validator.test.js +++ b/src/containers/Validators/test/Validator.test.js @@ -188,10 +188,10 @@ describe('Validator container', () => { expect(getLedger).toBeCalledWith('12345', undefined) expect(document.title).toBe('Validator test.example.com') // test ledger-time isn't updated - const lastLedgerDateTime = wrapper.find(`[data-test="ledger-time"]`) + const lastLedgerDateTime = wrapper.find(`[data-testid="ledger-time"]`) expect(lastLedgerDateTime).not.toExist() // test ledger-index stays the same - const lastLedgerIndex = wrapper.find(`[data-test="ledger-index"]`) + const lastLedgerIndex = wrapper.find(`[data-testid="ledger-index"]`) expect(lastLedgerIndex).toExist() expect(lastLedgerIndex.find('.value')).toHaveText('12345') wrapper.unmount() diff --git a/src/containers/shared/components/Sequence.tsx b/src/containers/shared/components/Sequence.tsx index 588573fcd..54654a056 100644 --- a/src/containers/shared/components/Sequence.tsx +++ b/src/containers/shared/components/Sequence.tsx @@ -30,7 +30,7 @@ export const Sequence: FC = ({ return ( {sequence === 0 && !isPseudoTransaction ? ( - + {ticketSequence} {' ('} {getContext()}) diff --git a/src/containers/shared/components/Transaction/AMMBid/Simple.tsx b/src/containers/shared/components/Transaction/AMMBid/Simple.tsx index 4fd893e49..427c91354 100644 --- a/src/containers/shared/components/Transaction/AMMBid/Simple.tsx +++ b/src/containers/shared/components/Transaction/AMMBid/Simple.tsx @@ -11,22 +11,22 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {ammAccountID && ( - + )} {bidMin && ( - + )} {bidMax && ( - + )} {authAccounts && ( - + {authAccounts.map((accID: string) => ( ))} diff --git a/src/containers/shared/components/Transaction/AMMCreate/Simple.tsx b/src/containers/shared/components/Transaction/AMMCreate/Simple.tsx index 55064ef1c..22e4bf720 100644 --- a/src/containers/shared/components/Transaction/AMMCreate/Simple.tsx +++ b/src/containers/shared/components/Transaction/AMMCreate/Simple.tsx @@ -13,22 +13,22 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {ammAccountID && ( - + )} {amount && ( - + )} {amount2 && ( - + )} {tf && ( - + {tf}% )} diff --git a/src/containers/shared/components/Transaction/AMMDelete/Description.tsx b/src/containers/shared/components/Transaction/AMMDelete/Description.tsx index 2c2fd6dff..a0ef7ca68 100644 --- a/src/containers/shared/components/Transaction/AMMDelete/Description.tsx +++ b/src/containers/shared/components/Transaction/AMMDelete/Description.tsx @@ -9,7 +9,7 @@ export const Description = ({ const { Asset, Asset2 } = data.tx return ( -
    +
    ) => { return ( <> - + - + diff --git a/src/containers/shared/components/Transaction/AMMDelete/TableDetail.tsx b/src/containers/shared/components/Transaction/AMMDelete/TableDetail.tsx index b9dca25c4..74ab698c8 100644 --- a/src/containers/shared/components/Transaction/AMMDelete/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/AMMDelete/TableDetail.tsx @@ -11,11 +11,11 @@ export const TableDetail = ({ return (
    -
    +
    {t('asset1')}
    -
    +
    {t('asset2')}
    diff --git a/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteDescription.test.tsx b/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteDescription.test.tsx index b1b5e5cb7..a3c04bebe 100644 --- a/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteDescription.test.tsx +++ b/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteDescription.test.tsx @@ -9,7 +9,7 @@ describe('AMMDelete: Description', () => { it('renders description for AMMDelete transaction', () => { const wrapper = createWrapper(mockAMMDelete) - expect(wrapper.find('[data-test="amm-delete-description"]')).toHaveText( + expect(wrapper.find('[data-testid="amm-delete-description"]')).toHaveText( 'Attempted to delete the AMM for \uE900 XRP and FOO.rm5c42Crqpdch5fbuCdHmSMV1wrL9arV9.If there were more than 512 trustlines, this only removes 512 trustlines instead.', ) expect(wrapper.find('a')).toHaveProp( diff --git a/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteTableDetail.test.tsx b/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteTableDetail.test.tsx index 60de4ef34..2d2b6ea70 100644 --- a/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/AMMDelete/test/AMMDeleteTableDetail.test.tsx @@ -9,8 +9,10 @@ describe('AMMDelete: TableDetail', () => { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockAMMDelete) - expect(wrapper.find('[data-test="asset"]')).toHaveText('Asset 1\uE900 XRP') - expect(wrapper.find('[data-test="asset2"]')).toHaveText( + expect(wrapper.find('[data-testid="asset"]')).toHaveText( + 'Asset 1\uE900 XRP', + ) + expect(wrapper.find('[data-testid="asset2"]')).toHaveText( 'Asset 2FOO.rm5c42Crqpdch5fbuCdHmSMV1wrL9arV9', ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/AMMDeposit/Simple.tsx b/src/containers/shared/components/Transaction/AMMDeposit/Simple.tsx index 80304f43c..df34d3df4 100644 --- a/src/containers/shared/components/Transaction/AMMDeposit/Simple.tsx +++ b/src/containers/shared/components/Transaction/AMMDeposit/Simple.tsx @@ -18,27 +18,27 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {ammAccountID && ( - + )} {amount && ( - + )} {amount2 && ( - + )} {ePrice && ( - + )} {lpTokenFormatted && ( - + {lpTokenFormatted} )} diff --git a/src/containers/shared/components/Transaction/AMMVote/Simple.tsx b/src/containers/shared/components/Transaction/AMMVote/Simple.tsx index ee1b17ab9..e79a82d13 100644 --- a/src/containers/shared/components/Transaction/AMMVote/Simple.tsx +++ b/src/containers/shared/components/Transaction/AMMVote/Simple.tsx @@ -13,22 +13,22 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {ammAccountID && ( - + )} {amount && ( - + )} {amount2 && ( - + )} {tf && ( - + {tf}% )} diff --git a/src/containers/shared/components/Transaction/AMMWithdraw/Simple.tsx b/src/containers/shared/components/Transaction/AMMWithdraw/Simple.tsx index 37a1f39eb..0d65e0505 100644 --- a/src/containers/shared/components/Transaction/AMMWithdraw/Simple.tsx +++ b/src/containers/shared/components/Transaction/AMMWithdraw/Simple.tsx @@ -18,27 +18,27 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {ammAccountID && ( - + )} {amount && ( - + )} {amount2 && ( - + )} {ePrice && ( - + )} {lpTokenFormatted && ( - + {lpTokenFormatted} )} diff --git a/src/containers/shared/components/Transaction/AccountSet/Description.tsx b/src/containers/shared/components/Transaction/AccountSet/Description.tsx index f93309913..298ac23c0 100644 --- a/src/containers/shared/components/Transaction/AccountSet/Description.tsx +++ b/src/containers/shared/components/Transaction/AccountSet/Description.tsx @@ -14,24 +14,24 @@ export const Description = ({ return ( <> {tx.Domain && ( -
    +
    {t('set_domain_description')}
    )} {tx.EmailHash && ( -
    +
    {t('set_email_description')} {tx.EmailHash}
    )} {tx.MessageKey && ( -
    +
    {t('set_message_key_description')} {tx.MessageKey}
    )} {tx.SetFlag && ( -
    +
    {t('set_flag_description')} {' '} @@ -40,7 +40,7 @@ export const Description = ({
    )} {tx.ClearFlag && ( -
    +
    {t('clear_flag_description')} {' '} @@ -49,7 +49,7 @@ export const Description = ({
    )} {tx.NFTokenMinter && ( -
    +
    diff --git a/src/containers/shared/components/Transaction/AccountSet/Simple.tsx b/src/containers/shared/components/Transaction/AccountSet/Simple.tsx index 6822640d0..3dcf9168e 100644 --- a/src/containers/shared/components/Transaction/AccountSet/Simple.tsx +++ b/src/containers/shared/components/Transaction/AccountSet/Simple.tsx @@ -13,22 +13,26 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> {tx.Domain && ( - + )} {tx.EmailHash && ( - + {tx.EmailHash} )} {tx.MessageKey && ( - + {tx.MessageKey} )} {tx.SetFlag && ( - + {ACCOUNT_FLAGS[tx.SetFlag] || tx.SetFlag} )} @@ -36,13 +40,13 @@ export const Simple = ({ data }: TransactionSimpleProps) => { {ACCOUNT_FLAGS[tx.ClearFlag] || tx.ClearFlag} )} {tx.NFTokenMinter && ( - + )} diff --git a/src/containers/shared/components/Transaction/AccountSet/TableDetail.tsx b/src/containers/shared/components/Transaction/AccountSet/TableDetail.tsx index bfee92fd6..f999da167 100644 --- a/src/containers/shared/components/Transaction/AccountSet/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/AccountSet/TableDetail.tsx @@ -12,25 +12,25 @@ export const TableDetail = ({ return ( <> {tx.Domain && ( -
    +
    {t('domain')}:{' '} {decodeHex(tx.Domain)}
    )} {tx.EmailHash && ( -
    +
    {t('email_hash')}:{' '} {tx.EmailHash}
    )} {tx.MessageKey && ( -
    +
    {t('message_key')}:{' '} {tx.MessageKey}
    )} {tx.SetFlag && ( -
    +
    {t('set_flag')}:{' '} {ACCOUNT_FLAGS[Number(tx.SetFlag)] || tx.SetFlag} @@ -38,7 +38,7 @@ export const TableDetail = ({
    )} {tx.ClearFlag && ( -
    +
    {t('clear_flag')}:{' '} {ACCOUNT_FLAGS[Number(tx.ClearFlag)] || tx.ClearFlag} @@ -46,7 +46,7 @@ export const TableDetail = ({
    )} {tx.NFTokenMinter && ( -
    +
    {t('nftoken_minter')}:{' '} diff --git a/src/containers/shared/components/Transaction/AccountSet/test/AccountSetDescription.test.tsx b/src/containers/shared/components/Transaction/AccountSet/test/AccountSetDescription.test.tsx index 6d3203af3..17c70de7c 100644 --- a/src/containers/shared/components/Transaction/AccountSet/test/AccountSetDescription.test.tsx +++ b/src/containers/shared/components/Transaction/AccountSet/test/AccountSetDescription.test.tsx @@ -64,7 +64,7 @@ describe('AccountSet: Description', () => { it('renders tx that sets a message', () => { const wrapper = createWrapper(mockAccountSetWithMessageKey) - expect(wrapper.find('[data-test="message-key"]')).toHaveText( + expect(wrapper.find('[data-testid="message-key"]')).toHaveText( 'It sets the account message key as 020000000000000000000000000941C216565D33C8A8ACD1A33C359E84D652D1DA', ) wrapper.unmount() @@ -72,7 +72,7 @@ describe('AccountSet: Description', () => { it('renders tx that sets a minter', () => { const wrapper = createWrapper(mockAccountSetWithNFTokenMinter) - expect(wrapper.find('[data-test="minter"]')).toHaveText( + expect(wrapper.find('[data-testid="minter"]')).toHaveText( 'It sets rXMART8usFd5kABXCayoP6ZfB35b4v43t as the authorized minter for this account', ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/AccountSet/test/AccountSetTableDetail.test.tsx b/src/containers/shared/components/Transaction/AccountSet/test/AccountSetTableDetail.test.tsx index 5af3ae3b0..dbc1527ff 100644 --- a/src/containers/shared/components/Transaction/AccountSet/test/AccountSetTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/AccountSet/test/AccountSetTableDetail.test.tsx @@ -70,7 +70,7 @@ describe('AccountSet: TableDetail', () => { it('renders tx that sets a minter', () => { const wrapper = createWrapper(mockAccountSetWithNFTokenMinter) - expect(wrapper.find('[data-test="minter"]')).toHaveText( + expect(wrapper.find('[data-testid="minter"]')).toHaveText( 'NFT Minter: rXMART8usFd5kABXCayoP6ZfB35b4v43t', ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/Clawback/Description.tsx b/src/containers/shared/components/Transaction/Clawback/Description.tsx index c92397c35..c7b1684b3 100644 --- a/src/containers/shared/components/Transaction/Clawback/Description.tsx +++ b/src/containers/shared/components/Transaction/Clawback/Description.tsx @@ -11,7 +11,7 @@ export const Description = ({ data }: TransactionDescriptionProps) => { amount.issuer = issuer return ( <> -
    +
    { }} />
    -
    +
    {holder && ( - + )} {amount && ( - + )} diff --git a/src/containers/shared/components/Transaction/Clawback/test/ClawbackDescription.test.tsx b/src/containers/shared/components/Transaction/Clawback/test/ClawbackDescription.test.tsx index 771a6c000..2bd59f9ff 100644 --- a/src/containers/shared/components/Transaction/Clawback/test/ClawbackDescription.test.tsx +++ b/src/containers/shared/components/Transaction/Clawback/test/ClawbackDescription.test.tsx @@ -8,10 +8,10 @@ const createWrapper = createDescriptionWrapperFactory(Description, i18n) describe('Clawback', () => { it('handles Clawback Description ', () => { const wrapper = createWrapper(transaction) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `rDZ713igKfedN4hhY6SjQse4Mv3ZrBxnn9 claws back from rscBWQpyZEmQvupeB1quu7Ky8YX4f5CHDP`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `The max clawback amount is 4,840.00 FOO.rDZ713igKfedN4hhY6SjQse4Mv3ZrBxnn9`, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/DIDSet/Simple.tsx b/src/containers/shared/components/Transaction/DIDSet/Simple.tsx index 62dc4f872..79a904485 100644 --- a/src/containers/shared/components/Transaction/DIDSet/Simple.tsx +++ b/src/containers/shared/components/Transaction/DIDSet/Simple.tsx @@ -14,17 +14,17 @@ const Simple: TransactionSimpleComponent = ( return ( <> {URI && ( - + {convertHexToString(URI)} )} {DIDDocument && ( - + {convertHexToString(DIDDocument)} )} {Attestation && ( - + {convertHexToString(Attestation)} )} diff --git a/src/containers/shared/components/Transaction/DefaultSimple.tsx b/src/containers/shared/components/Transaction/DefaultSimple.tsx index e9c92404f..481616688 100644 --- a/src/containers/shared/components/Transaction/DefaultSimple.tsx +++ b/src/containers/shared/components/Transaction/DefaultSimple.tsx @@ -79,7 +79,7 @@ const processValue = (value: any) => { return (
    {Object.entries(value).map(([childKey, childValue]) => ( -
    +
    {`${childKey}: `} {processValue(childValue)}
    @@ -97,7 +97,7 @@ const getRowNested = (key: any, value: any, uniqueKey: string = '') => { @@ -109,7 +109,7 @@ const getRowNested = (key: any, value: any, uniqueKey: string = '') => { @@ -121,7 +121,7 @@ const getRowNested = (key: any, value: any, uniqueKey: string = '') => { @@ -131,7 +131,7 @@ const getRowNested = (key: any, value: any, uniqueKey: string = '') => { {processValue(value)} @@ -153,7 +153,7 @@ const getRow = (key: any, value: any) => { // eslint-disable-next-line react/no-array-index-key -- okay here key={`group_${innerKey}_${index}`} title={displayKey(innerKey)} - data-test={key} + data-testid={key} > {Object.entries(innerValue[innerKey]).map( ([childKey, childValue], index2) => @@ -174,7 +174,7 @@ const getRow = (key: any, value: any) => { !isAmount(value, key) ) { return ( - + {Object.entries(value).map(([childKey, childValue], index) => getRowNested(childKey, childValue, index.toString()), )} diff --git a/src/containers/shared/components/Transaction/EnableAmendment/Simple.tsx b/src/containers/shared/components/Transaction/EnableAmendment/Simple.tsx index 35f885c53..7e67c209b 100644 --- a/src/containers/shared/components/Transaction/EnableAmendment/Simple.tsx +++ b/src/containers/shared/components/Transaction/EnableAmendment/Simple.tsx @@ -56,7 +56,7 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> - + ) => { {amendmentDetails.name} - + {amendmentStatus} - + {amendmentDetails.minRippledVersion} {amendmentStatus === 'Got Majority' && ( - + {expectedDate} )} diff --git a/src/containers/shared/components/Transaction/EnableAmendment/test/EnableAmendmentSimple.test.tsx b/src/containers/shared/components/Transaction/EnableAmendment/test/EnableAmendmentSimple.test.tsx index 476931b4d..a39951432 100644 --- a/src/containers/shared/components/Transaction/EnableAmendment/test/EnableAmendmentSimple.test.tsx +++ b/src/containers/shared/components/Transaction/EnableAmendment/test/EnableAmendmentSimple.test.tsx @@ -58,7 +58,7 @@ describe('EnableAmendment: Simple', () => { expectSimpleRowText(wrapper, 'status', 'Lost Majority') expectSimpleRowLabel(wrapper, 'version', 'Introduced In') expectSimpleRowText(wrapper, 'version', 'Loading') - expect(wrapper.find('[data-test="date"]')).not.toExist() + expect(wrapper.find('[data-testid="date"]')).not.toExist() await flushPromises() wrapper.update() @@ -89,7 +89,7 @@ describe('EnableAmendment: Simple', () => { expectSimpleRowText(wrapper, 'name', 'ExpandedSignerList') expectSimpleRowText(wrapper, 'version', 'v1.9.1') - expect(wrapper.find('[data-test="name"] .value a')).toHaveProp( + expect(wrapper.find('[data-testid="name"] .value a')).toHaveProp( 'href', '/amendment/B2A4DB846F0891BF2C76AB2F2ACC8F5B4EC64437135C6E56F3F859DE5FFD5856', ) diff --git a/src/containers/shared/components/Transaction/EscrowCancel/Simple.tsx b/src/containers/shared/components/Transaction/EscrowCancel/Simple.tsx index 38f50e159..8dc5152b9 100644 --- a/src/containers/shared/components/Transaction/EscrowCancel/Simple.tsx +++ b/src/containers/shared/components/Transaction/EscrowCancel/Simple.tsx @@ -13,7 +13,7 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { data.instructions return ( <> - + {` - ${sequence}`} @@ -21,14 +21,14 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { {condition} )} {amount.amount && ( - + )} {destination && ( @@ -37,7 +37,7 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockEscrowCancel) - expect(wrapper.find('[data-test="escrow-amount"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-amount"] .value')).toHaveText( `\uE900135.79 XRP`, ) - expect(wrapper.find('[data-test="escrow-cancel"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-cancel"] .value')).toHaveText( 'rpmqbo5FWoydTL2Ufh5YdtzmRjbeLyxt56 - 9', ) - expect(wrapper.find('[data-test="escrow-cancel-tx"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-cancel-tx"] .value')).toHaveText( `A979AD5C6A6C844913DA51D71BF5F0B8E254D9A211FA837C4B322C4A8FD358E6`, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/EscrowCreate/Simple.tsx b/src/containers/shared/components/Transaction/EscrowCreate/Simple.tsx index e4c8a9b52..e8b1998bb 100644 --- a/src/containers/shared/components/Transaction/EscrowCreate/Simple.tsx +++ b/src/containers/shared/components/Transaction/EscrowCreate/Simple.tsx @@ -22,16 +22,16 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { return ( <> - + {destination && ( - + )} {condition && ( - + {condition} )} diff --git a/src/containers/shared/components/Transaction/EscrowCreate/TableDetail.tsx b/src/containers/shared/components/Transaction/EscrowCreate/TableDetail.tsx index 98cf42ba8..8300b5caa 100644 --- a/src/containers/shared/components/Transaction/EscrowCreate/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/EscrowCreate/TableDetail.tsx @@ -15,13 +15,13 @@ export const TableDetail = (props: any) => { {amount && (
    {t('amount')} - +
    )} {destination && (
    {t('destination')} - + {' '} {destination}{' '} @@ -30,7 +30,7 @@ export const TableDetail = (props: any) => { {condition && (
    {t('condition')} - + {' '} {condition}{' '} @@ -39,7 +39,7 @@ export const TableDetail = (props: any) => { {finishAfter && (
    {t('finish_after')} - + {localizeDate(new Date(finishAfter), language, DATE_OPTIONS)} UTC
    @@ -47,7 +47,7 @@ export const TableDetail = (props: any) => { {cancelAfter && (
    {t('cancel_after')} - + {localizeDate(new Date(cancelAfter), language, DATE_OPTIONS)} UTC
    diff --git a/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateSimple.test.tsx b/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateSimple.test.tsx index 41f91ade0..27da075d6 100644 --- a/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateSimple.test.tsx +++ b/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateSimple.test.tsx @@ -7,13 +7,13 @@ const createWrapper = createSimpleWrapperFactory(Simple) describe('EscrowCreateSimple', () => { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockEscrowCreate) - expect(wrapper.find('[data-test="escrow-amount"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-amount"] .value')).toHaveText( `\uE900997.50 XRP`, ) - expect(wrapper.find('[data-test="escrow-destination"] .value')).toHaveText( - `rLbgNAngLq3HABBXK4uPGCHrqeZwgaYi7q`, - ) - expect(wrapper.find('[data-test="escrow-condition"] .value')).toHaveText( + expect( + wrapper.find('[data-testid="escrow-destination"] .value'), + ).toHaveText(`rLbgNAngLq3HABBXK4uPGCHrqeZwgaYi7q`) + expect(wrapper.find('[data-testid="escrow-condition"] .value')).toHaveText( `A0258020886F982742772F414243855DC13B348FC78FB3D5119412C8A6480114E36A4451810120`, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateTableDetail.test.tsx b/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateTableDetail.test.tsx index b42345306..8bdca0c92 100644 --- a/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/EscrowCreate/test/EscrowCreateTableDetail.test.tsx @@ -7,17 +7,17 @@ const createWrapper = createTableDetailWrapperFactory(TableDetail) describe('EscrowCreateTableDetail', () => { it('renders EscrowCreate without crashing', () => { const wrapper = createWrapper(mockEscrowCreate) - expect(wrapper.find('[data-test="account"]')).toHaveText( + expect(wrapper.find('[data-testid="account"]')).toHaveText( ` rLbgNAngLq3HABBXK4uPGCHrqeZwgaYi7q `, ) - expect(wrapper.find('[data-test="amount"]')).toHaveText(`997.50 XRP`) - expect(wrapper.find('[data-test="condition"]')).toHaveText( + expect(wrapper.find('[data-testid="amount"]')).toHaveText(`997.50 XRP`) + expect(wrapper.find('[data-testid="condition"]')).toHaveText( ` A0258020886F982742772F414243855DC13B348FC78FB3D5119412C8A6480114E36A4451810120 `, ) - expect(wrapper.find('[data-test="finish_after"]')).toHaveText( + expect(wrapper.find('[data-testid="finish_after"]')).toHaveText( `March 1, 2020 at 9:01:00 AM UTC`, ) - expect(wrapper.find('[data-test="cancel_after"]')).toHaveText( + expect(wrapper.find('[data-testid="cancel_after"]')).toHaveText( `March 1, 2020 at 8:54:20 AM UTC`, ) diff --git a/src/containers/shared/components/Transaction/EscrowFinish/Simple.tsx b/src/containers/shared/components/Transaction/EscrowFinish/Simple.tsx index 3ee70d634..e2bcceb89 100644 --- a/src/containers/shared/components/Transaction/EscrowFinish/Simple.tsx +++ b/src/containers/shared/components/Transaction/EscrowFinish/Simple.tsx @@ -21,7 +21,7 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { return ( <> - + {` - ${sequence}`} @@ -33,13 +33,13 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { {fulfillment && ( {fulfillment} )} {amount.amount && ( - + )} @@ -52,7 +52,7 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { { return (
    {owner && ( -
    +
    {t('finish_escrow')} {owner} @@ -20,11 +20,11 @@ export const TableDetail = (props: any) => { {amount && (
    {t('amount')} - +
    )} {fulfillment && ( -
    +
    {t('fulfillment')} {fulfillment}
    diff --git a/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishSimple.test.tsx b/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishSimple.test.tsx index 63ad1052e..32c67a94d 100644 --- a/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishSimple.test.tsx +++ b/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishSimple.test.tsx @@ -7,10 +7,10 @@ const createWrapper = createSimpleWrapperFactory(Simple) describe('EscrowFinishSimple', () => { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockEscrowFinish) - expect(wrapper.find('[data-test="escrow-amount"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-amount"] .value')).toHaveText( `\uE9000.0154 XRP`, ) - expect(wrapper.find('[data-test="escrow-tx"] .value')).toHaveText( + expect(wrapper.find('[data-testid="escrow-tx"] .value')).toHaveText( `3E2E755FA75FF1020C39E2ECC407E9F1C0E49A7229EDD15FF93B9F869878F1CC`, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishTableDetail.test.tsx b/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishTableDetail.test.tsx index cc11f5389..7bc188a40 100644 --- a/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/EscrowFinish/test/EscrowFinishTableDetail.test.tsx @@ -7,13 +7,13 @@ const createWrapper = createTableDetailWrapperFactory(TableDetail) describe('EscrowFinishTableDetail', () => { it('renders EscrowFinish without crashing', () => { const wrapper = createWrapper(mockEscrowFinish) - expect(wrapper.find('[data-test="escrow-account"]')).toHaveText( + expect(wrapper.find('[data-testid="escrow-account"]')).toHaveText( `finish_escrowr4UDXF4nL7Tgss8uQxn39cCocd8GnGyXS8 -28`, ) - expect(wrapper.find('[data-test="escrow-amount"]')).toHaveText( + expect(wrapper.find('[data-testid="escrow-amount"]')).toHaveText( `\uE9000.0154 XRP`, ) - expect(wrapper.find('[data-test="escrow-fullfillment"]')).toHaveText( + expect(wrapper.find('[data-testid="escrow-fullfillment"]')).toHaveText( `fulfillment Fulfillment `, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/NFTokenAcceptOffer/Simple.tsx b/src/containers/shared/components/Transaction/NFTokenAcceptOffer/Simple.tsx index c1ccfacef..e2ca6d49a 100644 --- a/src/containers/shared/components/Transaction/NFTokenAcceptOffer/Simple.tsx +++ b/src/containers/shared/components/Transaction/NFTokenAcceptOffer/Simple.tsx @@ -15,22 +15,30 @@ export const Simple: TransactionSimpleComponent = ({ return ( <> {acceptedOfferIDs.map((offer) => ( - + {offer} ))} {amount && seller && buyer && tokenID && ( <> - + - + - + - + diff --git a/src/containers/shared/components/Transaction/NFTokenAcceptOffer/test/NFTokenAcceptOfferSimple.test.tsx b/src/containers/shared/components/Transaction/NFTokenAcceptOffer/test/NFTokenAcceptOfferSimple.test.tsx index ea221e2d0..f324577bc 100644 --- a/src/containers/shared/components/Transaction/NFTokenAcceptOffer/test/NFTokenAcceptOfferSimple.test.tsx +++ b/src/containers/shared/components/Transaction/NFTokenAcceptOffer/test/NFTokenAcceptOfferSimple.test.tsx @@ -68,7 +68,7 @@ describe('NFTokenAcceptOffer', () => { 'token-id', '00081B581189F5687DBB7516339D6CCB5593D96622AD82DF08CFDA8600000A17', ) - expect(wrapper.find('[data-test="offer-id"] .value').length).toBe(2) + expect(wrapper.find('[data-testid="offer-id"] .value').length).toBe(2) expectSimpleRowText(wrapper, 'amount', '\uE9002,500.00 XRP') expectSimpleRowText(wrapper, 'buyer', 'rNYKGnHrjSnKXQGgACciyCLg4xRcwWZixN') expectSimpleRowText(wrapper, 'seller', 'rnp9DA6H2tLH7YFkgpjoVREB2yccYv56Sg') diff --git a/src/containers/shared/components/Transaction/NFTokenBurn/Simple.tsx b/src/containers/shared/components/Transaction/NFTokenBurn/Simple.tsx index 86e2c663a..dc3fe667d 100644 --- a/src/containers/shared/components/Transaction/NFTokenBurn/Simple.tsx +++ b/src/containers/shared/components/Transaction/NFTokenBurn/Simple.tsx @@ -13,11 +13,11 @@ export const Simple: TransactionSimpleComponent = ({ return ( <> - + {Owner && ( - + )} diff --git a/src/containers/shared/components/Transaction/NFTokenCancelOffer/Simple.tsx b/src/containers/shared/components/Transaction/NFTokenCancelOffer/Simple.tsx index 044c0316f..6df38b784 100644 --- a/src/containers/shared/components/Transaction/NFTokenCancelOffer/Simple.tsx +++ b/src/containers/shared/components/Transaction/NFTokenCancelOffer/Simple.tsx @@ -19,17 +19,21 @@ export const Simple: TransactionSimpleComponent = ({ {offerID} - + - + - + diff --git a/src/containers/shared/components/Transaction/NFTokenCancelOffer/test/NFTokenCancelOfferSimple.test.tsx b/src/containers/shared/components/Transaction/NFTokenCancelOffer/test/NFTokenCancelOfferSimple.test.tsx index ec58e6280..5e9087e77 100644 --- a/src/containers/shared/components/Transaction/NFTokenCancelOffer/test/NFTokenCancelOfferSimple.test.tsx +++ b/src/containers/shared/components/Transaction/NFTokenCancelOffer/test/NFTokenCancelOfferSimple.test.tsx @@ -21,16 +21,16 @@ describe('NFTokenCancelOffer', () => { , ) - expect(wrapper.find('[data-test="token-id"] .value')).toHaveText( + expect(wrapper.find('[data-testid="token-id"] .value')).toHaveText( '000800006203F49C21D5D6E022CB16DE3538F248662FC73C258BA1B200000018', ) - expect(wrapper.find('[data-test="offer-id"] .value')).toHaveText( + expect(wrapper.find('[data-testid="offer-id"] .value')).toHaveText( '35F3D6D99548FA5F5315580FBF8BA6B15CAA2CAE93023D5CE4FDC130602BC5C3', ) - expect(wrapper.find('[data-test="amount"] .value')).toHaveText( + expect(wrapper.find('[data-testid="amount"] .value')).toHaveText( '$100.00 USD.r9AExd6v3keXaXa3nXAMHHcP9nWy9Aef2g', ) - expect(wrapper.find('[data-test="offerer"] .value')).toHaveText( + expect(wrapper.find('[data-testid="offerer"] .value')).toHaveText( 'r9AExd6v3keXaXa3nXAMHHcP9nWy9Aef2g', ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/NFTokenCreateOffer/Simple.tsx b/src/containers/shared/components/Transaction/NFTokenCreateOffer/Simple.tsx index 14e8a2bd7..4d57365c0 100644 --- a/src/containers/shared/components/Transaction/NFTokenCreateOffer/Simple.tsx +++ b/src/containers/shared/components/Transaction/NFTokenCreateOffer/Simple.tsx @@ -16,30 +16,30 @@ export const Simple: TransactionSimpleComponent = ({ return ( <> {offerID && ( - + {offerID} )} {destination && ( - + )} {!isSellOffer && owner && ( - + )} - + - + diff --git a/src/containers/shared/components/Transaction/NFTokenCreateOffer/test/NFTokenCreateOfferSimple.test.tsx b/src/containers/shared/components/Transaction/NFTokenCreateOffer/test/NFTokenCreateOfferSimple.test.tsx index 8a4bc0c29..110891c70 100644 --- a/src/containers/shared/components/Transaction/NFTokenCreateOffer/test/NFTokenCreateOfferSimple.test.tsx +++ b/src/containers/shared/components/Transaction/NFTokenCreateOffer/test/NFTokenCreateOfferSimple.test.tsx @@ -22,7 +22,7 @@ describe('NFTokenCreateOffer', () => { ) expectSimpleRowText(wrapper, 'owner', 'r9AExd6v3keXaXa3nXAMHHcP9nWy9Aef2g') expectSimpleRowText(wrapper, 'amount', '\uE9000.0001 XRP') - expect(wrapper.find('[data-test="buyer-or-seller"] .label')).toHaveText( + expect(wrapper.find('[data-testid="buyer-or-seller"] .label')).toHaveText( 'buyer', ) expectSimpleRowText( @@ -30,7 +30,7 @@ describe('NFTokenCreateOffer', () => { 'buyer-or-seller', 'rfFRmXUR1yfxeUfXj7WwKhETrtToYx1hYh', ) - expect(wrapper.find('[data-test="destination"] .value')).not.toExist() + expect(wrapper.find('[data-testid="destination"] .value')).not.toExist() wrapper.unmount() }) @@ -46,13 +46,13 @@ describe('NFTokenCreateOffer', () => { 'offer-id', 'F660CA62E16B8067649052E8FCE947049FC6EF0D8B42EF7E5819997EC5AE45B6', ) - expect(wrapper.find('[data-test="owner"] .value')).not.toExist() + expect(wrapper.find('[data-testid="owner"] .value')).not.toExist() expectSimpleRowText( wrapper, 'amount', '$100.00 USD.r9AExd6v3keXaXa3nXAMHHcP9nWy9Aef2g', ) - expect(wrapper.find('[data-test="buyer-or-seller"] .label')).toHaveText( + expect(wrapper.find('[data-testid="buyer-or-seller"] .label')).toHaveText( 'seller', ) expectSimpleRowText( @@ -60,7 +60,7 @@ describe('NFTokenCreateOffer', () => { 'buyer-or-seller', 'r9AExd6v3keXaXa3nXAMHHcP9nWy9Aef2g', ) - expect(wrapper.find('[data-test="destination"] .value')).not.toExist() + expect(wrapper.find('[data-testid="destination"] .value')).not.toExist() wrapper.unmount() }) @@ -71,8 +71,8 @@ describe('NFTokenCreateOffer', () => { 'token-id', '00080000AC7377C74DD53E77C8161537F5EBF56B0CE8FD3BD392C2B800001702', ) - expect(wrapper.find('[data-test="offer-id"] .value')).not.toExist() - expect(wrapper.find('[data-test="owner"] .value')).not.toExist() + expect(wrapper.find('[data-testid="offer-id"] .value')).not.toExist() + expect(wrapper.find('[data-testid="owner"] .value')).not.toExist() expectSimpleRowText(wrapper, 'amount', '\uE900500.00 XRP') wrapper.unmount() }) diff --git a/src/containers/shared/components/Transaction/NFTokenMint/Simple.tsx b/src/containers/shared/components/Transaction/NFTokenMint/Simple.tsx index 3452b1a97..d91404cdc 100644 --- a/src/containers/shared/components/Transaction/NFTokenMint/Simple.tsx +++ b/src/containers/shared/components/Transaction/NFTokenMint/Simple.tsx @@ -22,29 +22,29 @@ export const Simple: TransactionSimpleComponent = ({ return ( <> {tokenID && ( - + )} {tokenTaxon} {uri && ( - + {uri} )} {transferFee && ( - + {formattedFee} )} {issuer && ( - + )} diff --git a/src/containers/shared/components/Transaction/NFTokenMint/test/NFTokenMintSimple.test.tsx b/src/containers/shared/components/Transaction/NFTokenMint/test/NFTokenMintSimple.test.tsx index 1da139efa..ffb8fd35a 100644 --- a/src/containers/shared/components/Transaction/NFTokenMint/test/NFTokenMintSimple.test.tsx +++ b/src/containers/shared/components/Transaction/NFTokenMint/test/NFTokenMintSimple.test.tsx @@ -99,7 +99,7 @@ describe('NFTokenMint', () => { , ) - expect(wrapper.find('[data-test="token-issuer"] .value')).toExist() + expect(wrapper.find('[data-testid="token-issuer"] .value')).toExist() expectSimpleRowText( wrapper, 'token-id', diff --git a/src/containers/shared/components/Transaction/OfferCancel/Description.tsx b/src/containers/shared/components/Transaction/OfferCancel/Description.tsx index 79cf988fc..1b313ece3 100644 --- a/src/containers/shared/components/Transaction/OfferCancel/Description.tsx +++ b/src/containers/shared/components/Transaction/OfferCancel/Description.tsx @@ -9,7 +9,7 @@ export const Description = ({ const { t } = useTranslation() return ( -
    +
    {t('offer_cancel_description')} {data.tx.OfferSequence}
    diff --git a/src/containers/shared/components/Transaction/OfferCancel/Simple.tsx b/src/containers/shared/components/Transaction/OfferCancel/Simple.tsx index a0a525e34..a54b9c264 100644 --- a/src/containers/shared/components/Transaction/OfferCancel/Simple.tsx +++ b/src/containers/shared/components/Transaction/OfferCancel/Simple.tsx @@ -8,7 +8,7 @@ export const Simple = ({ data }: TransactionSimpleProps) => { const { OfferSequence } = data.instructions return ( - + #{OfferSequence} ) diff --git a/src/containers/shared/components/Transaction/OfferCancel/test/OfferCreateDescription.test.tsx b/src/containers/shared/components/Transaction/OfferCancel/test/OfferCreateDescription.test.tsx index 6278f6e17..50f0f9051 100644 --- a/src/containers/shared/components/Transaction/OfferCancel/test/OfferCreateDescription.test.tsx +++ b/src/containers/shared/components/Transaction/OfferCancel/test/OfferCreateDescription.test.tsx @@ -8,7 +8,7 @@ describe('OfferCancel: Description', () => { it('renders', () => { const wrapper = createWrapper(offerCancel) - expect(wrapper.find('[data-test="cancel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="cancel-line"]')).toHaveText( 'offer_cancel_description15239384', ) }) diff --git a/src/containers/shared/components/Transaction/OfferCreate/Simple.tsx b/src/containers/shared/components/Transaction/OfferCreate/Simple.tsx index c220c9b95..6aae61649 100644 --- a/src/containers/shared/components/Transaction/OfferCreate/Simple.tsx +++ b/src/containers/shared/components/Transaction/OfferCreate/Simple.tsx @@ -13,7 +13,7 @@ const Simple: TransactionSimpleComponent = (props: TransactionSimpleProps) => { return ( <> -
    +
    {`${Number(price)}`}
    {
    - + - + {cancel && ( - + #{cancel} )} diff --git a/src/containers/shared/components/Transaction/OfferCreate/TableDetail.tsx b/src/containers/shared/components/Transaction/OfferCreate/TableDetail.tsx index c42719ab9..07d7e94e6 100644 --- a/src/containers/shared/components/Transaction/OfferCreate/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/OfferCreate/TableDetail.tsx @@ -10,10 +10,10 @@ export const TableDetail = (props: any) => { return pays && gets ? (
    -
    +
    {t('price')}: - + {`${Number(price)} `} {
    {t('buy')} - +
    {t('sell')} - +
    {cancel && ( -
    +
    {t('cancel_offer')} {` #`} {cancel} diff --git a/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateSimple.test.tsx b/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateSimple.test.tsx index 13c006b28..0953e75ac 100644 --- a/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateSimple.test.tsx +++ b/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateSimple.test.tsx @@ -8,16 +8,16 @@ const createWrapper = createSimpleWrapperFactory(Simple) describe('OfferCreate: Simple', () => { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockOfferCreateWithCancel) - expect(wrapper.find('[data-test="amount"] .one-line')).toHaveText( + expect(wrapper.find('[data-testid="amount"] .one-line')).toHaveText( '\uE900 XRP/CSC.rCSC', ) - expect(wrapper.find('[data-test="cancel-id"] .value')).toHaveText( + expect(wrapper.find('[data-testid="cancel-id"] .value')).toHaveText( '#44866443', ) - expect(wrapper.find('[data-test="amount-buy"] .value')).toHaveText( + expect(wrapper.find('[data-testid="amount-buy"] .value')).toHaveText( `\uE9001,764.293151 XRP`, ) - expect(wrapper.find('[data-test="amount-sell"] .value')).toHaveText( + expect(wrapper.find('[data-testid="amount-sell"] .value')).toHaveText( `1,080,661.95882 CSC.rCSCManTZ8ME9EoLrSHHYKW8PPwWMgkwr`, ) wrapper.unmount() @@ -26,11 +26,11 @@ describe('OfferCreate: Simple', () => { it('renders', () => { const wrapper = createWrapper(mockOfferCreate) - expect(wrapper.find('[data-test="offer-id"] .value')).not.toExist() - expect(wrapper.find('[data-test="amount-buy"] .value')).toHaveText( + expect(wrapper.find('[data-testid="offer-id"] .value')).not.toExist() + expect(wrapper.find('[data-testid="amount-buy"] .value')).toHaveText( `\uE90024,755.081083 XRP`, ) - expect(wrapper.find('[data-test="amount-sell"] .value')).toHaveText( + expect(wrapper.find('[data-testid="amount-sell"] .value')).toHaveText( `51.41523894 BCH.rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds`, ) }) diff --git a/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateTableDetail.test.tsx b/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateTableDetail.test.tsx index 45e2b6f17..059b95d94 100644 --- a/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/OfferCreate/test/OfferCreateTableDetail.test.tsx @@ -10,16 +10,16 @@ describe('OfferCreate: TableDetail', () => { it('renders with an expiration and offer', () => { const wrapper = createWrapper(mockOfferCreateWithCancel) - expect(wrapper.find('[data-test="pair"]')).toHaveText( + expect(wrapper.find('[data-testid="pair"]')).toHaveText( 'price:612.518 \uE900 XRP/CSC.rCSC', ) - expect(wrapper.find('[data-test="cancel-id"]')).toHaveText( + expect(wrapper.find('[data-testid="cancel-id"]')).toHaveText( 'cancel_offer #44866443', ) - expect(wrapper.find('[data-test="amount-buy"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-buy"]')).toHaveText( `\uE9001,764.293151 XRP`, ) - expect(wrapper.find('[data-test="amount-sell"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-sell"]')).toHaveText( `1,080,661.95882 CSC.rCSCManTZ8ME9EoLrSHHYKW8PPwWMgkwr`, ) wrapper.unmount() @@ -28,14 +28,14 @@ describe('OfferCreate: TableDetail', () => { it('renders', () => { const wrapper = createWrapper(mockOfferCreate) - expect(wrapper.find('[data-test="pair"]')).toHaveText( + expect(wrapper.find('[data-testid="pair"]')).toHaveText( 'price:0.00207696 \uE900 XRP/BCH.rcyS', ) - expect(wrapper.find('[data-test="offer-id"]')).not.toExist() - expect(wrapper.find('[data-test="amount-buy"]')).toHaveText( + expect(wrapper.find('[data-testid="offer-id"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-buy"]')).toHaveText( `\uE90024,755.081083 XRP`, ) - expect(wrapper.find('[data-test="amount-sell"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-sell"]')).toHaveText( `51.41523894 BCH.rcyS4CeCZVYvTiKcxj6Sx32ibKwcDHLds`, ) }) @@ -43,7 +43,7 @@ describe('OfferCreate: TableDetail', () => { it('renders inverted currencies', () => { const wrapper = createWrapper(mockOfferCreateInvertedCurrencies) - expect(wrapper.find('[data-test="pair"]')).toHaveText( + expect(wrapper.find('[data-testid="pair"]')).toHaveText( 'price:0.346896 \uE900 XRP/USD.rvYA', ) }) diff --git a/src/containers/shared/components/Transaction/OracleDelete/Simple.tsx b/src/containers/shared/components/Transaction/OracleDelete/Simple.tsx index 98bf591a9..a230dcaea 100644 --- a/src/containers/shared/components/Transaction/OracleDelete/Simple.tsx +++ b/src/containers/shared/components/Transaction/OracleDelete/Simple.tsx @@ -8,7 +8,7 @@ export const Simple: TransactionSimpleComponent = ({ const { t } = useTranslation() const { OracleDocumentID } = data.instructions return ( - + {OracleDocumentID} ) diff --git a/src/containers/shared/components/Transaction/OracleSet/Simple.tsx b/src/containers/shared/components/Transaction/OracleSet/Simple.tsx index 08bb96471..e282fc07b 100644 --- a/src/containers/shared/components/Transaction/OracleSet/Simple.tsx +++ b/src/containers/shared/components/Transaction/OracleSet/Simple.tsx @@ -22,23 +22,26 @@ export const Simple: TransactionSimpleComponent = ({ } = data.instructions return ( <> - + {oracleDocumentID} {provider && ( - + {provider} )} {uri && ( - + {uri} )} - + {localizeDate( new Date(lastUpdateTime * MILLIS_PER_SECOND), language, @@ -47,14 +50,14 @@ export const Simple: TransactionSimpleComponent = ({ {assetClass && ( - + {assetClass} )} - + {priceDataSeries.map((priceDataObj) => ( -
    +
    {priceDataObj.assetPrice ?? t('deleted')}
    / diff --git a/src/containers/shared/components/Transaction/Payment/Description.tsx b/src/containers/shared/components/Transaction/Payment/Description.tsx index fb74bbc20..c4bab2154 100644 --- a/src/containers/shared/components/Transaction/Payment/Description.tsx +++ b/src/containers/shared/components/Transaction/Payment/Description.tsx @@ -12,7 +12,7 @@ export const Description = ({ data }: TransactionDescriptionProps) => { return ( <> -
    +
    ) => { />
    {data.tx.SourceTag != null && ( -
    +
    {t('the_source_tag_is')} {data.tx.SourceTag}
    )} {data.tx.DestinationTag != null && ( -
    +
    {t('the_destination_tag_is')} {data.tx.DestinationTag}
    )} -
    +
    {`${t('payment_desc_line_4')}${partial ? ' up to' : ''}`}{' '} @@ -47,7 +47,7 @@ export const Description = ({ data }: TransactionDescriptionProps) => { )}
    {data?.meta?.delivered_amount && ( -
    +
    {t('payment_desc_line_6')}{' '} diff --git a/src/containers/shared/components/Transaction/Payment/Simple.tsx b/src/containers/shared/components/Transaction/Payment/Simple.tsx index ff24b6391..833893ef2 100644 --- a/src/containers/shared/components/Transaction/Payment/Simple.tsx +++ b/src/containers/shared/components/Transaction/Payment/Simple.tsx @@ -23,23 +23,23 @@ export const Simple = (props: TransactionSimpleProps) => { return ( <> {max && ( - + )} {renderPartial()} {sourceTag !== undefined && ( - + {sourceTag} )} - + @@ -48,10 +48,10 @@ export const Simple = (props: TransactionSimpleProps) => { return convert ? ( <> - + - + {renderPartial()} diff --git a/src/containers/shared/components/Transaction/Payment/test/PaymentDescription.test.tsx b/src/containers/shared/components/Transaction/Payment/test/PaymentDescription.test.tsx index 7979952b8..fc0fbf80c 100644 --- a/src/containers/shared/components/Transaction/Payment/test/PaymentDescription.test.tsx +++ b/src/containers/shared/components/Transaction/Payment/test/PaymentDescription.test.tsx @@ -15,15 +15,15 @@ describe('Payment: Description', () => { it('renders', () => { const wrapper = createWrapper(mockPayment) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `The payment is from rNQEMJA4PsoSrZRn9J6RajAYhcDzzhf8ok to rHoPwMC75KVUhBMeV3uDMybKG5JND74teh`, ) - expect(wrapper.find('[data-test="source-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="destination-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="destination-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It was instructed to deliver \uE9002,421.8268 XRP`, ) - expect(wrapper.find('[data-test="delivered-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delivered-line"]')).toHaveText( `The actual amount delivered was \uE9002,421.8268 XRP`, ) @@ -33,15 +33,15 @@ describe('Payment: Description', () => { it('renders with failed partial conversion', () => { const wrapper = createWrapper(mockPaymentConvert) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `The payment is from r9x5PHDiwuvbpYB3uvGAqEUVV5wxHayQEx to r9x5PHDiwuvbpYB3uvGAqEUVV5wxHayQEx`, ) - expect(wrapper.find('[data-test="source-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="destination-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="destination-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It was instructed to deliver up to 1,140.00 YCN.r8HgVGenRTAiNSM5iqt9PX2D2EczFZhZr by spending up to \uE9001,140.00 XRP`, ) - expect(wrapper.find('[data-test="delivered-line"]')).not.toExist() + expect(wrapper.find('[data-testid="delivered-line"]')).not.toExist() wrapper.unmount() }) @@ -49,17 +49,17 @@ describe('Payment: Description', () => { it('renders with destination tag', () => { const wrapper = createWrapper(mockPaymentDestinationTag) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `The payment is from rDAE53VfMvftPB4ogpWGWvzkQxfht6JPxr to rHWcuuZoFvDS6gNbmHSdpb7u1hZzxvCoMt`, ) - expect(wrapper.find('[data-test="source-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="destination-tag-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="destination-tag-line"]')).toHaveText( `The destination tag is 381702`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It was instructed to deliver \uE9001,531.267 XRP`, ) - expect(wrapper.find('[data-test="delivered-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delivered-line"]')).toHaveText( `The actual amount delivered was \uE9001,531.267 XRP`, ) @@ -69,17 +69,17 @@ describe('Payment: Description', () => { it('renders with send max', () => { const wrapper = createWrapper(mockPaymentSendMax) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `The payment is from r3RaNVLvWjqqtFAawC6jbRhgKyFH7HvRS8 to rprcTynT68nYdKzDTefAZG9HjSHiYcnP4b`, ) - expect(wrapper.find('[data-test="destination-tag-line"]')).toHaveText( + expect(wrapper.find('[data-testid="destination-tag-line"]')).toHaveText( `The destination tag is 0`, ) - expect(wrapper.find('[data-test="source-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It was instructed to deliver 17,366,599.150289 XRdoge.rLqUC2eCPohYvJCEBJ77eCCqVL2uEiczjA by spending up to 17,366,599.150289 XRdoge.rLqUC2eCPohYvJCEBJ77eCCqVL2uEiczjA`, ) - expect(wrapper.find('[data-test="delivered-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delivered-line"]')).toHaveText( `The actual amount delivered was 17,366,599.150289 XRdoge.rLqUC2eCPohYvJCEBJ77eCCqVL2uEiczjA`, ) wrapper.unmount() @@ -88,17 +88,17 @@ describe('Payment: Description', () => { it('renders with partial', () => { const wrapper = createWrapper(mockPaymentPartial) - expect(wrapper.find('[data-test="from-to-line"]')).toHaveText( + expect(wrapper.find('[data-testid="from-to-line"]')).toHaveText( `The payment is from rGTurN94Nn3RkJGSqy9MwmQCLpXZkELbnq to rMQ4oGC8fasuJwfdrfknFTttDbf8cR3D2j`, ) - expect(wrapper.find('[data-test="destination-tag-line"]')).toHaveText( + expect(wrapper.find('[data-testid="destination-tag-line"]')).toHaveText( `The destination tag is 0`, ) - expect(wrapper.find('[data-test="source-tag-line"]')).not.toExist() - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It was instructed to deliver up to 0.001043 xCoin.rXCoYSUnkpygdtfpz3Df8dKQuRZjM9UFi`, ) - expect(wrapper.find('[data-test="delivered-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delivered-line"]')).toHaveText( `The actual amount delivered was 0.00104196 xCoin.rXCoYSUnkpygdtfpz3Df8dKQuRZjM9UFi`, ) @@ -108,10 +108,10 @@ describe('Payment: Description', () => { it('renders with SourceTag', () => { const wrapper = createWrapper(mockPaymentSourceTag) - expect(wrapper.find('[data-test="source-tag-line"]')).toHaveText( + expect(wrapper.find('[data-testid="source-tag-line"]')).toHaveText( `The source tag is 20648`, ) - expect(wrapper.find('[data-test="destination-tag-line"]')).toHaveText( + expect(wrapper.find('[data-testid="destination-tag-line"]')).toHaveText( `The destination tag is 412453880`, ) diff --git a/src/containers/shared/components/Transaction/Payment/test/PaymentSimple.test.tsx b/src/containers/shared/components/Transaction/Payment/test/PaymentSimple.test.tsx index 5166c919f..b05890cde 100644 --- a/src/containers/shared/components/Transaction/Payment/test/PaymentSimple.test.tsx +++ b/src/containers/shared/components/Transaction/Payment/test/PaymentSimple.test.tsx @@ -49,7 +49,7 @@ describe('Payment: Simple', () => { `0.00 YCN.r8HgVGenRTAiNSM5iqt9PX2D2EczFZhZrpartial_payment_allowed`, ) - expect(wrapper.find('[data-test="destination"]')).not.toExist() + expect(wrapper.find('[data-testid="destination"]')).not.toExist() wrapper.unmount() }) diff --git a/src/containers/shared/components/Transaction/PaymentChannelClaim/Description.tsx b/src/containers/shared/components/Transaction/PaymentChannelClaim/Description.tsx index 5841765fb..833fe7fdc 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelClaim/Description.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelClaim/Description.tsx @@ -20,15 +20,15 @@ export const Description = ({ return ( <> -
    +
    {t('transaction_initiated_by')}
    -
    +
    {t('update_payment_channel')}{' '} {data.tx.Channel}
    {data.tx.Balance && ( -
    +
    {t('the_channel_balance_is')} {' '} @@ -50,7 +50,7 @@ export const Description = ({
    )} {deleted && ( -
    +
    {t('payment_channel_closed_description')}
    )} diff --git a/src/containers/shared/components/Transaction/PaymentChannelClaim/Simple.tsx b/src/containers/shared/components/Transaction/PaymentChannelClaim/Simple.tsx index 43bb40b9d..890501665 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelClaim/Simple.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelClaim/Simple.tsx @@ -26,28 +26,28 @@ export const Simple = ({ return ( <> {channelAmount && ( - + )} {claimed && ( - + )} {totalClaimed && ( - + )} {source && ( - + {sParts[1] && :{sParts[1]}} )} {destination && ( - + {dParts[1] && :{dParts[1]}} @@ -58,17 +58,17 @@ export const Simple = ({ )} {renew && ( - + {t('renew_channel')} )} {close && ( - + {t('close_request')} )} {deleted && ( - + {t('payment_channel_closed')} )} diff --git a/src/containers/shared/components/Transaction/PaymentChannelClaim/TableDetail.tsx b/src/containers/shared/components/Transaction/PaymentChannelClaim/TableDetail.tsx index f97797675..1a249f37e 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelClaim/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelClaim/TableDetail.tsx @@ -22,7 +22,7 @@ export const TableDetail = ({ return (
    {source && ( -
    +
    {t('source')} @@ -30,7 +30,7 @@ export const TableDetail = ({
    )} {destination && ( -
    +
    {t('destination')} @@ -38,7 +38,7 @@ export const TableDetail = ({
    )} {claimed && ( -
    +
    {t('claimed')} {remaining && channelAmount && ( @@ -51,23 +51,23 @@ export const TableDetail = ({
    )} {channelAmount && !claimed && ( -
    +
    {t('channel_amount')}
    )} {renew && ( -
    +
    {t('renew_channel')}
    )} {close && ( -
    +
    {t('close_request')}
    )} {deleted && ( -
    +
    {t('payment_channel_closed')}
    )} diff --git a/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimDescription.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimDescription.test.tsx index 8058ac397..f9cbe4db6 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimDescription.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimDescription.test.tsx @@ -12,29 +12,29 @@ const createWrapper = createDescriptionWrapperFactory(Description, i18n) describe('PaymentChannelClaim: Description', () => { it('renders a claim', () => { const wrapper = createWrapper(mockPaymentChannelClaim) - expect(wrapper.find('[data-test="account-line"]')).toHaveText( + expect(wrapper.find('[data-testid="account-line"]')).toHaveText( `The transaction was initiated by rK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 50107651E7163E294CE0EAD8A20BF7CC046304480FCC9C74A49FFAB3F46FB98E`, ) - expect(wrapper.find('[data-test="balance-line"]')).toHaveText( + expect(wrapper.find('[data-testid="balance-line"]')).toHaveText( `The channel balance claimed is \uE90049.65716XRP (increased by \uE9000.01XRP)`, ) - expect(wrapper.find('[data-test="closed-line"]')).not.toExist() + expect(wrapper.find('[data-testid="closed-line"]')).not.toExist() wrapper.unmount() }) it('renders tx with channel being closed', () => { const wrapper = createWrapper(mockPaymentChannelClaimClosed) - expect(wrapper.find('[data-test="account-line"]')).toHaveText( + expect(wrapper.find('[data-testid="account-line"]')).toHaveText( `The transaction was initiated by rH11fDGhbVH5NVXNXkGAMTmfWhUHjCtA3B`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 3BDB4F92432BCEB2385D3BAA60E8AAEC9B552890A240AEE4AA9E88C9E6C517E8`, ) - expect(wrapper.find('[data-test="balance-line"]')).not.toExist() - expect(wrapper.find('[data-test="closed-line"]')).toHaveText( + expect(wrapper.find('[data-testid="balance-line"]')).not.toExist() + expect(wrapper.find('[data-testid="closed-line"]')).toHaveText( `The payment channel will be closed, any remaining balance will be returned to the source account`, ) wrapper.unmount() @@ -42,29 +42,29 @@ describe('PaymentChannelClaim: Description', () => { it('renders tx requesting channel be closed but not closing it', () => { const wrapper = createWrapper(mockPaymentChannelClaimCloseDenied) - expect(wrapper.find('[data-test="account-line"]')).toHaveText( + expect(wrapper.find('[data-testid="account-line"]')).toHaveText( `The transaction was initiated by rH11fDGhbVH5NVXNXkGAMTmfWhUHjCtA3B`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 3BDB4F92432BCEB2385D3BAA60E8AAEC9B552890A240AEE4AA9E88C9E6C517E8`, ) - expect(wrapper.find('[data-test="balance-line"]')).not.toExist() - expect(wrapper.find('[data-test="closed-line"]')).not.toExist() + expect(wrapper.find('[data-testid="balance-line"]')).not.toExist() + expect(wrapper.find('[data-testid="closed-line"]')).not.toExist() wrapper.unmount() }) it('renders tx with destination tag', () => { const wrapper = createWrapper(mockPaymentChannelClaimWithDestinationTag) - expect(wrapper.find('[data-test="account-line"]')).toHaveText( + expect(wrapper.find('[data-testid="account-line"]')).toHaveText( `The transaction was initiated by rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3`, ) - expect(wrapper.find('[data-test="balance-line"]')).toHaveText( + expect(wrapper.find('[data-testid="balance-line"]')).toHaveText( `The channel balance claimed is \uE9001.00XRP (increased by \uE9001.00XRP)`, ) - expect(wrapper.find('[data-test="closed-line"]')).not.toExist() + expect(wrapper.find('[data-testid="closed-line"]')).not.toExist() wrapper.unmount() }) }) diff --git a/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimTableDetail.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimTableDetail.test.tsx index ccf4b1548..de68e843d 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelClaim/test/PaymentChannelClaimTableDetail.test.tsx @@ -12,39 +12,39 @@ const createWrapper = createTableDetailWrapperFactory(TableDetail, i18n) describe('PaymentChannelClaim: TableDetail', () => { it('renders a claim', () => { const wrapper = createWrapper(mockPaymentChannelClaim) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcernNzy3iPc7gPEAJbAdXwxY1UTBamBqTYhR:1002539517', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN', ) - expect(wrapper.find('[data-test="claimed"]')).toHaveText( + expect(wrapper.find('[data-testid="claimed"]')).toHaveText( 'claimed\uE9000.01 XRP (\uE90020.34284 XRP of \uE90070.00 XRP remaining)', ) - expect(wrapper.find('[data-test="amount"]')).not.toExist() - expect(wrapper.find('[data-test="renew"]')).not.toExist() - expect(wrapper.find('[data-test="close-request"]')).not.toExist() - expect(wrapper.find('[data-test="closed"]')).not.toExist() + expect(wrapper.find('[data-testid="channel-amount"]')).not.toExist() + expect(wrapper.find('[data-testid="renew"]')).not.toExist() + expect(wrapper.find('[data-testid="close-request"]')).not.toExist() + expect(wrapper.find('[data-testid="closed"]')).not.toExist() wrapper.unmount() }) it('renders tx with channel being closed', () => { const wrapper = createWrapper(mockPaymentChannelClaimClosed) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerH11fDGhbVH5NVXNXkGAMTmfWhUHjCtA3B:2647131528', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN', ) - expect(wrapper.find('[data-test="claimed"]')).not.toExist() - expect(wrapper.find('[data-test="amount"]')).toHaveText( + expect(wrapper.find('[data-testid="claimed"]')).not.toExist() + expect(wrapper.find('[data-testid="channel-amount"]')).toHaveText( 'channel amount\uE90010.00 XRP', ) - expect(wrapper.find('[data-test="renew"]')).not.toExist() - expect(wrapper.find('[data-test="close-request"]')).toHaveText( + expect(wrapper.find('[data-testid="renew"]')).not.toExist() + expect(wrapper.find('[data-testid="close-request"]')).toHaveText( 'close channel request', ) - expect(wrapper.find('[data-test="closed"]')).toHaveText( + expect(wrapper.find('[data-testid="closed"]')).toHaveText( 'payment channel closed', ) wrapper.unmount() @@ -52,39 +52,39 @@ describe('PaymentChannelClaim: TableDetail', () => { it('renders tx requesting channel be closed but not closing it', () => { const wrapper = createWrapper(mockPaymentChannelClaimCloseDenied) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerH11fDGhbVH5NVXNXkGAMTmfWhUHjCtA3B:2647131528', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN', ) - expect(wrapper.find('[data-test="claimed"]')).not.toExist() - expect(wrapper.find('[data-test="amount"]')).toHaveText( + expect(wrapper.find('[data-testid="claimed"]')).not.toExist() + expect(wrapper.find('[data-testid="channel-amount"]')).toHaveText( 'channel amount\uE90010.00 XRP', ) - expect(wrapper.find('[data-test="renew"]')).not.toExist() - expect(wrapper.find('[data-test="close-request"]')).toHaveText( + expect(wrapper.find('[data-testid="renew"]')).not.toExist() + expect(wrapper.find('[data-testid="close-request"]')).toHaveText( 'close channel request', ) - expect(wrapper.find('[data-test="closed"]')).not.toExist() + expect(wrapper.find('[data-testid="closed"]')).not.toExist() wrapper.unmount() }) it('renders tx with destination tag', () => { const wrapper = createWrapper(mockPaymentChannelClaimWithDestinationTag) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn:20170428', ) - expect(wrapper.find('[data-test="claimed"]')).toHaveText( + expect(wrapper.find('[data-testid="claimed"]')).toHaveText( 'claimed\uE9001.00 XRP (\uE90099.00 XRP of \uE900100.00 XRP remaining)', ) - expect(wrapper.find('[data-test="amount"]')).not.toExist() - expect(wrapper.find('[data-test="renew"]')).not.toExist() - expect(wrapper.find('[data-test="close-request"]')).not.toExist() - expect(wrapper.find('[data-test="closed"]')).not.toExist() + expect(wrapper.find('[data-testid="channel-amount"]')).not.toExist() + expect(wrapper.find('[data-testid="renew"]')).not.toExist() + expect(wrapper.find('[data-testid="close-request"]')).not.toExist() + expect(wrapper.find('[data-testid="closed"]')).not.toExist() wrapper.unmount() }) }) diff --git a/src/containers/shared/components/Transaction/PaymentChannelCreate/Description.tsx b/src/containers/shared/components/Transaction/PaymentChannelCreate/Description.tsx index 813389254..1880c1c5e 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelCreate/Description.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelCreate/Description.tsx @@ -22,26 +22,26 @@ export const Description = ({ return ( <> -
    +
    {`${t('the_account')} `} {` ${t('create_payment_channel')} `}
    {node && ( -
    +
    {t('the_channel_id_is')} {node.LedgerIndex}
    )} -
    +
    {t('the_channel_amount_is')}{' '}
    {tx.SettleDelay && ( -
    +
    {t('channel_settle_delay')}{' '} {localizeNumber(tx.SettleDelay, language)} {t('seconds')} @@ -49,7 +49,7 @@ export const Description = ({
    )} {tx.CancelAfter && ( -
    +
    {t('describe_cancel_after')} {` ${cancelAfter} ${DATE_OPTIONS.timeZone}`}
    diff --git a/src/containers/shared/components/Transaction/PaymentChannelCreate/Simple.tsx b/src/containers/shared/components/Transaction/PaymentChannelCreate/Simple.tsx index f4fd4949c..ab3a8717f 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelCreate/Simple.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelCreate/Simple.tsx @@ -18,22 +18,22 @@ export const Simple = ({ return ( <> - + - + - + {delay && ( - + {localizeNumber(delay, language)} {t('seconds_short')} )} {cancelAfter && ( - + {localizeDate(new Date(cancelAfter), language, DATE_OPTIONS)}{' '} {DATE_OPTIONS.timeZone} diff --git a/src/containers/shared/components/Transaction/PaymentChannelCreate/TableDetail.tsx b/src/containers/shared/components/Transaction/PaymentChannelCreate/TableDetail.tsx index f94fc73f9..bca200507 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelCreate/TableDetail.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelCreate/TableDetail.tsx @@ -12,15 +12,15 @@ export const TableDetail = ({ return (
    -
    +
    {t('source')}
    -
    +
    {t('destination')}
    -
    +
    {t('channel_amount')}
    diff --git a/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateDescription.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateDescription.test.tsx index 0142fd73f..bba8fc3b9 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateDescription.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateDescription.test.tsx @@ -11,53 +11,53 @@ const createWrapper = createDescriptionWrapperFactory(Description, i18n) describe('PaymentChannelCreate: Description', () => { it('renders', () => { const wrapper = createWrapper(mockPaymentChannelCreate) - expect(wrapper.find('[data-test="accounts-line"]')).toHaveText( + expect(wrapper.find('[data-testid="accounts-line"]')).toHaveText( `The account rJnQrhRTXutuSwtrwxYiTkHn4Dtp8sF2LM:2460331042 will create a payment channel to rUXYat4hW2M87gHoqKK7fC4cqrT9C6V7d7`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `The channel ID is 15AB9EE9344C42C05164E6A1F2F08B35F35D7B9D66CCB9697452B0995C8F8242`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `The channel amount is \uE9001.00 XRP`, ) - expect(wrapper.find('[data-test="delay-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delay-line"]')).toHaveText( `The channel has a settlement delay of 3,600 seconds`, ) - expect(wrapper.find('[data-test="cancel-line"]')).not.toExist() + expect(wrapper.find('[data-testid="cancel-line"]')).not.toExist() wrapper.unmount() }) it('renders failed tx', () => { const wrapper = createWrapper(mockPaymentChannelCreateFailed) - expect(wrapper.find('[data-test="accounts-line"]')).toHaveText( + expect(wrapper.find('[data-testid="accounts-line"]')).toHaveText( `The account rMphibGfHpLDU4DzVCspzLYVuMNpmzN6n8:2810223114 will create a payment channel to rK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN`, ) - expect(wrapper.find('[data-test="channel-line"]')).not.toExist() - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).not.toExist() + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `The channel amount is \uE90010.00 XRP`, ) - expect(wrapper.find('[data-test="delay-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delay-line"]')).toHaveText( `The channel has a settlement delay of 3,600 seconds`, ) - expect(wrapper.find('[data-test="cancel-line"]')).not.toExist() + expect(wrapper.find('[data-testid="cancel-line"]')).not.toExist() wrapper.unmount() }) it('renders tx with destination tag', () => { const wrapper = createWrapper(mockPaymentChannelCreateWithDestinationTag) - expect(wrapper.find('[data-test="accounts-line"]')).toHaveText( + expect(wrapper.find('[data-testid="accounts-line"]')).toHaveText( `The account rN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH will create a payment channel to rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn:20170428`, ) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `The channel ID is 5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `The channel amount is \uE900100.00 XRP`, ) - expect(wrapper.find('[data-test="delay-line"]')).toHaveText( + expect(wrapper.find('[data-testid="delay-line"]')).toHaveText( `The channel has a settlement delay of 86,400 seconds`, ) - expect(wrapper.find('[data-test="cancel-line"]')).not.toExist() + expect(wrapper.find('[data-testid="cancel-line"]')).not.toExist() wrapper.unmount() }) }) diff --git a/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateTableDetail.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateTableDetail.test.tsx index 5a32bf7f1..bef431ba4 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateTableDetail.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelCreate/test/PaymentChannelCreateTableDetail.test.tsx @@ -11,42 +11,38 @@ const createWrapper = createTableDetailWrapperFactory(TableDetail, i18n) describe('PaymentChannelCreate: TableDetail', () => { it('renders', () => { const wrapper = createWrapper(mockPaymentChannelCreate) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerJnQrhRTXutuSwtrwxYiTkHn4Dtp8sF2LM:2460331042', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrUXYat4hW2M87gHoqKK7fC4cqrT9C6V7d7', ) - expect(wrapper.find('[data-test="amount"]')).toHaveText( - 'channel amount\uE9001.00 XRP', - ) + expect(wrapper.find('[data-testid="amount"]')).toHaveText('\uE9001.00 XRP') wrapper.unmount() }) it('renders failed tx', () => { const wrapper = createWrapper(mockPaymentChannelCreateFailed) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerMphibGfHpLDU4DzVCspzLYVuMNpmzN6n8:2810223114', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrK6g2UYc4GpQH8DYdPG7wywyQbxkJpQTTN', ) - expect(wrapper.find('[data-test="amount"]')).toHaveText( - 'channel amount\uE90010.00 XRP', - ) + expect(wrapper.find('[data-testid="amount"]')).toHaveText('\uE90010.00 XRP') wrapper.unmount() }) it('renders tx with destination tag', () => { const wrapper = createWrapper(mockPaymentChannelCreateWithDestinationTag) - expect(wrapper.find('[data-test="source"]')).toHaveText( + expect(wrapper.find('[data-testid="source"]')).toHaveText( 'sourcerN7n7otQDd6FczFgLdSqtcsAUxDkw6fzRH', ) - expect(wrapper.find('[data-test="destination"]')).toHaveText( + expect(wrapper.find('[data-testid="destination"]')).toHaveText( 'destinationrf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn:20170428', ) - expect(wrapper.find('[data-test="amount"]')).toHaveText( - 'channel amount\uE900100.00 XRP', + expect(wrapper.find('[data-testid="amount"]')).toHaveText( + '\uE900100.00 XRP', ) wrapper.unmount() }) diff --git a/src/containers/shared/components/Transaction/PaymentChannelFund/Description.tsx b/src/containers/shared/components/Transaction/PaymentChannelFund/Description.tsx index 6a3fbb5c6..8e9d7c9d1 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelFund/Description.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelFund/Description.tsx @@ -12,12 +12,12 @@ export const Description = ({ return ( <> -
    +
    {t('update_payment_channel')}{' '} {data.tx.Channel}
    {data.tx.Amount && ( -
    +
    {t('increase_channel_amount_by')}{' '} diff --git a/src/containers/shared/components/Transaction/PaymentChannelFund/Simple.tsx b/src/containers/shared/components/Transaction/PaymentChannelFund/Simple.tsx index 31edafd4e..a1111c43c 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelFund/Simple.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelFund/Simple.tsx @@ -21,27 +21,27 @@ export const Simple = ({ return ( <> {increase && ( - + )} {channelAmount && ( - + )} {totalClaimed && ( - + )} {source && ( - + )} {destination && ( - + )} diff --git a/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundDescription.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundDescription.test.tsx index 9139a1935..ae1fdc448 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundDescription.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundDescription.test.tsx @@ -10,10 +10,10 @@ const createWrapper = createDescriptionWrapperFactory(Description, i18n) describe('PaymentChannelFund: Description', () => { it('renders a Fund', () => { const wrapper = createWrapper(mockPaymentChannelFund) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 4BEAC9E4C10674AB698EAC0F2D78A4FF507428370578A59B04883E7EB8D82260`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It will increase the channel amount by \uE9001.00 XRP from \uE90074.00 XRP to \uE90075.00 XRP`, ) wrapper.unmount() @@ -21,10 +21,10 @@ describe('PaymentChannelFund: Description', () => { it('renders failed tx', () => { const wrapper = createWrapper(mockPaymentChannelFundFailed) - expect(wrapper.find('[data-test="channel-line"]')).toHaveText( + expect(wrapper.find('[data-testid="channel-line"]')).toHaveText( `It will update the payment channel 933F93F7113A2F94B7838D64D0D2A244C57EFD6411C16FFF5FA293D200EF5876`, ) - expect(wrapper.find('[data-test="amount-line"]')).toHaveText( + expect(wrapper.find('[data-testid="amount-line"]')).toHaveText( `It will increase the channel amount by \uE90020.00 XRP`, ) wrapper.unmount() diff --git a/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundSimple.test.tsx b/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundSimple.test.tsx index 743ca5a69..a9b884ad6 100644 --- a/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundSimple.test.tsx +++ b/src/containers/shared/components/Transaction/PaymentChannelFund/test/PaymentChannelFundSimple.test.tsx @@ -17,8 +17,8 @@ describe('PaymentChannelFund: Simple', () => { const wrapper = createWrapper(mockPaymentChannelFund) expectSimpleRowLabel(wrapper, 'increase', 'channel amount increase') expectSimpleRowText(wrapper, 'increase', '+\uE9001.00 XRP') - expectSimpleRowLabel(wrapper, 'amount', 'channel amount') - expectSimpleRowText(wrapper, 'amount', '\uE90075.00 XRP') + expectSimpleRowLabel(wrapper, 'channel-amount', 'channel amount') + expectSimpleRowText(wrapper, 'channel-amount', '\uE90075.00 XRP') expectSimpleRowLabel(wrapper, 'total', 'total claimed') expectSimpleRowText(wrapper, 'total', '\uE90061.859345 XRP') expectSimpleRowLabel(wrapper, 'source', 'source') @@ -46,7 +46,7 @@ describe('PaymentChannelFund: Simple', () => { const wrapper = createWrapper(mockPaymentChannelFundFailed) expectSimpleRowLabel(wrapper, 'increase', 'channel amount increase') expectSimpleRowText(wrapper, 'increase', '+\uE90020.00 XRP') - expectSimpleRowNotToExist(wrapper, 'amount') + expectSimpleRowNotToExist(wrapper, 'channel-amount') expectSimpleRowNotToExist(wrapper, 'total') expectSimpleRowNotToExist(wrapper, 'source') expectSimpleRowNotToExist(wrapper, 'destination') diff --git a/src/containers/shared/components/Transaction/SetFee/Description.tsx b/src/containers/shared/components/Transaction/SetFee/Description.tsx index 874cb16d7..3f496771c 100644 --- a/src/containers/shared/components/Transaction/SetFee/Description.tsx +++ b/src/containers/shared/components/Transaction/SetFee/Description.tsx @@ -8,7 +8,7 @@ export const Description = ({ data }: TransactionDescriptionProps) => { return ( <> -
    +
    { }} />
    -
    +
    { />

    -
    +
    Fees]} diff --git a/src/containers/shared/components/Transaction/SetFee/Simple.tsx b/src/containers/shared/components/Transaction/SetFee/Simple.tsx index 207ad1c3d..f1be9f246 100644 --- a/src/containers/shared/components/Transaction/SetFee/Simple.tsx +++ b/src/containers/shared/components/Transaction/SetFee/Simple.tsx @@ -12,15 +12,15 @@ export const Simple = ({ return ( <> - + - + diff --git a/src/containers/shared/components/Transaction/SetFee/test/SetFeeDescription.test.tsx b/src/containers/shared/components/Transaction/SetFee/test/SetFeeDescription.test.tsx index 6ccbff053..db2c1c14b 100644 --- a/src/containers/shared/components/Transaction/SetFee/test/SetFeeDescription.test.tsx +++ b/src/containers/shared/components/Transaction/SetFee/test/SetFeeDescription.test.tsx @@ -11,13 +11,13 @@ const createWrapper = createDescriptionWrapperFactory( ) function testDescription(wrapper) { - expect(wrapper.find('[data-test="fees-line"]')).toHaveText( + expect(wrapper.find('[data-testid="fees-line"]')).toHaveText( `Future transactions will require a minimum fee of \uE9000.00001 XRP.`, ) - expect(wrapper.find('[data-test="reserves-line"]')).toHaveText( + expect(wrapper.find('[data-testid="reserves-line"]')).toHaveText( `Accounts must now hold a base of \uE90010.00 XRP and an additional \uE9002.00 XRP for each additional object that account owns.`, ) - expect(wrapper.find('[data-test="documentation-line"]')).toHaveText( + expect(wrapper.find('[data-testid="documentation-line"]')).toHaveText( `Visit the docs: Fees`, ) } diff --git a/src/containers/shared/components/Transaction/SetHook/Simple.tsx b/src/containers/shared/components/Transaction/SetHook/Simple.tsx index 0e69821f8..b4c38dfe1 100644 --- a/src/containers/shared/components/Transaction/SetHook/Simple.tsx +++ b/src/containers/shared/components/Transaction/SetHook/Simple.tsx @@ -15,17 +15,17 @@ export const Simple = ({ const renderHook = (hook: HookData) => ( - + {hook.HookHash ?? 'undefined'} {hook.HookOn && ( - + {/* // TODO: use the transaction badges here instead of just text */} {hookOnToTxList(hook.HookOn)?.join(', ') ?? None} )} {hook.HookGrants && ( - + {hook.HookGrants.map((hookGrant) => { const grant = hookGrant.HookGrant return ( @@ -38,17 +38,17 @@ export const Simple = ({ )} {hook.HookNamespace && ( - + {hook.HookNamespace} )} {hook.Flags && ( - + {buildHookFlags(hook.Flags).join(', ')} )} {hook.HookApiVersion != null && ( - + {hook.HookApiVersion} )} diff --git a/src/containers/shared/components/Transaction/SignerListSet/Simple.tsx b/src/containers/shared/components/Transaction/SignerListSet/Simple.tsx index d91afe70b..eeab19230 100644 --- a/src/containers/shared/components/Transaction/SignerListSet/Simple.tsx +++ b/src/containers/shared/components/Transaction/SignerListSet/Simple.tsx @@ -12,7 +12,7 @@ export const Simple = ({ return signers?.length ? ( <> - +
      {signers.map((d) => (
    • @@ -23,7 +23,7 @@ export const Simple = ({ ))}
    - + {quorum} {t('out_of')} {maxSigners} diff --git a/src/containers/shared/components/Transaction/SignerListSet/test/SignerListSetSimple.test.tsx b/src/containers/shared/components/Transaction/SignerListSet/test/SignerListSetSimple.test.tsx index 46b434de8..4330dc059 100644 --- a/src/containers/shared/components/Transaction/SignerListSet/test/SignerListSetSimple.test.tsx +++ b/src/containers/shared/components/Transaction/SignerListSet/test/SignerListSetSimple.test.tsx @@ -10,11 +10,11 @@ describe('SignerListSet: Simple', () => { it('renders', () => { const wrapper = createWrapper(mockSignerListSet) - expect(wrapper.find('[data-test="quorum"] .value').text()).toEqual( + expect(wrapper.find('[data-testid="quorum"] .value').text()).toEqual( '3 out_of 4', ) - const signers = wrapper.find('[data-test="signers"] .value li') + const signers = wrapper.find('[data-testid="signers"] .value li') expect(signers.at(0)).toHaveText( 'rK8MWkYVgHR6VmPH6WpWcvVce9evvMpKSv weight: 2', ) diff --git a/src/containers/shared/components/Transaction/SimpleGroup.tsx b/src/containers/shared/components/Transaction/SimpleGroup.tsx index 7fc0a40a3..76d443c8a 100644 --- a/src/containers/shared/components/Transaction/SimpleGroup.tsx +++ b/src/containers/shared/components/Transaction/SimpleGroup.tsx @@ -4,7 +4,7 @@ export type SimpleGroupProps = React.PropsWithChildren<{ }> export const SimpleGroup = ({ children, title }: SimpleGroupProps) => ( -
    +
    {title &&
    {title}
    } {children}
    diff --git a/src/containers/shared/components/Transaction/TicketCreate/Simple.tsx b/src/containers/shared/components/Transaction/TicketCreate/Simple.tsx index f84766083..dd9d502ba 100644 --- a/src/containers/shared/components/Transaction/TicketCreate/Simple.tsx +++ b/src/containers/shared/components/Transaction/TicketCreate/Simple.tsx @@ -11,7 +11,7 @@ const Simple: TransactionSimpleComponent = ( const { TicketCount } = data.instructions return ( - + {TicketCount} ) diff --git a/src/containers/shared/components/Transaction/TrustSet/Simple.tsx b/src/containers/shared/components/Transaction/TrustSet/Simple.tsx index 4f7fa0015..af9b743d4 100644 --- a/src/containers/shared/components/Transaction/TrustSet/Simple.tsx +++ b/src/containers/shared/components/Transaction/TrustSet/Simple.tsx @@ -10,7 +10,7 @@ export const Simple = ({ data }: TransactionSimpleProps) => { const { LimitAmount } = data.instructions return ( - + ) diff --git a/src/containers/shared/components/Transaction/UNLModify/Simple.tsx b/src/containers/shared/components/Transaction/UNLModify/Simple.tsx index 57629787d..86e9680bf 100644 --- a/src/containers/shared/components/Transaction/UNLModify/Simple.tsx +++ b/src/containers/shared/components/Transaction/UNLModify/Simple.tsx @@ -16,12 +16,12 @@ export const Simple = ({ data }: TransactionSimpleProps) => { return ( <> - + {encoded} - + {tx.UNLModifyDisabling ? 'DISABLE' : 'ENABLE'} diff --git a/src/containers/shared/components/Transaction/UNLModify/test/UNLModifySimple.test.tsx b/src/containers/shared/components/Transaction/UNLModify/test/UNLModifySimple.test.tsx index 89cab8f69..6a17eaffb 100644 --- a/src/containers/shared/components/Transaction/UNLModify/test/UNLModifySimple.test.tsx +++ b/src/containers/shared/components/Transaction/UNLModify/test/UNLModifySimple.test.tsx @@ -51,7 +51,7 @@ describe('UNLModify: Simple', () => { /> , ) - expect(wrapper.find('[data-test="account"]')).not.toExist() + expect(wrapper.find('[data-testid="account"]')).not.toExist() expectSimpleRowLabel(wrapper, 'sequence', 'Sequence Number') expectSimpleRowText(wrapper, 'sequence', '0') diff --git a/src/containers/shared/components/Transaction/XChainAccountCreateCommit/Simple.tsx b/src/containers/shared/components/Transaction/XChainAccountCreateCommit/Simple.tsx index 2d7edc199..b9dfdd898 100644 --- a/src/containers/shared/components/Transaction/XChainAccountCreateCommit/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainAccountCreateCommit/Simple.tsx @@ -25,7 +25,7 @@ export const Simple: TransactionSimpleComponent = ( return ( <> - + - + diff --git a/src/containers/shared/components/Transaction/XChainAccountCreateCommit/test/XChainAccountCreateCommitSimple.test.tsx b/src/containers/shared/components/Transaction/XChainAccountCreateCommit/test/XChainAccountCreateCommitSimple.test.tsx index 93fe0f163..f21484912 100644 --- a/src/containers/shared/components/Transaction/XChainAccountCreateCommit/test/XChainAccountCreateCommitSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainAccountCreateCommit/test/XChainAccountCreateCommitSimple.test.tsx @@ -16,14 +16,14 @@ describe('XChainAccountCreateCommitSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') @@ -32,7 +32,7 @@ describe('XChainAccountCreateCommitSimple', () => { 'destination', 'raFcdz1g8LWJDJWJE2ZKLRGdmUmsTyxaym', ) - expect(wrapper.find(`[data-test="destination"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).not.toExist() }) it('renders failed transaction', () => { @@ -46,14 +46,14 @@ describe('XChainAccountCreateCommitSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE9001,000.00 XRP') @@ -62,6 +62,6 @@ describe('XChainAccountCreateCommitSimple', () => { 'destination', 'raFcdz1g8LWJDJWJE2ZKLRGdmUmsTyxaym', ) - expect(wrapper.find(`[data-test="destination"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).not.toExist() }) }) diff --git a/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/Simple.tsx b/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/Simple.tsx index 153c46410..75dcf96c3 100644 --- a/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/Simple.tsx @@ -32,13 +32,16 @@ export const Simple: TransactionSimpleComponent = ( issuingIssue={issuingIssue} bridgeOwner="" /> - + - + - + diff --git a/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/test/XChainAddAccountCreateAttestationSimple.test.tsx b/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/test/XChainAddAccountCreateAttestationSimple.test.tsx index bd638d445..eb6bbca43 100644 --- a/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/test/XChainAddAccountCreateAttestationSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainAddAccountCreateAttestation/test/XChainAddAccountCreateAttestationSimple.test.tsx @@ -16,14 +16,14 @@ describe('XChainAddAccountCreateAttestationSimple', () => { 'locking-chain-door', 'rDPwN6dz3shffxodeUC9Qf5y1mEHYySKLJ', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') @@ -37,7 +37,7 @@ describe('XChainAddAccountCreateAttestationSimple', () => { 'destination', 'rLbKhMNskUBYRShdbbQcFm9YhumEeUJfPK', ) - expect(wrapper.find(`[data-test="destination"] a`)).toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).toExist() }) it('renders failed transaction', () => { @@ -49,14 +49,14 @@ describe('XChainAddAccountCreateAttestationSimple', () => { 'locking-chain-door', 'rNFrsx478pH42Vy5w4KN9Hcyh8SDrVmCfd', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') @@ -70,6 +70,6 @@ describe('XChainAddAccountCreateAttestationSimple', () => { 'destination', 'rPy1F9bQ7dNn2T3QAFRM6dFz6ygHa3MDDi', ) - expect(wrapper.find(`[data-test="destination"] a`)).toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).toExist() }) }) diff --git a/src/containers/shared/components/Transaction/XChainAddClaimAttestation/Simple.tsx b/src/containers/shared/components/Transaction/XChainAddClaimAttestation/Simple.tsx index 4dd8cd196..79026c1ec 100644 --- a/src/containers/shared/components/Transaction/XChainAddClaimAttestation/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainAddClaimAttestation/Simple.tsx @@ -33,18 +33,21 @@ export const Simple: TransactionSimpleComponent = ( issuingIssue={issuingIssue} bridgeOwner="" /> - + - + {destination && ( - + )} - + {claimId} diff --git a/src/containers/shared/components/Transaction/XChainAddClaimAttestation/test/XChainAddClaimAttestationSimple.test.tsx b/src/containers/shared/components/Transaction/XChainAddClaimAttestation/test/XChainAddClaimAttestationSimple.test.tsx index 8a79dfea1..d86c3287f 100644 --- a/src/containers/shared/components/Transaction/XChainAddClaimAttestation/test/XChainAddClaimAttestationSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainAddClaimAttestation/test/XChainAddClaimAttestationSimple.test.tsx @@ -16,14 +16,14 @@ describe('XChainAddClaimAttestationSimple', () => { 'locking-chain-door', 'r3ZsJYkBao2qiwUCvmjfgEUquKueLAwPxQ', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') @@ -37,7 +37,7 @@ describe('XChainAddClaimAttestationSimple', () => { 'destination', 'rJdTJRJZ6GXCCRaamHJgEqVzB7Zy4557Pi', ) - expect(wrapper.find(`[data-test="destination"] a`)).toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).toExist() expectSimpleRowText(wrapper, 'xchain-claim-id', '1') }) @@ -50,14 +50,14 @@ describe('XChainAddClaimAttestationSimple', () => { 'locking-chain-door', 'rNFrsx478pH42Vy5w4KN9Hcyh8SDrVmCfd', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') @@ -71,7 +71,7 @@ describe('XChainAddClaimAttestationSimple', () => { 'destination', 'rJdTJRJZ6GXCCRaamHJgEqVzB7Zy4557Pi', ) - expect(wrapper.find(`[data-test="destination"] a`)).toExist() + expect(wrapper.find(`[data-testid="destination"] a`)).toExist() expectSimpleRowText(wrapper, 'xchain-claim-id', '3') }) }) diff --git a/src/containers/shared/components/Transaction/XChainBridge.tsx b/src/containers/shared/components/Transaction/XChainBridge.tsx index ba587576a..9452d54bc 100644 --- a/src/containers/shared/components/Transaction/XChainBridge.tsx +++ b/src/containers/shared/components/Transaction/XChainBridge.tsx @@ -28,12 +28,15 @@ export const XChainBridge = (props: XChainBridgeProps) => { return ( - + { link={lockingDoor === bridgeOwner} /> - + { /> {signatureReward && ( - + )} diff --git a/src/containers/shared/components/Transaction/XChainClaim/Simple.tsx b/src/containers/shared/components/Transaction/XChainClaim/Simple.tsx index c055d57aa..05900b4f8 100644 --- a/src/containers/shared/components/Transaction/XChainClaim/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainClaim/Simple.tsx @@ -30,13 +30,13 @@ export const Simple: TransactionSimpleComponent = ( issuingIssue={issuingIssue} bridgeOwner={bridgeOwner} /> - + {claimId} - + - + diff --git a/src/containers/shared/components/Transaction/XChainClaim/test/XChainClaimSimple.test.tsx b/src/containers/shared/components/Transaction/XChainClaim/test/XChainClaimSimple.test.tsx index 62fed18d1..9147d645b 100644 --- a/src/containers/shared/components/Transaction/XChainClaim/test/XChainClaimSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainClaim/test/XChainClaimSimple.test.tsx @@ -15,14 +15,14 @@ describe('XChainClaimSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'amount', '\uE90010.00 XRP') @@ -43,14 +43,14 @@ describe('XChainClaimSimple', () => { 'locking-chain-door', 'rMAXACCrp3Y8PpswXcg3bKggHX76V3F8M4', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'amount', '\uE9000.01 XRP') diff --git a/src/containers/shared/components/Transaction/XChainCommit/Simple.tsx b/src/containers/shared/components/Transaction/XChainCommit/Simple.tsx index a761a14b5..3371b6774 100644 --- a/src/containers/shared/components/Transaction/XChainCommit/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainCommit/Simple.tsx @@ -26,7 +26,7 @@ export const Simple: TransactionSimpleComponent = ( return ( <> - + - + {xchainClaimId} {otherChainDestination && ( - + )} diff --git a/src/containers/shared/components/Transaction/XChainCommit/test/XChainCommitSimple.test.tsx b/src/containers/shared/components/Transaction/XChainCommit/test/XChainCommitSimple.test.tsx index 6a7857113..c57575d6d 100644 --- a/src/containers/shared/components/Transaction/XChainCommit/test/XChainCommitSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainCommit/test/XChainCommitSimple.test.tsx @@ -16,19 +16,19 @@ describe('XChainCommitSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010.00 XRP') expectSimpleRowText(wrapper, 'claim-id', '4') - expect(wrapper.find(`[data-test="destination"]`)).not.toExist() + expect(wrapper.find(`[data-testid="destination"]`)).not.toExist() }) it('renders failed tx', () => { @@ -40,14 +40,14 @@ describe('XChainCommitSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'send', '\uE90010,000.00 XRP') diff --git a/src/containers/shared/components/Transaction/XChainCreateBridge/Simple.tsx b/src/containers/shared/components/Transaction/XChainCreateBridge/Simple.tsx index f4a1c2b25..4baa1a42b 100644 --- a/src/containers/shared/components/Transaction/XChainCreateBridge/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainCreateBridge/Simple.tsx @@ -35,7 +35,7 @@ export const Simple: TransactionSimpleComponent = ( {minAccountCreateAmount && ( diff --git a/src/containers/shared/components/Transaction/XChainCreateBridge/test/XChainCreateBridgeSimple.test.tsx b/src/containers/shared/components/Transaction/XChainCreateBridge/test/XChainCreateBridgeSimple.test.tsx index dd53e4652..d7a837909 100644 --- a/src/containers/shared/components/Transaction/XChainCreateBridge/test/XChainCreateBridgeSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainCreateBridge/test/XChainCreateBridgeSimple.test.tsx @@ -16,19 +16,19 @@ describe('XChainCreateBridgeSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.0001 XRP') expect( - wrapper.find(`[data-test="min-create-account-amount"]`), + wrapper.find(`[data-testid="min-create-account-amount"]`), ).not.toExist() }) @@ -41,7 +41,7 @@ describe('XChainCreateBridgeSimple', () => { 'locking-chain-door', 'ratAutb3katzezbXX3LsX4sk4vmvhNucac', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText( wrapper, 'locking-chain-issue', @@ -52,7 +52,7 @@ describe('XChainCreateBridgeSimple', () => { 'issuing-chain-door', 'rBkRN2VHVWJVKqfnh1TovLkXo7vLP7oBcq', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText( wrapper, 'issuing-chain-issue', @@ -72,14 +72,14 @@ describe('XChainCreateBridgeSimple', () => { 'locking-chain-door', 'rNFrsx478pH42Vy5w4KN9Hcyh8SDrVmCfd', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.0001 XRP') diff --git a/src/containers/shared/components/Transaction/XChainCreateClaimID/Simple.tsx b/src/containers/shared/components/Transaction/XChainCreateClaimID/Simple.tsx index a36535c9a..997d42f0f 100644 --- a/src/containers/shared/components/Transaction/XChainCreateClaimID/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainCreateClaimID/Simple.tsx @@ -33,11 +33,14 @@ export const Simple: TransactionSimpleComponent = ( signatureReward={signatureReward} bridgeOwner={bridgeOwner} /> - + {claimID && ( - + {claimID} )} diff --git a/src/containers/shared/components/Transaction/XChainCreateClaimID/test/XChainCreateClaimIDSimple.test.tsx b/src/containers/shared/components/Transaction/XChainCreateClaimID/test/XChainCreateClaimIDSimple.test.tsx index 28030e097..ff6d62f6f 100644 --- a/src/containers/shared/components/Transaction/XChainCreateClaimID/test/XChainCreateClaimIDSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainCreateClaimID/test/XChainCreateClaimIDSimple.test.tsx @@ -15,14 +15,14 @@ describe('XChainCreateClaimIDSimple', () => { 'locking-chain-door', 'rNe5NbD1hqCSZPz9KM5PHm5Bf8jjHfezPE', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.0001 XRP') @@ -43,14 +43,14 @@ describe('XChainCreateClaimIDSimple', () => { 'locking-chain-door', 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.0001 XRP') @@ -59,6 +59,6 @@ describe('XChainCreateClaimIDSimple', () => { 'other-chain-source', 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W', ) - expect(wrapper.find(`[data-test="claim-id"]`)).not.toExist() + expect(wrapper.find(`[data-testid="claim-id"]`)).not.toExist() }) }) diff --git a/src/containers/shared/components/Transaction/XChainModifyBridge/Simple.tsx b/src/containers/shared/components/Transaction/XChainModifyBridge/Simple.tsx index f4a1c2b25..4baa1a42b 100644 --- a/src/containers/shared/components/Transaction/XChainModifyBridge/Simple.tsx +++ b/src/containers/shared/components/Transaction/XChainModifyBridge/Simple.tsx @@ -35,7 +35,7 @@ export const Simple: TransactionSimpleComponent = ( {minAccountCreateAmount && ( diff --git a/src/containers/shared/components/Transaction/XChainModifyBridge/test/XChainModifyBridgeSimple.test.tsx b/src/containers/shared/components/Transaction/XChainModifyBridge/test/XChainModifyBridgeSimple.test.tsx index 57bafb85b..215580a71 100644 --- a/src/containers/shared/components/Transaction/XChainModifyBridge/test/XChainModifyBridgeSimple.test.tsx +++ b/src/containers/shared/components/Transaction/XChainModifyBridge/test/XChainModifyBridgeSimple.test.tsx @@ -16,14 +16,14 @@ describe('XChainModifyBridgeSimple', () => { 'locking-chain-door', 'rGQLcxzT3Po9PsCk5Lj9uK7S1juThii9cR', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.01 XRP') @@ -38,14 +38,14 @@ describe('XChainModifyBridgeSimple', () => { 'locking-chain-door', 'rnBnyot2gCJywLxLzfHQX2dUJqZ6oghUFp', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText( @@ -64,14 +64,14 @@ describe('XChainModifyBridgeSimple', () => { 'locking-chain-door', 'r3rhWeE31Jt5sWmi4QiGLMZnY3ENgqw96W', ) - expect(wrapper.find(`[data-test="locking-chain-door"] a`)).not.toExist() + expect(wrapper.find(`[data-testid="locking-chain-door"] a`)).not.toExist() expectSimpleRowText(wrapper, 'locking-chain-issue', '\uE900 XRP') expectSimpleRowText( wrapper, 'issuing-chain-door', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="issuing-chain-door"] a`)).toExist() + expect(wrapper.find(`[data-testid="issuing-chain-door"] a`)).toExist() expectSimpleRowText(wrapper, 'issuing-chain-issue', '\uE900 XRP') expectSimpleRowText(wrapper, 'signature-reward', '\uE9000.0001 XRP') diff --git a/src/containers/shared/components/Transaction/test/DefaultSimple.test.tsx b/src/containers/shared/components/Transaction/test/DefaultSimple.test.tsx index df9eb1296..f80c0b5dc 100644 --- a/src/containers/shared/components/Transaction/test/DefaultSimple.test.tsx +++ b/src/containers/shared/components/Transaction/test/DefaultSimple.test.tsx @@ -22,7 +22,7 @@ describe('DefaultSimple', () => { 'Destination', 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh', ) - expect(wrapper.find(`[data-test="Destination"] a`)).toExist() + expect(wrapper.find(`[data-testid="Destination"] a`)).toExist() expectSimpleRowText(wrapper, 'Amount', '\uE9001.00 XRP') expectSimpleRowText(wrapper, 'FinishAfter', '736447590') wrapper.unmount() @@ -30,27 +30,29 @@ describe('DefaultSimple', () => { it('renders Simple for more complex transaction', () => { const wrapper = createWrapper(SetHook) - expect(wrapper.find(`[data-test="group"]`).length).toEqual(10) - expect(wrapper.find(`[data-test="CreateCode"]`).length).toEqual(10) - expect(wrapper.find(`[data-test="Flags"]`).length).toEqual(10) - expect(wrapper.find(`[data-test="HookApiVersion"]`).length).toEqual(2) - expect(wrapper.find(`[data-test="HookNamespace"]`).length).toEqual(2) - expect(wrapper.find(`[data-test="HookOn"]`).length).toEqual(2) + expect(wrapper.find(`[data-testid="group"]`).length).toEqual(10) + expect(wrapper.find(`[data-testid="CreateCode"]`).length).toEqual(10) + expect(wrapper.find(`[data-testid="Flags"]`).length).toEqual(10) + expect(wrapper.find(`[data-testid="HookApiVersion"]`).length).toEqual(2) + expect(wrapper.find(`[data-testid="HookNamespace"]`).length).toEqual(2) + expect(wrapper.find(`[data-testid="HookOn"]`).length).toEqual(2) - expect(wrapper.find(`[data-test="CreateCode"] .value`).at(0)).toHaveText( + expect(wrapper.find(`[data-testid="CreateCode"] .value`).at(0)).toHaveText( '0061736D0100000001420960027F7F017F60037F7F7F017E60037F7F7E017E60027F7F017E60047F' + '7F7F7F017E60017F017E6000017E60057F7F7F7F7F017E60097F7F7F7F7F7F7F7F7F017E02BC02' + '1403656E76025F67000003656E760A6F74786E5F6669656C64000103656E760661636365707400' + '0203656E7608726F6C6C6261636B000203656E760C686F6F6B5F6163636F756E...', ) - expect(wrapper.find(`[data-test="Flags"] .value`).at(0)).toHaveText('1') + expect(wrapper.find(`[data-testid="Flags"] .value`).at(0)).toHaveText('1') expect( - wrapper.find(`[data-test="HookApiVersion"] .value`).at(0), + wrapper.find(`[data-testid="HookApiVersion"] .value`).at(0), ).toHaveText('0') - expect(wrapper.find(`[data-test="HookNamespace"] .value`).at(0)).toHaveText( + expect( + wrapper.find(`[data-testid="HookNamespace"] .value`).at(0), + ).toHaveText( '0000000000000000000000000000000000000000000000000000000000000000', ) - expect(wrapper.find(`[data-test="HookOn"] .value`).at(0)).toHaveText( + expect(wrapper.find(`[data-testid="HookOn"] .value`).at(0)).toHaveText( 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFBFFFFF', ) @@ -59,38 +61,40 @@ describe('DefaultSimple', () => { it('renders Simple for more complex transaction', () => { const wrapper = createWrapper(SetHook2) - expect(wrapper.find(`[data-test="group"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="CreateCode"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="Flags"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="HookApiVersion"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="HookNamespace"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="HookOn"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="HookParameters"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="group"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="CreateCode"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="Flags"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="HookApiVersion"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="HookNamespace"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="HookOn"]`).length).toEqual(1) + expect(wrapper.find(`[data-testid="HookParameters"]`).length).toEqual(1) - expect(wrapper.find(`[data-test="CreateCode"] .value`).at(0)).toHaveText( + expect(wrapper.find(`[data-testid="CreateCode"] .value`).at(0)).toHaveText( '0061736D01000000011C0460057F7F7F7F7F017E60037F7F7E017E60027F7F017F60017F017E0223' + '0303656E76057472616365000003656E7606616363657074000103656E76025F6700020302010305' + '030100020621057F0141B088040B7F0041A6080B7F004180080B7F0041B088040B7F004180080B07' + '080104686F6F6B00030AC6800001C2800002017F017E230041106B220124...', ) - expect(wrapper.find(`[data-test="Flags"] .value`).at(0)).toHaveText('1') + expect(wrapper.find(`[data-testid="Flags"] .value`).at(0)).toHaveText('1') expect( - wrapper.find(`[data-test="HookApiVersion"] .value`).at(0), + wrapper.find(`[data-testid="HookApiVersion"] .value`).at(0), ).toHaveText('0') - expect(wrapper.find(`[data-test="HookNamespace"] .value`).at(0)).toHaveText( + expect( + wrapper.find(`[data-testid="HookNamespace"] .value`).at(0), + ).toHaveText( '4FF9961269BF7630D32E15276569C94470174A5DA79FA567C0F62251AA9A36B9', ) - expect(wrapper.find(`[data-test="HookOn"] .value`).at(0)).toHaveText( + expect(wrapper.find(`[data-testid="HookOn"] .value`).at(0)).toHaveText( 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFBFFFFF', ) expect( wrapper.find( - `[data-test="HookParameters"] .subgroup [data-test="HookParameterName"]`, + `[data-testid="HookParameters"] .subgroup [data-testid="HookParameterName"]`, ), ).toHaveText('HookParameterName: 6E616D6531') expect( wrapper.find( - `[data-test="HookParameters"] .subgroup [data-test="HookParameterValue"]`, + `[data-testid="HookParameters"] .subgroup [data-testid="HookParameterValue"]`, ), ).toHaveText('HookParameterValue: 76616C756531') @@ -104,7 +108,7 @@ describe('DefaultSimple', () => { 'AccountOther', 'rPTScb8m3wq6r3Ys93Ec5at7LYDmWrtndi', ) - expect(wrapper.find(`[data-test="AccountOther"] a`)).toExist() + expect(wrapper.find(`[data-testid="AccountOther"] a`)).toExist() expectSimpleRowText( wrapper, 'Amount', diff --git a/src/containers/shared/components/Transaction/test/expectations.ts b/src/containers/shared/components/Transaction/test/expectations.ts index 87d47226b..01827b83e 100644 --- a/src/containers/shared/components/Transaction/test/expectations.ts +++ b/src/containers/shared/components/Transaction/test/expectations.ts @@ -1,7 +1,7 @@ import { ReactWrapper } from 'enzyme' const getSelector = (selector: string) => - selector.indexOf('.') === 0 ? selector : `[data-test="${selector}"]` + selector.indexOf('.') === 0 ? selector : `[data-testid="${selector}"]` export const expectSimpleRowLabel = ( wrapper: ReactWrapper>,