fix pricing at home page
Build & Push / Pipeline Tests (push) Successful in 1m51s
Test / Type Check (all packages) (push) Successful in 51s
Build & Push / Build & Push Docker Image (push) Failing after 4m11s
Test / API Unit Tests (push) Successful in 1m15s
Test / Homepage Unit Tests (push) Successful in 49s
Test / Carplace Unit Tests (push) Successful in 43s
Test / Admin Unit Tests (push) Successful in 42s
Test / Dashboard Unit Tests (push) Successful in 43s
Test / API Integration Tests (push) Successful in 1m5s
Build & Push / Pipeline Tests (push) Successful in 1m51s
Test / Type Check (all packages) (push) Successful in 51s
Build & Push / Build & Push Docker Image (push) Failing after 4m11s
Test / API Unit Tests (push) Successful in 1m15s
Test / Homepage Unit Tests (push) Successful in 49s
Test / Carplace Unit Tests (push) Successful in 43s
Test / Admin Unit Tests (push) Successful in 42s
Test / Dashboard Unit Tests (push) Successful in 43s
Test / API Integration Tests (push) Successful in 1m5s
This commit is contained in:
@@ -22,7 +22,7 @@ describe('homepage content model', () => {
|
||||
expect(content.modules.items).toHaveLength(6);
|
||||
expect(content.faq.items).toHaveLength(6);
|
||||
expect(content.pricing.fleetBands).toHaveLength(4);
|
||||
expect(content.pricing.plans).toHaveLength(4);
|
||||
expect(content.pricing.plans).toHaveLength(3);
|
||||
expect(content.hero.preview.rows).toHaveLength(2);
|
||||
});
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@ describe('PricingSection', () => {
|
||||
|
||||
await user.click(screen.getByLabelText('76–150 vehicles'));
|
||||
|
||||
expect(container.querySelector('[data-plan="pro"]')).toHaveAttribute(
|
||||
expect(container.querySelector('[data-plan="growth"]')).toHaveAttribute(
|
||||
'data-recommended',
|
||||
'true',
|
||||
);
|
||||
expect(container.querySelector('[data-plan="growth"]')).not.toHaveAttribute('data-recommended');
|
||||
expect(container.querySelector('[data-plan="launch"]')).not.toHaveAttribute('data-recommended');
|
||||
});
|
||||
|
||||
it('renders approved public prices except for Enterprise custom pricing', async () => {
|
||||
@@ -62,15 +62,14 @@ describe('PricingSection', () => {
|
||||
expect(screen.queryByText('Starting price pending approval')).not.toBeInTheDocument();
|
||||
expect(screen.getByText(/149/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/299/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/399/)).toBeInTheDocument();
|
||||
expect(screen.getByText('Custom pricing')).toBeInTheDocument();
|
||||
|
||||
await user.click(screen.getByLabelText(/Annual/));
|
||||
|
||||
expect(screen.getByText(/Save 20%/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/1,430/)).toBeInTheDocument();
|
||||
expect(screen.getAllByText('/ year')).toHaveLength(3);
|
||||
expect(screen.getAllByText('billed annually after full-payment discount')).toHaveLength(3);
|
||||
expect(screen.getAllByText('/ year')).toHaveLength(2);
|
||||
expect(screen.getAllByText('billed annually after full-payment discount')).toHaveLength(2);
|
||||
});
|
||||
|
||||
it('links self-serve plan CTAs to account creation and opens a pricing form for Enterprise', () => {
|
||||
@@ -93,10 +92,6 @@ describe('PricingSection', () => {
|
||||
'href',
|
||||
'/dashboard/sign-up?lang=en&theme=dark&plan=GROWTH',
|
||||
);
|
||||
expect(screen.getByRole('link', { name: 'Book a Pro demo' })).toHaveAttribute(
|
||||
'href',
|
||||
'/dashboard/sign-up?lang=en&theme=dark&plan=PRO',
|
||||
);
|
||||
expect(screen.getByRole('button', { name: 'Talk to sales' })).toHaveAttribute(
|
||||
'data-demo-source',
|
||||
'pricing',
|
||||
|
||||
@@ -11,8 +11,8 @@ describe('homepage pricing configuration', () => {
|
||||
expect(pricingCommercialConfig.annualDiscountPercent).toBe(20);
|
||||
expect(pricingCommercialConfig.monthlyPrices.launch.small).toBe(149);
|
||||
expect(pricingCommercialConfig.monthlyPrices.growth.growing).toBe(299);
|
||||
expect(pricingCommercialConfig.monthlyPrices.pro.scale).toBe(399);
|
||||
expect(pricingCommercialConfig.monthlyPrices.enterprise.enterprise).toBeNull();
|
||||
expect(pricingCommercialConfig.recommendedPlanByFleetBand.scale).toBe('growth');
|
||||
});
|
||||
|
||||
it('maps every fleet band and plan from localized content', () => {
|
||||
@@ -24,6 +24,6 @@ describe('homepage pricing configuration', () => {
|
||||
'scale',
|
||||
'enterprise',
|
||||
]);
|
||||
expect(pricing.plans.map((plan) => plan.id)).toEqual(['launch', 'growth', 'pro', 'enterprise']);
|
||||
expect(pricing.plans.map((plan) => plan.id)).toEqual(['launch', 'growth', 'enterprise']);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user