diff --git a/src/components/layouts/AppbarApp.spec.tsx b/src/components/layouts/AppbarApp.spec.tsx
index 369c6e0..ced36b0 100644
--- a/src/components/layouts/AppbarApp.spec.tsx
+++ b/src/components/layouts/AppbarApp.spec.tsx
@@ -1,16 +1,11 @@
-import { render, screen, fireEvent } from '@testing-library/react';
+import { render, screen } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';
-import { IconButton, Avatar } from '@mui/material';
import AppbarApp from './AppbarApp';
-vi.mock('./AccountPopover', () => ({
- default: () => (
-
+// Mocking the ConnectButton from RainbowKit
+vi.mock('@rainbow-me/rainbowkit', () => ({
+ ConnectButton: () => (
+ Mocked ConnectButton
),
}));
@@ -20,18 +15,12 @@ describe('AppbarApp', () => {
const appBar = screen.getByTestId('Appbar');
expect(appBar).toBeInTheDocument();
-
- const accountPopover = screen.getByTestId('account-popover');
- expect(accountPopover).toBeInTheDocument();
});
- it('should open AccountPopover on icon button click', () => {
+ it('should render the ConnectButton', () => {
render();
- const iconButton = screen.getByTestId('account-popover-button');
- fireEvent.click(iconButton);
-
- const accountPopover = screen.getByTestId('account-popover');
- expect(accountPopover).toBeVisible();
+ const connectButton = screen.getByTestId('connect-button');
+ expect(connectButton).toBeInTheDocument();
});
});