1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-22 17:33:23 +01:00

addresses an issue found in 10.6.0 QA (#12710)

* addresses an issue found in 10.6.0 QA

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* update test cases.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fixes unit test texts to pass

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
This commit is contained in:
Olusegun Akintayo 2021-11-16 02:04:09 +04:00 committed by GitHub
parent c84604b5e4
commit 0cf7455e18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 15 additions and 17 deletions

View File

@ -193,7 +193,7 @@
"message": "Approved"
},
"approvedAmountWithColon": {
"message": "Approved Amount:"
"message": "Approved amount:"
},
"asset": {
"message": "Asset"
@ -1088,7 +1088,7 @@
"message": "Goerli Test Network"
},
"grantedToWithColon": {
"message": "Granted To:"
"message": "Granted to:"
},
"happyToSeeYou": {
"message": "Were happy to see you."
@ -1867,7 +1867,7 @@
"message": "You have approved this permission"
},
"permissionRequest": {
"message": "Permission Request"
"message": "Permission request"
},
"permissionUncheckedIconDescription": {
"message": "You have not approved this permission"
@ -2887,7 +2887,7 @@
"message": "Transaction encountered an error."
},
"transactionFee": {
"message": "Transaction Fee"
"message": "Transaction fee"
},
"transactionHistoryBaseFee": {
"message": "Base Fee (GWEI)"

View File

@ -58,7 +58,7 @@ describe('ConfirmApproveContent Component', () => {
const editButtons = getAllByText('Edit');
expect(queryByText('Transaction Fee')).toBeInTheDocument();
expect(queryByText('Transaction fee')).toBeInTheDocument();
expect(
queryByText('A fee is associated with this request.'),
).toBeInTheDocument();
@ -72,13 +72,13 @@ describe('ConfirmApproveContent Component', () => {
expect(props.showCustomizeNonceModal).toHaveBeenCalledTimes(1);
const showHideTxDetails = getByText('View full transaction details');
expect(queryByText('Permission Request')).not.toBeInTheDocument();
expect(queryByText('Approved Amount:')).not.toBeInTheDocument();
expect(queryByText('Granted To:')).not.toBeInTheDocument();
expect(queryByText('Permission request')).not.toBeInTheDocument();
expect(queryByText('Approved amount:')).not.toBeInTheDocument();
expect(queryByText('Granted to:')).not.toBeInTheDocument();
fireEvent.click(showHideTxDetails);
expect(getByText('Permission Request')).toBeInTheDocument();
expect(getByText('Approved Amount:')).toBeInTheDocument();
expect(getByText('Granted To:')).toBeInTheDocument();
expect(getByText('Permission request')).toBeInTheDocument();
expect(getByText('Approved amount:')).toBeInTheDocument();
expect(getByText('Granted to:')).toBeInTheDocument();
expect(getByText('0x9bc5...fef4')).toBeInTheDocument();
});
});

View File

@ -144,9 +144,7 @@ export default function ConfirmApprove() {
}, [checkIfContract]);
const { origin } = transaction;
const formattedOrigin = origin
? origin[0].toUpperCase() + origin.slice(1)
: '';
const formattedOrigin = origin || '';
const { icon: siteImage = '' } = domainMetadata[origin] || {};

View File

@ -107,7 +107,7 @@ exports[`GasCustomizationModalComponent renders the component with initial props
<span
class="gas-modal-content__info-row__transaction-info__label"
>
Transaction Fee
Transaction fee
</span>
<span
class="gas-modal-content__info-row__transaction-info__value"

View File

@ -69,7 +69,7 @@ exports[`GasCustomizationModalContainer renders the component with initial props
<span
class="gas-modal-content__info-row__transaction-info__label"
>
Transaction Fee
Transaction fee
</span>
<span
class="gas-modal-content__info-row__transaction-info__value"

View File

@ -19,7 +19,7 @@ describe('GasCustomizationModalContainer', () => {
expect(getByText('Advanced')).toBeInTheDocument();
expect(getByText('Estimated Processing Times')).toBeInTheDocument();
expect(getByText('Send Amount')).toBeInTheDocument();
expect(getByText('Transaction Fee')).toBeInTheDocument();
expect(getByText('Transaction fee')).toBeInTheDocument();
expect(
getByTestId('gas-modal-content__info-row__send-info'),
).toMatchSnapshot();