Skip to content

feat: use @stacklok/ui-kit #150

feat: use @stacklok/ui-kit

feat: use @stacklok/ui-kit #150

Re-run triggered January 16, 2025 09:17
Status Failure
Total duration 52s
Artifacts

on-pr.yml

on: pull_request
Security Checks  /  Trivy
7s
Security Checks / Trivy
Security Checks  /  NPM Audit
10s
Security Checks / NPM Audit
Static Checks  /  ESLint Check
12s
Static Checks / ESLint Check
Static Checks  /  TS Types Check
19s
Static Checks / TS Types Check
Static Checks  /  Build App Check
32s
Static Checks / Build App Check
Unit Tests  /  Vitest
38s
Unit Tests / Vitest
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 11 warnings
src/components/__tests__/Chat.test.tsx > Chat > should render secret issue chat: src/components/CopyToClipboard.tsx#L363
Error: [vitest] No "TooltipTrigger" export is defined on the "@stacklok/ui-kit" mock. Did you forget to return it from "vi.mock"? If you need to partially mock a module, you can use "importOriginal" helper inside: vi.mock(import("@stacklok/ui-kit"), async (importOriginal) => { const actual = await importOriginal() return { ...actual, // your mocked methods } }) ❯ CopyToClipboard src/components/CopyToClipboard.tsx:363:81 ❯ Object.react-stack-bottom-frame node_modules/react-dom/cjs/react-dom-client.development.js:22428:20 ❯ renderWithHooks node_modules/react-dom/cjs/react-dom-client.development.js:5757:22 ❯ updateFunctionComponent node_modules/react-dom/cjs/react-dom-client.development.js:8018:19 ❯ beginWork node_modules/react-dom/cjs/react-dom-client.development.js:9683:18 ❯ runWithFiberInDEV node_modules/react-dom/cjs/react-dom-client.development.js:543:16 ❯ performUnitOfWork node_modules/react-dom/cjs/react-dom-client.development.js:15052:22 ❯ workLoopSync node_modules/react-dom/cjs/react-dom-client.development.js:14870:41
src/components/__tests__/CopyToClipboard.test.tsx > CopyToClipboard > renders the button with the correct icon: src/components/__tests__/CopyToClipboard.test.tsx#L11
TestingLibraryElementError: Unable to find an element with the role "img" Here are the available roles: button: Name "": <button class="outline outline-0 outline-offset-2 outline-brand-700 forced-colors:outline-[Highlight] inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-sm border px-4 py-2 text-center text-base font-medium [&_svg]:size-4 [&_svg]:shrink-0 border-transparent bg-transparent hover:bg-gray-100 pressed:bg-gray-200 disabled:bg-transparent disabled:text-disabled focus-within:&:has([data-focus-visible]):outline-2 invalid:!outline-red-700 focus-visible:outline-2 size-7 text-secondary" data-rac="" id="react-aria-:r1:" type="button" /> -------------------------------------------------- Ignored nodes: comments, script, style <body> <div> <button class="outline outline-0 outline-offset-2 outline-brand-700 forced-colors:outline-[Highlight] inline-flex shrink-0 cursor-pointer items-center justify-center gap-1 rounded-sm border px-4 py-2 text-center text-base font-medium [&_svg]:size-4 [&_svg]:shrink-0 border-transparent bg-transparent hover:bg-gray-100 pressed:bg-gray-200 disabled:bg-transparent disabled:text-disabled focus-within:&:has([data-focus-visible]):outline-2 invalid:!outline-red-700 focus-visible:outline-2 size-7 text-secondary" data-rac="" id="react-aria-:r1:" type="button" > <svg class="lucide lucide-clipboard-copy" fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" > <rect height="4" rx="1" ry="1" width="8" x="8" y="2" /> <path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2" /> <path d="M16 4h2a2 2 0 0 1 2 2v4" /> <path d="M21 14H11" /> <path d="m15 10-4 4 4 4" /> </svg> </button> </div> </body> ❯ Object.getElementError node_modules/@testing-library/dom/dist/config.js:37:19 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:76:38 ❯ node_modules/@testing-library/dom/dist/query-helpers.js:52:17 ❯ getByRole node_modules/@testing-library/dom/dist/query-helpers.js:95:19 ❯ src/components/__tests__/CopyToClipboard.test.tsx:11:19
Unit Tests / Vitest
Process completed with exit code 1.
Security Checks / Trivy
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Security Checks / NPM Audit
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Static Checks / TS Types Check
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Static Checks / ESLint Check
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Static Checks / ESLint Check: src/components/ui/chat/chat-bubble.tsx#L192
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Static Checks / ESLint Check: src/components/ui/chat/chat-bubble.tsx#L193
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Static Checks / ESLint Check: src/components/ui/sidebar.tsx#L559
Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components
Static Checks / ESLint Check: src/lib/test-utils.tsx#L45
This rule can't verify that `export *` only exports components
Static Checks / Build App Check
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
Unit Tests / Vitest
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9. Please update your workflow to use either v3 or v4 of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-12-05-notice-of-upcoming-releases-and-breaking-changes-for-github-actions/#actions-cache-v1-v2-and-actions-toolkit-cache-package-closing-down
Unit Tests / Vitest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636