From d0eee2cbbcf0782c862bf8e74daeb05ab4eb52cd Mon Sep 17 00:00:00 2001 From: Andrew718PLTS Date: Wed, 27 Nov 2024 15:25:57 +0100 Subject: [PATCH] Feat: Added test locators --- src/components/nav/BalancesSummary.tsx | 10 ++++++++-- src/components/nav/NetworkModal.tsx | 16 +++++++++++++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/components/nav/BalancesSummary.tsx b/src/components/nav/BalancesSummary.tsx index 033c041..38ce044 100644 --- a/src/components/nav/BalancesSummary.tsx +++ b/src/components/nav/BalancesSummary.tsx @@ -13,10 +13,16 @@ export function BalancesSummary() { {tokenIds.map((id) => { const balance = fromWeiRounded(balances[id], Tokens[id].decimals) if (balance !== '0') { + const token = Tokens[id] // TODO: @bayo Either revert this !== 0 check or add some animation for when balances are loading return ( -
- +
+
{balance}
) diff --git a/src/components/nav/NetworkModal.tsx b/src/components/nav/NetworkModal.tsx index daf45c3..a75f02b 100644 --- a/src/components/nav/NetworkModal.tsx +++ b/src/components/nav/NetworkModal.tsx @@ -16,6 +16,7 @@ interface Props { } export function NetworkModal({ isOpen, close }: Props) { + const baseLocator = 'networkModal' const latestBlock = useAppSelector((s) => s.block.latestBlock) const chainId = useChainId() const currentChain = chainIdToChain[chainId] @@ -46,7 +47,10 @@ export function NetworkModal({ isOpen, close }: Props) {
Connected to:
-
+
{currentChain?.name || 'Unknown'}
@@ -55,7 +59,10 @@ export function NetworkModal({ isOpen, close }: Props) {
Block Number:
-
+
{latestBlock?.number || 'Unknown'}
@@ -64,7 +71,10 @@ export function NetworkModal({ isOpen, close }: Props) {
Node Rpc Url:
-
+
{shortenUrl(currentChain?.rpcUrl) || 'Unknown'}