Skip to content

Commit

Permalink
Plans 2023: Migrate plan-type-selector under plans-grid package (#84162)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskmnds authored Nov 23, 2023
1 parent 30b31ce commit a00d69d
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 180 deletions.
4 changes: 2 additions & 2 deletions client/my-sites/plans-features-main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,8 @@ import scrollIntoViewport from 'calypso/lib/scroll-into-viewport';
import { addQueryArgs } from 'calypso/lib/url';
import useStorageAddOns from 'calypso/my-sites/add-ons/hooks/use-storage-add-ons';
import PlanNotice from 'calypso/my-sites/plans-features-main/components/plan-notice';
import PlanTypeSelector from 'calypso/my-sites/plans-features-main/components/plan-type-selector';
import useIsFreePlanCustomDomainUpsellEnabled from 'calypso/my-sites/plans-features-main/hooks/use-is-free-plan-custom-domain-upsell-enabled';
import { FeaturesGrid, ComparisonGrid } from 'calypso/my-sites/plans-grid';
import { FeaturesGrid, ComparisonGrid, PlanTypeSelector } from 'calypso/my-sites/plans-grid';
import useGridPlans from 'calypso/my-sites/plans-grid/hooks/npm-ready/data-store/use-grid-plans';
import usePlanFeaturesForGridPlans from 'calypso/my-sites/plans-grid/hooks/npm-ready/data-store/use-plan-features-for-grid-plans';
import useRestructuredPlanFeaturesForComparisonGrid from 'calypso/my-sites/plans-grid/hooks/npm-ready/data-store/use-restructured-plan-features-for-comparison-grid';
Expand Down Expand Up @@ -531,6 +530,7 @@ const PlansFeaturesMain = ( {
plans: gridPlansForFeaturesGrid.map( ( gridPlan ) => gridPlan.planSlug ),
currentSitePlanSlug: sitePlanSlug,
usePricingMetaForGridPlans,
recordTracksEvent,
};
/**
* The effects on /plans page need to be checked if this variable is initialized
Expand Down
4 changes: 1 addition & 3 deletions client/my-sites/plans-features-main/test/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ jest.mock( 'calypso/my-sites/plans-grid', () => ( {
</div>
</div>
),
PlanTypeSelector: () => <div>PlanTypeSelector</div>,
} ) );
jest.mock( 'calypso/my-sites/plans-features-main/components/plan-type-selector', () => () => (
<div>PlanTypeSelector</div>
) );
jest.mock( '../hooks/use-plan-intent-from-site-meta', () => jest.fn() );
jest.mock( '../hooks/use-suggested-free-domain-from-paid-domain', () => () => ( {
wpcomFreeDomainSuggestion: { isLoading: false, result: { domain_name: 'suggestion.com' } },
Expand Down
Loading

0 comments on commit a00d69d

Please sign in to comment.