diff --git a/src/__tests__/__snapshots__/documenter.test.ts.snap b/src/__tests__/__snapshots__/documenter.test.ts.snap index 84fbb0b..463bc1b 100644 --- a/src/__tests__/__snapshots__/documenter.test.ts.snap +++ b/src/__tests__/__snapshots__/documenter.test.ts.snap @@ -41,107 +41,7 @@ If you set both \`iconName\` and \`initials\`, \`initials\` will take precedence "inlineType": { "name": "IconProps.Name", "type": "union", - "values": [ - "add-plus", - "anchor-link", - "angle-left-double", - "angle-left", - "angle-right-double", - "angle-right", - "angle-up", - "angle-down", - "arrow-left", - "arrow-right", - "audio-full", - "audio-half", - "audio-off", - "bug", - "call", - "calendar", - "caret-down-filled", - "caret-down", - "caret-left-filled", - "caret-right-filled", - "caret-up-filled", - "caret-up", - "check", - "contact", - "close", - "copy", - "delete-marker", - "download", - "drag-indicator", - "edit", - "ellipsis", - "envelope", - "expand", - "external", - "file-open", - "file", - "filter", - "flag", - "folder-open", - "folder", - "gen-ai", - "group-active", - "group", - "heart", - "heart-filled", - "insert-row", - "key", - "keyboard", - "lock-private", - "menu", - "microphone", - "microphone-off", - "multiscreen", - "notification", - "redo", - "refresh", - "remove", - "resize-area", - "script", - "search", - "security", - "settings", - "send", - "share", - "shrink", - "star-filled", - "star-half", - "star", - "status-in-progress", - "status-info", - "status-negative", - "status-pending", - "status-positive", - "status-stopped", - "status-warning", - "subtract-minus", - "suggestions", - "thumbs-down-filled", - "thumbs-down", - "thumbs-up-filled", - "thumbs-up", - "ticket", - "treeview-collapse", - "treeview-expand", - "undo", - "unlocked", - "upload-download", - "upload", - "user-profile-active", - "user-profile", - "video-off", - "video-on", - "video-unavailable", - "view-full", - "view-horizontal", - "view-vertical", - "zoom-in", - "zoom-out", - "zoom-to-fit", - ], + "values": "comes from @cloudscape-design/components", }, "name": "iconName", "optional": true, diff --git a/src/__tests__/documenter.test.ts b/src/__tests__/documenter.test.ts index 10502cd..70e0cb5 100644 --- a/src/__tests__/documenter.test.ts +++ b/src/__tests__/documenter.test.ts @@ -6,5 +6,11 @@ import { getAllComponents, requireComponentDefinition } from "./utils"; test.each(getAllComponents())(`definition for %s matches the snapshot`, (componentName: string) => { const definition = requireComponentDefinition(componentName); + + // overriding with a fake value so that when there are icon changes in components this test doesn't block it + const iconNameDefinition = definition.properties.filter(({ name }: { name: string }) => name === "iconName"); + if (iconNameDefinition && iconNameDefinition[0]) { + iconNameDefinition[0].inlineType.values = "comes from @cloudscape-design/components"; + } expect(definition).toMatchSnapshot(componentName); });