mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-23 20:25:56 +00:00
Remove weak ?raw contract-test assertions that pin nothing
Delete generic substring pins (toContain('Button') next to
ButtonLink/ActionIconButton siblings, 'import {', 'const {') that can
never fail independently, plus the not.toContain('Pro') booby trap on
DataHandlingPanel that the word Proxmox would spuriously trip. Where
sibling coverage was incomplete, replace with a specific pin instead:
ErrorBoundary 'Button' becomes the shared-Button import line, and the
proxmoxVersion 'unknown' pin becomes the actual sentinel check.
This commit is contained in:
@@ -36,7 +36,6 @@ describe('App architecture', () => {
|
||||
expect(appSource).toContain(
|
||||
"import { dialogStackHasBlockingDialog } from './components/shared/useDialogState';",
|
||||
);
|
||||
expect(appSource).toContain('import {');
|
||||
expect(appSource).toContain("} from '@/utils/appShellScrollRestoration';");
|
||||
expect(appSource).toContain('const runtime = useAppRuntimeState();');
|
||||
expect(appSource).toContain('pendingAppShellRestoreTop');
|
||||
|
||||
@@ -1643,7 +1643,6 @@ describe('ProLicensePanel', () => {
|
||||
expect(proLicensePlanSectionSource).toContain('currentPlanSummary.privateRuntimeAction');
|
||||
expect(proLicensePlanSectionSource).toContain('props.activationSuccessSummary');
|
||||
expect(proLicensePlanSectionSource).toContain('summary().actionUrl');
|
||||
expect(proLicensePlanSectionSource).toContain('Button');
|
||||
expect(proLicensePlanSectionSource).toContain('ButtonLink');
|
||||
expect(proLicensePlanSectionSource).toContain('variant="warning"');
|
||||
expect(proLicensePlanSectionSource).toContain('size="settingsActionXs"');
|
||||
|
||||
@@ -106,7 +106,6 @@ describe('settings architecture guardrails', () => {
|
||||
it('keeps Settings on the canonical page shell boundary', () => {
|
||||
expect(settingsSource).toContain("import { SettingsDialogs } from './SettingsDialogs';");
|
||||
expect(settingsSource).toContain("import { SettingsPageShell } from './SettingsPageShell';");
|
||||
expect(settingsSource).toContain('const {');
|
||||
expect(settingsSource).toContain('useSettingsNavigation({');
|
||||
expect(settingsSource).toContain('<SettingsPageShell');
|
||||
expect(settingsSource).toContain('<SettingsDialogs');
|
||||
@@ -304,7 +303,6 @@ describe('settings architecture guardrails', () => {
|
||||
expect(dataHandlingPanelSource).not.toContain('Start Trial');
|
||||
expect(dataHandlingPanelSource).not.toContain('higher limits');
|
||||
expect(dataHandlingPanelSource).not.toContain('Upgrade');
|
||||
expect(dataHandlingPanelSource).not.toContain('Pro');
|
||||
expect(auditWebhookPanelSource).toContain('getAuditWebhookFeatureGateCopy({');
|
||||
expect(auditWebhookPanelSource).toContain('paidRuntimeRequired: paidRuntimeRequired()');
|
||||
expect(auditWebhookPanelSource).not.toContain('Audit Webhooks (Pro)');
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('ErrorBoundary', () => {
|
||||
|
||||
it('keeps fallback chrome on shared primitives', () => {
|
||||
expect(errorBoundarySource).toContain('CalloutCard');
|
||||
expect(errorBoundarySource).toContain('Button');
|
||||
expect(errorBoundarySource).toContain("import { Button } from '@/components/shared/Button';");
|
||||
expect(errorBoundarySource).toContain('lucide-solid/icons/alert-triangle');
|
||||
expect(errorBoundarySource).not.toContain('<svg');
|
||||
expect(errorBoundarySource).not.toContain(
|
||||
|
||||
@@ -48,7 +48,6 @@ describe('UpdateConfirmationModal', () => {
|
||||
|
||||
it('keeps update confirmation chrome on shared primitives', () => {
|
||||
expect(updateConfirmationModalSource).toContain('CalloutCard');
|
||||
expect(updateConfirmationModalSource).toContain('Button');
|
||||
expect(updateConfirmationModalSource).toContain('ActionIconButton');
|
||||
expect(updateConfirmationModalSource).toContain('lucide-solid/icons/arrow-right');
|
||||
expect(updateConfirmationModalSource).not.toContain('<svg');
|
||||
|
||||
@@ -1275,7 +1275,7 @@ describe('shared primitive guardrails', () => {
|
||||
|
||||
expect(proxmoxVersionSource).toContain('formatProxmoxVersion');
|
||||
expect(proxmoxVersionSource).toContain('pve-manager\\/');
|
||||
expect(proxmoxVersionSource).toContain('unknown');
|
||||
expect(proxmoxVersionSource).toContain("version.toLowerCase() === 'unknown'");
|
||||
});
|
||||
|
||||
it('keeps product table scroll frames on the shared table shell', () => {
|
||||
@@ -3331,7 +3331,7 @@ describe('shared primitive guardrails', () => {
|
||||
}),
|
||||
]),
|
||||
);
|
||||
expect(errorBoundarySource).toContain('Button');
|
||||
expect(errorBoundarySource).toContain("import { Button } from '@/components/shared/Button';");
|
||||
expect(errorBoundarySource).not.toContain(
|
||||
'px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700',
|
||||
);
|
||||
@@ -3341,7 +3341,6 @@ describe('shared primitive guardrails', () => {
|
||||
expect(errorBoundarySource).not.toContain(
|
||||
'text-xs px-2 py-1 bg-red-600 text-white rounded hover:bg-red-700',
|
||||
);
|
||||
expect(updateConfirmationModalSource).toContain('Button');
|
||||
expect(updateConfirmationModalSource).toContain('ActionIconButton');
|
||||
expect(updateConfirmationModalSource).not.toContain(
|
||||
'px-4 py-2 text-sm font-medium text-base-content hover:bg-surface-hover rounded-md transition-colors',
|
||||
@@ -3349,7 +3348,6 @@ describe('shared primitive guardrails', () => {
|
||||
expect(updateConfirmationModalSource).not.toContain(
|
||||
'px-4 py-2 text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 rounded-md transition-colors',
|
||||
);
|
||||
expect(updateProgressModalSource).toContain('Button');
|
||||
expect(updateProgressModalSource).toContain('ActionIconButton');
|
||||
expect(updateProgressModalSource).not.toContain(
|
||||
'mt-2 px-3 py-1.5 text-xs font-medium text-white bg-blue-600 hover:bg-blue-700 rounded',
|
||||
@@ -4697,7 +4695,7 @@ describe('shared primitive guardrails', () => {
|
||||
},
|
||||
]);
|
||||
expect(errorBoundarySource).toContain('CalloutCard');
|
||||
expect(errorBoundarySource).toContain('Button');
|
||||
expect(errorBoundarySource).toContain("import { Button } from '@/components/shared/Button';");
|
||||
expect(errorBoundarySource).toContain('lucide-solid/icons/alert-triangle');
|
||||
expect(errorBoundarySource).not.toContain('<svg');
|
||||
expect(errorBoundarySource).not.toContain('bg-red-50 dark:bg-red-900 border border-red-200');
|
||||
@@ -4749,11 +4747,9 @@ describe('shared primitive guardrails', () => {
|
||||
]);
|
||||
|
||||
expect(updateConfirmationModalSource).toContain('CalloutCard');
|
||||
expect(updateConfirmationModalSource).toContain('Button');
|
||||
expect(updateConfirmationModalSource).toContain('ActionIconButton');
|
||||
expect(updateConfirmationModalSource).toContain('lucide-solid/icons/arrow-right');
|
||||
expect(updateProgressModalSource).toContain('CalloutCard');
|
||||
expect(updateProgressModalSource).toContain('Button');
|
||||
expect(updateProgressModalSource).toContain('ActionIconButton');
|
||||
expect(updateProgressModalSource).toContain('LoadingSpinner');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user