Skip to content

Commit

Permalink
addresses an issue found in 10.6.0 QA (#12710)
Browse files Browse the repository at this point in the history
* addresses an issue found in 10.6.0 QA

Signed-off-by: Akintayo A. Olusegun <[email protected]>

* update test cases.

Signed-off-by: Akintayo A. Olusegun <[email protected]>

* Fixes unit test texts to pass

Signed-off-by: Akintayo A. Olusegun <[email protected]>
  • Loading branch information
segun authored Nov 15, 2021
1 parent c84604b commit 0cf7455
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
8 changes: 4 additions & 4 deletions app/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
"message": "Approved"
},
"approvedAmountWithColon": {
"message": "Approved Amount:"
"message": "Approved amount:"
},
"asset": {
"message": "Asset"
Expand Down Expand Up @@ -1088,7 +1088,7 @@
"message": "Goerli Test Network"
},
"grantedToWithColon": {
"message": "Granted To:"
"message": "Granted to:"
},
"happyToSeeYou": {
"message": "We’re happy to see you."
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -2887,7 +2887,7 @@
"message": "Transaction encountered an error."
},
"transactionFee": {
"message": "Transaction Fee"
"message": "Transaction fee"
},
"transactionHistoryBaseFee": {
"message": "Base Fee (GWEI)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
});
});
4 changes: 1 addition & 3 deletions ui/pages/confirm-approve/confirm-approve.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] || {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0cf7455

Please sign in to comment.