sif-soknad-vedlegg-step

Manage file attachments in v2 Soknad steps with hydration and MSW tests.

2|Updated Jun 3, 2022
One-click install
npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-soknad-vedlegg-step
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sif-soknad-vedlegg-step
Source: https://github.com/navikt/sif-brukerdialog/tree/main/.github/skills/sif-soknad-vedlegg-step
Command: npx skills add https://github.com/navikt/sif-brukerdialog --skill sif-soknad-vedlegg-step

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a complete implementation for a file-attachment step in a v2 Soknad app, including VedleggPanel, PersistedVedlegg, hydration logic, and MSW-based testing handlers.

Core Features & Use Cases

  • Attach, upload, and delete files within a step.
  • Hydrate persisted attachments into the UI and map back to Soknadsdata.
  • Support link rendering in the summary and end-to-end tests with MSW.

Quick Start

Set up the attachment step in your step and verify upload, hydration, and summary linking.

Frequently Asked Questions about sif-soknad-vedlegg-step

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I upload and manage file attachments within a Soknad step?

To upload and manage file attachments within a Soknad step, you use a VedleggPanel to attach, upload, and delete files, then map the uploaded files to Soknadsdata using backend URLs for downstream use.

How does hydration work for persisted attachments in a v2 app?

Hydration for persisted attachments works by loading previously saved files into the UI and mapping them back to Soknadsdata, ensuring that document links render correctly in the summary view of your v2 app step.

Can I test file upload behavior in a Soknad step using MSW?

Yes, you can test file upload behavior using MSW-based testing handlers, which validate the upload, hydration, and summary linking logic of your attachment step end-to-end.

What is the best way to persist uploaded files to backend URLs in a Soknad step?

The best way to persist uploaded files is to map them to Soknadsdata using backend PersistedVedlegg URLs, which allows the attachments to be stored and hydrated into the UI for downstream processing.

Do I need a v2 app step to render attachments as links in the summary?

Yes, this attachment implementation applies specifically to v2-app steps where users attach documents, view the persisted attachments as links, and ensure proper hydration back into the Soknadsdata structure.