mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-10 02:25:56 +00:00
test: fix 4 pre-existing frontend test failures blocking clean suite
recoveryDatePresentation: locale-independent date assertion (en-GB
systems produce '9 Mar 2026' not 'Mar 9, 2026')
quickstartCopyContract: update 'tools' to 'capabilities' matching
docs/AI.md copy change
AIIntelligence: update stale empty-state text to full current copy
SharedPrimitives.guardrails: align guardrail + registry with
d79640c41 migration of ProxmoxBackupsTable from FilterButtonGroup to
FilterSegmentedControl
Full suite: 659 files, 6719 tests, 0 failures.
This commit is contained in:
@@ -3046,8 +3046,7 @@
|
||||
{ "path": "src/components/Settings/GeneralSettingsPanel.tsx" },
|
||||
{ "path": "src/components/Settings/ResourcePicker.tsx" },
|
||||
{ "path": "src/components/Settings/ReportingPanel.tsx" },
|
||||
{ "path": "src/features/patrol/PatrolIntelligenceHeader.tsx" },
|
||||
{ "path": "src/features/proxmox/ProxmoxBackupsTable.tsx" }
|
||||
{ "path": "src/features/patrol/PatrolIntelligenceHeader.tsx" }
|
||||
],
|
||||
"forbiddenPatterns": [
|
||||
{
|
||||
|
||||
@@ -407,7 +407,6 @@ describe('shared primitive guardrails', () => {
|
||||
'src/components/Settings/ResourcePicker.tsx',
|
||||
'src/components/Settings/ReportingPanel.tsx',
|
||||
'src/features/patrol/PatrolIntelligenceHeader.tsx',
|
||||
'src/features/proxmox/ProxmoxBackupsTable.tsx',
|
||||
]);
|
||||
expect(registeredRule?.forbiddenPatterns).toEqual(
|
||||
expect.arrayContaining([
|
||||
@@ -500,9 +499,8 @@ describe('shared primitive guardrails', () => {
|
||||
expect(patrolIntelligenceHeaderSource).not.toContain(
|
||||
'flex-1 py-1.5 px-2 text-xs font-semibold rounded-md transition-all duration-200',
|
||||
);
|
||||
expect(proxmoxBackupsTableSource).toContain('FilterButtonGroup');
|
||||
expect(proxmoxBackupsTableSource).toContain('variant="segmented"');
|
||||
expect(proxmoxBackupsTableSource).toContain('BACKUP_VIEW_OPTIONS');
|
||||
expect(proxmoxBackupsTableSource).toContain('FilterSegmentedControl');
|
||||
expect(proxmoxBackupsTableSource).not.toContain('FilterButtonGroup');
|
||||
expect(proxmoxBackupsTableSource).not.toContain('const viewButtonClass');
|
||||
expect(proxmoxBackupsTableSource).not.toContain(
|
||||
'inline-flex items-center gap-1 rounded-md border border-border bg-surface p-1',
|
||||
|
||||
@@ -672,7 +672,7 @@ describe('AIIntelligence entitlement gating', () => {
|
||||
expect(operationsLoopAnchor?.parentElement).toBe(patrolControlAnchor);
|
||||
expect(screen.queryByTestId('patrol-current-work')).not.toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByText('Patrol lists current issues here after each check.'),
|
||||
screen.getByText('Patrol lists current issues here after each check. History keeps past outcomes.'),
|
||||
).toBeInTheDocument();
|
||||
expect(
|
||||
screen.queryByText('Issues Patrol found. Infrastructure stays unchanged.'),
|
||||
|
||||
@@ -62,7 +62,7 @@ describe('quickstart copy contract', () => {
|
||||
const ai = readRepoFile('docs/AI.md');
|
||||
|
||||
expect(ai).toContain('the configured LLM owns diagnosis');
|
||||
expect(ai).toContain('Pulse supplies context, tools, safety gates, approval state, and audit trails');
|
||||
expect(ai).toContain('Pulse supplies context, capabilities, safety gates, approval state, and audit trails');
|
||||
expect(ai).toContain('Pulse does not convert them into Pulse-authored findings');
|
||||
|
||||
expect(ai).not.toContain("learns what's normal");
|
||||
|
||||
@@ -28,7 +28,10 @@ describe('recoveryDatePresentation', () => {
|
||||
const key = '2026-03-09';
|
||||
expect(getRecoveryPrettyDateLabel(key)).toContain('Mar');
|
||||
expect(getRecoveryFullDateLabel(key)).toContain('2026');
|
||||
expect(getRecoveryFilterDateLabel(key)).toBe('Mar 9, 2026');
|
||||
const filterLabel = getRecoveryFilterDateLabel(key);
|
||||
expect(filterLabel).toContain('Mar');
|
||||
expect(filterLabel).toContain('9');
|
||||
expect(filterLabel).toContain('2026');
|
||||
expect(getRecoveryCompactAxisLabel(key, 30)).toBe('9');
|
||||
expect(getRecoveryCompactAxisLabel('2026-04-01', 30)).toBe('4/1');
|
||||
expect(getRecoveryCompactAxisLabel(key, 90)).toBe('3/9');
|
||||
|
||||
Reference in New Issue
Block a user