2023-04-21 17:28:18 +02:00
|
|
|
import React from 'react';
|
|
|
|
import { render } from '@testing-library/react';
|
|
|
|
|
2023-06-28 15:37:03 +02:00
|
|
|
import { ProductTour } from '.';
|
2023-04-21 17:28:18 +02:00
|
|
|
|
|
|
|
describe('DetectedTokensBanner', () => {
|
|
|
|
const props = {
|
|
|
|
title: 'Permissions',
|
|
|
|
description: 'Find your connected accounts and manage permissions here.',
|
|
|
|
currentStep: '1',
|
|
|
|
totalSteps: '3',
|
2023-07-04 14:00:09 +02:00
|
|
|
closeMenu: jest.fn(),
|
2023-04-21 17:28:18 +02:00
|
|
|
};
|
|
|
|
it('should render correctly', () => {
|
|
|
|
const { getByTestId } = render(
|
|
|
|
<ProductTour anchorElement={document.body} {...props} />,
|
|
|
|
);
|
|
|
|
const menuContainer = getByTestId('multichain-product-tour-menu-popover');
|
|
|
|
expect(menuContainer).toBeInTheDocument();
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should render prev Icon', () => {
|
|
|
|
const { getByTestId } = render(
|
|
|
|
<ProductTour anchorElement={document.body} {...props} prevIcon />,
|
|
|
|
);
|
|
|
|
const prevIcon = getByTestId(
|
|
|
|
'multichain-product-tour-menu-popover-prevIcon',
|
|
|
|
);
|
|
|
|
expect(prevIcon).toBeInTheDocument();
|
|
|
|
});
|
|
|
|
});
|