mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-09 10:57:04 +00:00
Restore change reasons in recent feed
This commit is contained in:
parent
716e9e0da9
commit
2f36d52e58
4 changed files with 7 additions and 0 deletions
|
|
@ -112,6 +112,9 @@ export const ResourceChangeSummary: Component<ResourceChangeSummaryProps> = (pro
|
|||
<Show when={change.actor}>
|
||||
<p class={`mt-1 ${itemText()} text-muted`}>By {change.actor}</p>
|
||||
</Show>
|
||||
<Show when={change.reason}>
|
||||
<p class={`mt-1 ${itemText()} text-muted`}>{change.reason}</p>
|
||||
</Show>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-wrap items-center gap-1.5">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ describe('ResourceChangeSummary', () => {
|
|||
kind: 'restart',
|
||||
from: 'running',
|
||||
to: 'restarting',
|
||||
reason: 'Restart after maintenance',
|
||||
observedAt: '2026-03-18T12:00:00Z',
|
||||
sourceType: 'platform_event',
|
||||
sourceAdapter: 'docker_adapter',
|
||||
|
|
@ -51,6 +52,7 @@ describe('ResourceChangeSummary', () => {
|
|||
screen.getByRole('link', { name: 'Open related resource vm-200 in Infrastructure' }),
|
||||
).toHaveAttribute('href', '/infrastructure?resource=vm-200');
|
||||
expect(screen.getByText('By agent:ops-helper')).toBeInTheDocument();
|
||||
expect(screen.getByText('Restart after maintenance')).toBeInTheDocument();
|
||||
expect(screen.queryByRole('link', { name: 'Open resource storage-1 in Infrastructure' })).toBeNull();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -354,6 +354,7 @@ describe('ResourceDetailDrawer runtime and identity cards', () => {
|
|||
expect(getByText('Latest canonical change')).toBeInTheDocument();
|
||||
const latestChangeItem = getByText('Config update: Updated canonical config').closest('li');
|
||||
expect(latestChangeItem).not.toBeNull();
|
||||
expect(getByText('Updated canonical config')).toBeInTheDocument();
|
||||
expect(latestChangeItem).toHaveTextContent(/just now|m ago|h ago|d ago/);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -589,6 +589,7 @@ describe('AIIntelligence entitlement gating', () => {
|
|||
expect(screen.getByText(/Health A · 91\/100/)).toBeInTheDocument();
|
||||
expect(screen.getByText(/Recent changes 1/)).toBeInTheDocument();
|
||||
expect(screen.getByText('Config update: Updated guest configuration')).toBeInTheDocument();
|
||||
expect(screen.getByText('Updated guest configuration')).toBeInTheDocument();
|
||||
expect(
|
||||
screen.getByRole('link', { name: 'Open resource vm-100 in Infrastructure' }),
|
||||
).toHaveAttribute('href', '/infrastructure?resource=vm-100');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue