diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/Examples.tsx index 914d6ef2cdf..e6a4c0ed49b 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/Examples.tsx @@ -128,3 +128,13 @@ export const WithinOtherComponents = () => { ) } + +export const WithinALabel = () => { + return ( + + + + + + ) +} diff --git a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/demos.mdx b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/demos.mdx index b1d09b1264f..e7cbf6c79b1 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/demos.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/extensions/forms/Form/SubmitIndicator/demos.mdx @@ -29,3 +29,7 @@ Make a change in the input field. ### Used in other components + +### With a label + + diff --git a/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/SubmitIndicator.screenshot.test.ts b/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/SubmitIndicator.screenshot.test.ts new file mode 100644 index 00000000000..234cbfc656e --- /dev/null +++ b/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/SubmitIndicator.screenshot.test.ts @@ -0,0 +1,17 @@ +import { + makeScreenshot, + setupPageScreenshot, +} from '../../../../../core/jest/jestSetupScreenshots' + +describe('Form.SubmitIndicator', () => { + setupPageScreenshot({ + url: '/uilib/extensions/forms/Form/SubmitIndicator/demos', + }) + + it('have to match submit-indicator-with-label', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="submit-indicator-with-label"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) +}) diff --git a/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/__image_snapshots__/formsubmitindicator-have-to-match-submit-indicator-with-label.snap.png b/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/__image_snapshots__/formsubmitindicator-have-to-match-submit-indicator-with-label.snap.png new file mode 100644 index 00000000000..942d5722261 Binary files /dev/null and b/packages/dnb-eufemia/src/extensions/forms/Form/SubmitIndicator/__tests__/__image_snapshots__/formsubmitindicator-have-to-match-submit-indicator-with-label.snap.png differ