feat: add infrastructure flow and official iconography

This commit is contained in:
2026-09-02 16:40:46 +03:00
parent 8c17af22a0
commit 132a7cd344
14 changed files with 520 additions and 55 deletions

View File

@@ -13,6 +13,8 @@ const infrastructure: InfrastructureCaseStudy = {
bands: [
{ id: 'ingress-tls', title: 'Ingress and TLS', summary: 'Managed encrypted ingress.' },
{ id: 'identity-access', title: 'Identity and access', summary: 'Protected service access.' },
{ id: 'service-lifecycle', title: 'Service lifecycle', summary: 'Managed container lifecycle.' },
{ id: 'operations', title: 'Operations', summary: 'Routine maintenance and investigation.' },
],
};
@@ -40,16 +42,29 @@ const publicProject: PublicProject = {
describe('semantic section components', () => {
it('gives the infrastructure graphic an accessible name, description, caption, and visible text equivalent', () => {
const wrapper = mount(InfrastructureDiagram, { props: { infrastructure } });
const svg = wrapper.get('svg');
const flow = wrapper.get('[data-testid="infrastructure-flow"]');
expect(svg.attributes('role')).toBe('img');
expect(svg.attributes('aria-labelledby')).toContain('safe-infrastructure-diagram-title');
expect(svg.attributes('aria-describedby')).toContain('safe-infrastructure-diagram-description');
expect(flow.attributes('role')).toBe('img');
expect(flow.attributes('aria-labelledby')).toBe('safe-infrastructure-diagram-title');
expect(flow.attributes('aria-describedby')).toBe('safe-infrastructure-diagram-description');
expect(wrapper.get('figcaption').text()).toContain('Secure self-hosted platform and lifecycle');
expect(wrapper.get('[data-testid="infrastructure-text-equivalent"]').text()).toContain('Ingress and TLS');
expect(wrapper.get('[data-testid="infrastructure-text-equivalent"]').text()).toContain('Identity and access');
});
it('renders the real infrastructure route with explicit trust boundaries and operational support', () => {
const wrapper = mount(InfrastructureDiagram, { props: { infrastructure } });
const flow = wrapper.get('[data-testid="infrastructure-flow"]');
expect(flow.findAll('[data-infrastructure-node]').map((node) => node.attributes('data-infrastructure-node'))).toEqual([
'visitor', 'nginx-tls', 'authentication', 'containerized-services', 'operations',
]);
expect(flow.findAll('[data-trust-boundary]').map((boundary) => boundary.text())).toEqual([
'Public edge', 'Access boundary', 'Service boundary',
]);
expect(flow.text()).toContain('fail2ban guard');
});
it('does not turn private project content into a link container', () => {
const wrapper = mount(ProjectCaseStudy, { props: { project: privateProject, priority: 'primary' } });