stuff
Some checks are pending
Deploy Admin Panel / Deploy Admin Panel (push) Waiting to run
Deploy Admin Panel / Admin Panel Verification (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions

This commit is contained in:
Dmitry 2025-12-19 01:33:36 +03:00
parent 9dd7662b3d
commit 910986fadc
4 changed files with 26 additions and 6 deletions

View file

@ -46,6 +46,9 @@
- **Admin Tests: Color Picker + Pack Color Sync**: Added palette-based test color selection
- Test editor now uses the same palette picker as packs
- When selecting/changing a pack in test editor, test color auto-updates to the pack color
- **Admin Bulk Card Editor: Fix pack mapping typing**: Fixed TypeScript build error in pack list loading
- Removed unsafe `Record<string, unknown>` cast for `CardPackPreviewDto`
- Added unit test and JSDOM polyfills for Radix Select in tests (`mnemo_cards_admin`)
- **Service Reliability**: Enhanced service management and monitoring
- Port conflict detection and resolution

View file

@ -52,6 +52,7 @@
- Frontend components: Target 70% coverage
- Common libraries: Target 90% coverage
- ✅ Added unit test for version display on auth page
- ✅ Admin: fixed `BulkCardEditor` pack loading TypeScript error (TS2352) + unit test; added JSDOM polyfills for Radix Select
- ✅ Web: CardViewer navigation controls are constrained under the card on wide screens (widget test added)
- ✅ Web: Pack details "Перемешать" button has no active (pressed) state (widget test updated)
- ✅ **User Telegram Field Tests**: Added comprehensive unit tests for telegram field

View file

@ -75,12 +75,8 @@ export function BulkCardEditor({ images, defaultPackId, onComplete, onCancel }:
try {
if (response && response.items && Array.isArray(response.items)) {
const packs = response.items.map((pack) => {
const obj: Record<string, unknown> =
pack && typeof pack === 'object'
? (pack as Record<string, unknown>)
: {}
const id = String(obj.id ?? '')
const title = String(obj.title ?? obj.id ?? '')
const id = String(pack.id)
const title = pack.title?.trim() ? String(pack.title) : id
return { id, title }
})
setPacksData(packs)

View file

@ -1 +1,21 @@
import '@testing-library/jest-dom'
// Radix UI uses Pointer Events APIs that are not fully implemented in JSDOM.
// Polyfill the minimal surface to prevent runtime errors in tests.
if (!Element.prototype.hasPointerCapture) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
Element.prototype.hasPointerCapture = () => false
}
if (!Element.prototype.setPointerCapture) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
Element.prototype.setPointerCapture = () => {}
}
if (!Element.prototype.releasePointerCapture) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
Element.prototype.releasePointerCapture = () => {}
}
if (!HTMLElement.prototype.scrollIntoView) {
// eslint-disable-next-line @typescript-eslint/no-empty-function
HTMLElement.prototype.scrollIntoView = () => {}
}