diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/upload/Examples.tsx b/packages/dnb-design-system-portal/src/docs/uilib/components/upload/Examples.tsx index 0af781bad7a..607ed271d2a 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/upload/Examples.tsx +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/upload/Examples.tsx @@ -304,7 +304,7 @@ export const UploadFileMaxSizeBasedOnFileTypeDisabled = () => ( ) export const UploadDisabledFileMaxSize = () => ( - + - - + ### Upload without title and text diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts b/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts index 256ede9c8d6..1caa1108bd6 100644 --- a/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts +++ b/packages/dnb-eufemia/src/components/upload/__tests__/Upload.screenshot.test.ts @@ -43,6 +43,13 @@ describe.each(['ui', 'sbanken'])('Upload for %s', (themeName) => { expect(screenshot).toMatchImageSnapshot() }) + it('have to match disabled file max size', async () => { + const screenshot = await makeScreenshot({ + selector: '[data-visual-test="upload-disabled-file-max-size"]', + }) + expect(screenshot).toMatchImageSnapshot() + }) + it('have to match when not providing title and text', async () => { const screenshot = await makeScreenshot({ selector: '[data-visual-test="upload-no-title-no-text"]', diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-sbanken-have-to-match-disabled-file-max-size.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-sbanken-have-to-match-disabled-file-max-size.snap.png new file mode 100644 index 00000000000..dba47524de2 Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-sbanken-have-to-match-disabled-file-max-size.snap.png differ diff --git a/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-ui-have-to-match-disabled-file-max-size.snap.png b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-ui-have-to-match-disabled-file-max-size.snap.png new file mode 100644 index 00000000000..40c35346f10 Binary files /dev/null and b/packages/dnb-eufemia/src/components/upload/__tests__/__image_snapshots__/upload-for-ui-have-to-match-disabled-file-max-size.snap.png differ