Add CI/CD pipeline, feedback modal, Atlas qualys_id fallback, and health endpoint
- Rewrite .gitlab-ci.yml with proper stages, blocking tests, staging environment on dev box, and SSH-based production deploy to 71.85.90.6 - Add POST /api/health endpoint for pipeline verification - Add POST /atlas/hosts/:hostId/refresh-cache for Atlas cache staleness - AtlasSlideOutPanel: auto-resolve qualys_id from Atlas vulnerabilities, prefer qualys_id over active_host_findings_id, retry on failure - Add FeedbackModal component with bug report button in header and feature request in UserMenu, creates GitLab issues via /api/feedback - Fix all frontend test failures (ESM transforms, TextDecoder polyfill, fast-check resolution, App.test.js boilerplate replacement) - Fix root package.json test script to run jest - Add deploy/ directory with staging systemd service and setup script
This commit is contained in:
@@ -2,12 +2,22 @@
|
||||
|
||||
import fc from 'fast-check';
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Polyfill TextDecoder/TextEncoder for jsdom environment (Express 5 dependency)
|
||||
// ---------------------------------------------------------------------------
|
||||
if (typeof globalThis.TextDecoder === 'undefined') {
|
||||
const { TextDecoder, TextEncoder } = require('util');
|
||||
globalThis.TextDecoder = TextDecoder;
|
||||
globalThis.TextEncoder = TextEncoder;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Mock backend dependencies so we can import the pure function
|
||||
// without pulling in Express, SQLite, etc.
|
||||
// ---------------------------------------------------------------------------
|
||||
jest.mock('express', () => ({ Router: jest.fn(() => ({ get: jest.fn(), post: jest.fn(), put: jest.fn(), patch: jest.fn() })) }));
|
||||
jest.mock('../../../../../backend/middleware/auth', () => ({ requireGroup: jest.fn() }), { virtual: true });
|
||||
jest.mock('../../../../../backend/db', () => ({}), { virtual: true });
|
||||
jest.mock('../../../../../backend/middleware/auth', () => ({ requireAuth: jest.fn(() => (req, res, next) => next()), requireGroup: jest.fn(() => (req, res, next) => next()) }), { virtual: true });
|
||||
jest.mock('../../../../../backend/helpers/auditLog', () => jest.fn(), { virtual: true });
|
||||
jest.mock('../../../../../backend/helpers/atlasApi', () => ({
|
||||
isConfigured: false,
|
||||
|
||||
Reference in New Issue
Block a user