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

This commit is contained in:
root
2026-08-08 01:16:44 -04:00
parent 5429f582f5
commit e51c44f486
12 changed files with 30 additions and 86 deletions
@@ -39,11 +39,11 @@ describe('PricingSection', () => {
await user.click(screen.getByLabelText('76150 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',