Skip to content

Commit

Permalink
Merge pull request #10525 from linode/staging
Browse files Browse the repository at this point in the history
Release v1.120.1 - staging → master
  • Loading branch information
bnussman-akamai authored May 29, 2024
2 parents ad9b901 + 47b37ef commit 862822e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
7 changes: 7 additions & 0 deletions packages/manager/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## [2024-05-29] - v1.120.1


### Fixed:

- Tooltip not closing when unhovered ([#10523](https://github.com/linode/manager/pull/10523))

## [2024-05-28] - v1.120.0


Expand Down
2 changes: 1 addition & 1 deletion packages/manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "linode-manager",
"author": "Linode",
"description": "The Linode Manager website",
"version": "1.120.0",
"version": "1.120.1",
"private": true,
"type": "module",
"bugs": {
Expand Down
23 changes: 22 additions & 1 deletion packages/manager/src/components/TextTooltip/TextTooltip.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fireEvent } from '@testing-library/react';
import { fireEvent, waitFor } from '@testing-library/react';
import React from 'react';

import { renderWithTheme } from 'src/utilities/testHelpers';
Expand Down Expand Up @@ -59,4 +59,25 @@ describe('TextTooltip', () => {
expect(displayText).toHaveStyle('color: rgb(54, 131, 220)');
expect(displayText).toHaveStyle('font-size: 18px');
});

it('the tooltip should disappear on mouseout', async () => {
const props = {
displayText: 'Hover me',
tooltipText: 'This is a tooltip',
};

const { findByRole, getByText, queryByRole } = renderWithTheme(
<TextTooltip {...props} />
);

fireEvent.mouseEnter(getByText(props.displayText));

const tooltip = await findByRole('tooltip');

expect(tooltip).toBeInTheDocument();

fireEvent.mouseLeave(getByText(props.displayText));

await waitFor(() => expect(queryByRole('tooltip')).not.toBeInTheDocument());
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ export const TextTooltip = (props: TextTooltipProps) => {
},
},
}}
leaveDelay={500000}
data-qa-tooltip={dataQaTooltip}
enterTouchDelay={0}
placement={placement ? placement : 'bottom'}
Expand Down

0 comments on commit 862822e

Please sign in to comment.