Skip to content

Commit

Permalink
Update to isDisabled class, fix width, fix tooltip not showing on dis…
Browse files Browse the repository at this point in the history
…abled
  • Loading branch information
RachelElysia committed Jan 8, 2025
1 parent 1f2d88e commit 65bed38
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,6 @@ const DropdownWrapper = ({
color: COLORS["ui-fleet-black-50"],
fontStyle: "italic",
cursor: "not-allowed",
pointerEvents: "none",
}),
// Styles for custom option
".dropdown-wrapper__option": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import React from "react";
import { screen, waitFor } from "@testing-library/react";
import { createCustomRenderer } from "test/test-utils";

import {
createMockVulnerabilitiesResponse,
createMockVulnerability,
} from "__mocks__/vulnerabilitiesMock";
import { createMockVulnerabilitiesResponse } from "__mocks__/vulnerabilitiesMock";
import createMockUser from "__mocks__/userMock";

import SoftwareVulnerabilitiesTable from "./SoftwareVulnerabilitiesTable";
Expand Down Expand Up @@ -353,7 +350,7 @@ describe("Software Vulnerabilities table", () => {
expect(
screen.getByText("Exploited vulnerabilities").parentElement?.parentElement
?.parentElement
).toHaveClass("is-disabled");
).toHaveClass("react-select__option--is-disabled");

await waitFor(() => {
waitFor(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.software-vulnerabilities-table {
&__exploited-vulnerabilities-dropdown {
min-width: 234px;
min-width: 250px;
}

&__count {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ export const getExploitedVulnerabilitiesDropdownOptions = (

return [
{
disabled: false,
isDisabled: false,
label: "All vulnerabilities",
value: "false",
helpText: "All vulnerabilities detected on your hosts.",
},
{
disabled: !isPremiumTier,
isDisabled: !isPremiumTier,
label: "Exploited vulnerabilities",
value: "true",
helpText:
Expand Down

0 comments on commit 65bed38

Please sign in to comment.