[Fleet] Enable agent upgrade tooltip (#168638)

## Summary

Followup to https://github.com/elastic/kibana/pull/167539.

Closes https://github.com/elastic/ingest-dev/issues/2568.

As the version on which agents will have upgrade details is not known
yet, we decided to defer showing the tooltip for agents that don't until
it is (cf.
https://github.com/elastic/kibana/pull/167539#discussion_r1354346944).

This PR sets the version to 8.12.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Jill Guyonnet 2023-11-21 10:53:57 +01:00 committed by GitHub
parent 10ec7132fa
commit e859b14711
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -244,8 +244,7 @@ describe('AgentUpgradeStatus', () => {
expect(results.queryAllByText('Info')).toEqual([]);
});
// Unskip this test when minVersion is set.
it.skip('should render an icon with tooltip if the agent is upgrading', async () => {
it('should render an icon with tooltip if the agent is upgrading', async () => {
const results = render({
agentUpgradeStartedAt: '2023-10-03T14:34:12Z',
agentUpgradedAt: null,

View file

@ -225,7 +225,7 @@ export const AgentUpgradeStatus: React.FC<{
[agentUpgradeStartedAt, agentUpgradedAt]
);
const status = useMemo(() => getStatusComponents(agentUpgradeDetails), [agentUpgradeDetails]);
const minVersion = undefined; // Change this to a string in order for a tooltip to render for upgrading agents with no upgrade details.
const minVersion = '8.12';
if (isAgentUpgradable) {
return (
@ -249,7 +249,7 @@ export const AgentUpgradeStatus: React.FC<{
);
}
if (minVersion && isAgentUpgrading) {
if (isAgentUpgrading) {
return (
<EuiIconTip
type="iInCircle"