feat[#77]refactor: standardize form validation errors across app #16
Annotations
4 errors
|
test
Process completed with exit code 1.
|
|
src/app/components/social/__tests__/SharedResourceLibrary.test.tsx > SharedResourceLibrary > calls onAdd for link resource:
src/app/components/social/__tests__/SharedResourceLibrary.test.tsx#L12
TestingLibraryElementError: Unable to find an element with the placeholder text of: Title
Ignored nodes: comments, script, style
<body>
<div>
<div
class="space-y-6"
>
<div
class="bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4"
>
<h4
class="font-medium text-gray-900 dark:text-gray-50 mb-3"
>
Add Resource
</h4>
<div
class="space-y-3"
>
<input
class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-purple-500"
placeholder="Resource title"
value=""
/>
<textarea
class="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-purple-500 resize-none"
placeholder="Description (optional)"
rows="2"
/>
<div
class="grid grid-cols-1 md:grid-cols-2 gap-3"
>
<input
class="px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-purple-500"
placeholder="https://... (for links)"
value=""
/>
<label
class="inline-flex items-center justify-center gap-2 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md cursor-pointer text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors"
>
<svg
class="lucide lucide-upload"
fill="none"
height="16"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"
/>
<polyline
points="17 8 12 3 7 8"
/>
<line
x1="12"
x2="12"
y1="3"
y2="15"
/>
</svg>
<span>
Upload file
</span>
<input
class="hidden"
type="file"
/>
</label>
</div>
<div
class="flex justify-end"
>
<button
class="px-4 py-2 bg-purple-600 hover:bg-purple-700 disabled:bg-gray-300 disabled:cursor-not-allowed text-white rounded-md text-sm font-medium transition-colors"
disabled=""
>
Add Resource
</button>
</div>
</div>
</div>
<div
class="flex flex-col sm:flex-row gap-3"
>
<div
class="relative flex-1"
>
<svg
class="lucide lucide-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"
fill="none"
height="18"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
viewBox="0 0 24 24"
width="18"
xmlns="http://www.w3.org/2000/svg"
>
<circle
cx="11"
cy="11"
r="8"
/>
<path
d="m21 21-4.3-4.3"
/>
</svg>
<input
class="w-full pl-10 pr-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-50 focus:outline-none focus:ring-2 focus:ring-purple-500"
placeholder="Search resource
|
|
src/app/components/social/__tests__/GroupDiscussionThread.test.tsx > GroupDiscussionThread > posts content via onPost:
src/app/components/social/GroupDiscussionThread.tsx#L42
TypeError: messagesEndRef.current?.scrollIntoView is not a function
❯ src/app/components/social/GroupDiscussionThread.tsx:42:29
❯ commitHookEffectListMount node_modules/react-dom/cjs/react-dom.development.js:23189:26
❯ commitPassiveMountOnFiber node_modules/react-dom/cjs/react-dom.development.js:24970:11
❯ commitPassiveMountEffects_complete node_modules/react-dom/cjs/react-dom.development.js:24930:9
❯ commitPassiveMountEffects_begin node_modules/react-dom/cjs/react-dom.development.js:24917:7
❯ commitPassiveMountEffects node_modules/react-dom/cjs/react-dom.development.js:24905:3
❯ flushPassiveEffectsImpl node_modules/react-dom/cjs/react-dom.development.js:27078:3
❯ flushPassiveEffects node_modules/react-dom/cjs/react-dom.development.js:27023:14
❯ node_modules/react-dom/cjs/react-dom.development.js:26808:9
❯ flushActQueue node_modules/react/cjs/react.development.js:2667:24
|
|
src/app/hooks/__tests__/useStudyGroups.test.tsx > useStudyGroups > posts messages and builds leaderboard from challenges:
src/app/hooks/__tests__/useStudyGroups.test.tsx#L69
AssertionError: expected 'Alice' to be 'Bob' // Object.is equality
Expected: "Bob"
Received: "Alice"
❯ src/app/hooks/__tests__/useStudyGroups.test.tsx:69:28
|