feat: update tests

This commit is contained in:
amlannandy 2024-12-07 11:08:57 +05:30 committed by Amlan Kumar Nandy
parent b499b10333
commit 1b8213653a
2 changed files with 59 additions and 60 deletions

View File

@ -521,7 +521,6 @@ function DashboardsList(): JSX.Element {
</div> </div>
{action && ( {action && (
<div data-testid="dashboard-action-popover">
<Popover <Popover
trigger="click" trigger="click"
content={ content={
@ -573,13 +572,13 @@ function DashboardsList(): JSX.Element {
<EllipsisVertical <EllipsisVertical
className="dashboard-action-icon" className="dashboard-action-icon"
size={14} size={14}
data-testid="dashboard-action-icon"
onClick={(e): void => { onClick={(e): void => {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
}} }}
/> />
</Popover> </Popover>
</div>
)} )}
</div> </div>
<div className="dashboard-details"> <div className="dashboard-details">

View File

@ -218,7 +218,7 @@ describe('dashboard list page', () => {
); );
await waitFor(() => { await waitFor(() => {
const popovers = getAllByTestId('dashboard-action-popover'); const popovers = getAllByTestId('dashboard-action-icon');
expect(popovers).toHaveLength(dashboardSuccessResponse.data.length); expect(popovers).toHaveLength(dashboardSuccessResponse.data.length);
fireEvent.click([...popovers[0].children][0]); fireEvent.click([...popovers[0].children][0]);
}); });