diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/components/DashboardBanner.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/components/DashboardBanner.jsx index 704584a45f..d1e12f9adc 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/components/DashboardBanner.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/dashboard/components/DashboardBanner.jsx @@ -5,7 +5,7 @@ import { AppsMinor, MarketingMinor, ResetMinor, CustomersMinor, EditMinor, NoteM import GridRows from '../../../components/shared/GridRows' import BannerRow from './BannerRow' import { HOMEDASHBOARD_VIDEO_LENGTH, HOMEDASHBOARD_VIDEO_THUMBNAIL, HOMEDASHBOARD_VIDEO_URL } from '../../../../main/onboardingData' - +import LocalStore from '../../../../main/LocalStorageStore' function InfoComponent({title, items}) { return( @@ -16,6 +16,9 @@ function InfoComponent({title, items}) { } function DashboardBanner() { + const subCategoryMap = LocalStore.getState().subCategoryMap; + let defaultCount = Math.max(Object.keys(subCategoryMap).length,850); + defaultCount = Math.floor(defaultCount / 50) * 50 const productGuides = [ { @@ -29,7 +32,7 @@ function DashboardBanner() { title: "Start testing", icon: MarketingMinor, showRedirect: true, - description: "400+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs.", + description: defaultCount + "+ built-in tests covering OWASP Top 10, HackerOne top 10 and all the business logic vulnerabilities for your API Security testing needs.", redirectUrl: "/dashboard/testing", }, { diff --git a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/TestrunsBannerComponent.jsx b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/TestrunsBannerComponent.jsx index bc31f9da25..23adac845d 100644 --- a/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/TestrunsBannerComponent.jsx +++ b/apps/dashboard/web/polaris_web/web/src/apps/dashboard/pages/testing/TestRunsPage/TestrunsBannerComponent.jsx @@ -5,6 +5,7 @@ import DropdownSearch from '../../../components/shared/DropdownSearch' import PersistStore from '../../../../main/PersistStore' import { Box, Button, Popover, Text } from '@shopify/polaris' import { useNavigate } from 'react-router-dom' +import LocalStore from '../../../../main/LocalStorageStore' function SelectCollectionComponent() { const [popoverActive, setPopoverActive] = useState(false) @@ -52,10 +53,14 @@ function TestrunsBannerComponent({isInventory,onButtonClick}) { .forEach(collection => { urlsCount += collection.urlsCount} ) + + const subCategoryMap = LocalStore.getState().subCategoryMap; + let defaultCount = Math.max(Object.keys(subCategoryMap).length,850); + defaultCount = Math.floor(defaultCount / 50) * 50 return (