mirror of
https://github.com/supabase/supabase.git
synced 2026-12-03 23:18:57 +00:00
If a user selects the "Performance" category on the support ticket form and their project ref maps to a Nano project on a paid plan, show an inline tip in the form itself, before submission, pointing to a troubleshooting guide covering the free Micro upgrade and the usual perf debugging steps (query optimization, advisors, etc.). <img width="523" height="327" alt="Screenshot 2026-11-23 at 6 56 05 PM" src="https://github.com/user-attachments/assets/b0b69866-3e34-443a-8405-23279e07e25c" />
23 lines
951 B
TypeScript
23 lines
951 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
|
|
import { isEligibleForFreeMicroUpgrade } from './FreeMicroUpgradeSuggestion.utils'
|
|
|
|
describe('isEligibleForFreeMicroUpgrade', () => {
|
|
it.each(['pro', 'team', 'enterprise'] as const)('is eligible for nano on %s', (planId) => {
|
|
expect(isEligibleForFreeMicroUpgrade({ planId, computeSize: 'nano' })).toBe(true)
|
|
})
|
|
|
|
it('is not eligible on the free plan', () => {
|
|
expect(isEligibleForFreeMicroUpgrade({ planId: 'free', computeSize: 'nano' })).toBe(false)
|
|
})
|
|
|
|
it('is not eligible on larger compute sizes', () => {
|
|
expect(isEligibleForFreeMicroUpgrade({ planId: 'pro', computeSize: 'micro' })).toBe(false)
|
|
})
|
|
|
|
it('is not eligible while the plan or compute size is unknown', () => {
|
|
expect(isEligibleForFreeMicroUpgrade({ planId: undefined, computeSize: 'nano' })).toBe(false)
|
|
expect(isEligibleForFreeMicroUpgrade({ planId: 'pro', computeSize: undefined })).toBe(false)
|
|
})
|
|
})
|