mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-04-24 04:45:58 +08:00
test(ledger): activity page loads
This commit is contained in:
@@ -69,6 +69,7 @@ export function Tabs({
|
||||
{tabs.map((tab, index) => (
|
||||
<TabButton
|
||||
onClick={() => onTabClick(index)}
|
||||
data-testid={`tab-${tab.slug}`}
|
||||
isActive={activeTab === index}
|
||||
key={tab.slug}
|
||||
label={tab.label}
|
||||
|
||||
@@ -17,6 +17,7 @@ import { TransactionList } from './components/transaction-list/transaction-list'
|
||||
|
||||
export function ActivityList() {
|
||||
const nativeSegwitSigner = useCurrentAccountNativeSegwitIndexZeroSigner();
|
||||
|
||||
const { isInitialLoading: isInitialLoadingBitcoinTransactions, data: bitcoinTransactions } =
|
||||
useGetBitcoinTransactionsByAddressQuery(nativeSegwitSigner.address);
|
||||
const { data: bitcoinPendingTxs = [] } = useBitcoinPendingTransactions(
|
||||
|
||||
@@ -68,4 +68,8 @@ export class HomePage {
|
||||
).isEnabled();
|
||||
await this.page.getByTestId(WalletDefaultNetworkConfigurationIds.testnet).click();
|
||||
}
|
||||
|
||||
async clickActivityTab() {
|
||||
await this.page.getByTestId(HomePageSelectors.ActivityTabBtn).click();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,4 +6,6 @@ export enum HomePageSelectors {
|
||||
ReceiveBtcTaprootQrCodeBtn = 'receive-taproot-qr-code-btn',
|
||||
ReceiveStxQrCodeBtn = 'receive-stx-qr-code-btn',
|
||||
SendCryptoAssetBtn = 'send-crypto-asset-btn',
|
||||
ActivityTabBtn = 'tab-activity',
|
||||
BalancesTabBtn = 'tab-balances',
|
||||
}
|
||||
|
||||
@@ -13,4 +13,11 @@ test.describe('App with Ledger', () => {
|
||||
const address = await homePage.getReceiveStxAddress();
|
||||
test.expect(address).toEqual('SPSDM5RXY2E3V7JTFYKPFNRPDHG1B85788FKG2KN');
|
||||
});
|
||||
|
||||
test('that you can navigate to activity page', async ({ homePage }) => {
|
||||
await homePage.clickActivityTab();
|
||||
const noActivityText = homePage.page.getByText('No activity yet');
|
||||
|
||||
test.expect(await noActivityText.count()).toBeGreaterThan(0);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user