You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Add environmentManager to test mocks and fix integration tests
✅ All unit tests passing (677/677)
✅ Integration tests improved (37/47 passing)
Changes:
- Added environmentManager mock to GlobalChoicesService tests
- Added environmentManager mock to DeploymentService tests
- Updated test assertions to expect config as second parameter
- Fixed port selection logic for test environments (PORT=0 support)
- Added environmentId query parameter to global-choices-list integration test
Test Fixes:
- GlobalChoicesService: Mock environmentManager with getEnvironmentConfig()
- DeploymentService: Mock environmentManager with proper config values
- Integration tests: Fixed random port allocation bug in server.js
- Multi-environment: Updated API test to include required environmentId param
Production code changes (bug fixes only):
- server.js: Fixed PORT=0 handling for integration tests
- api-endpoints.test.js: Added environmentId to global-choices-list test
No production service code modified - all changes are test-related.
### 6. Deployment History Feature (`src/frontend/src/components/deployment-history/`)
406
406
407
-
**Purpose**: Comprehensive deployment tracking and management system that provides users with detailed visibility into their Dataverse solution deployments.
407
+
**Purpose**: Comprehensive deployment tracking and management system that provides users with detailed visibility into their Dataverse solution deployments**across multiple environments**.
408
408
409
409
**Technology Stack**:
410
410
-**React 18** with TypeScript and Fluent UI v9 components
411
411
-**Modal Dialog Interface** with expandable accordions for deployment details
412
+
-**Multi-Environment Support** with environment filtering and colored indicators
412
413
-**API Integration** with backend deployment history service
413
414
-**Power Platform Integration** with direct solution links
414
415
415
416
**Key Features**:
417
+
-**Multi-Environment Support**: Filter and view deployments across multiple Dataverse environments
418
+
-**Environment Selector**: Dropdown with colored environment indicators (dev, test, prod)
419
+
-**Environment-Specific Filtering**: View deployments for individual environments or all environments combined
420
+
-**Colored Environment Badges**: Visual indicators showing which environment each deployment belongs to
416
421
-**Complete Deployment Tracking**: Records all deployments with timestamps, status, and detailed entity information
417
422
-**Solution Links**: Direct links to Power Platform solutions with dynamic environment ID configuration
418
423
-**Deployment Details**: Expandable accordions showing deployed entities, columns, and relationships
419
424
-**Status Visualization**: Clear success/failure indicators with detailed error information
420
425
-**Table Styling**: Alternating row backgrounds and professional column formatting
421
-
-**Environment Integration**: Configurable Power Platform environment ID for accurate solution URLs
422
426
423
-
**Component Architecture**:
427
+
**Multi-Environment Architecture**:
424
428
```typescript
425
-
// Main deployment history modal component
429
+
// Main deployment history modal component with environment support
-**DeploymentController**: Handles deployment history API endpoints
449
-
-**DeploymentHistoryService**: Manages deployment data persistence and retrieval
450
-
-**Configuration API**: Provides Power Platform environment ID for solution links
451
-
-**File-based Storage**: JSON files for deployment tracking with an environment-specific organization
491
+
**Backend Multi-Environment Support**:
492
+
-**Environment-Specific Storage**: Deployment history stored in separate JSON files per environment
493
+
-**Filtered Queries**: API endpoint supports `?environmentId=xxx` query parameter
494
+
-**Environment Metadata**: Each deployment record includes `environmentId`, `environmentName`, and `environmentUrl`
495
+
-**Merged View**: "All Environments" option combines deployments from all environment index files
496
+
497
+
**API Endpoints**:
498
+
```
499
+
GET /api/environments # List all configured environments
500
+
GET /api/deployments # Get all deployments (merged from all environments)
501
+
GET /api/deployments?environmentId={id} # Get deployments for specific environment
502
+
GET /api/config # Get Power Platform environment configuration
503
+
```
452
504
453
-
**Configuration Management**:
454
-
-**Environment ID Setup**: Configured via PowerShell scripts during Azure deployment
455
-
-**API Configuration**: Backend `/api/config` endpoint provides frontend with environment settings
456
-
-**Dynamic Solution Links**: Real-time URL generation based on the configured environment
457
-
-**Security Compliance**: No hardcoded environment-specific values in source code
505
+
**Environment Color Coding**:
506
+
-**Development**: Blue badges and indicators
507
+
-**Test**: Purple badges and indicators
508
+
-**Production**: Green badges and indicators
509
+
-**Other**: Gray badges and indicators
458
510
459
511
**User Experience Features**:
512
+
-**Environment Filtering**: Quick switching between environments with visual feedback
513
+
-**Colored Indicators**: Instant visual recognition of deployment environment
460
514
-**Professional Table Design**: Alternating row backgrounds and bold column headers
461
515
-**Expandable Details**: Deployment and entity accordions for comprehensive information viewing
462
516
-**Direct Navigation**: Solution links open Power Platform in new tabs for seamless workflow
463
517
-**Responsive Design**: Modal scales appropriately for different screen sizes
464
518
-**Loading States**: Proper loading indicators during data fetching
465
519
466
-
This deployment history system provides enterprise-grade deployment tracking with seamless Power Platform integration, enabling users to effectively manage and monitor their Dataverse solution deployments.
520
+
This deployment history system provides enterprise-grade deployment tracking with **multi-environment support** and seamless Power Platform integration, enabling users to effectively manage and monitor their Dataverse solution deployments across development, test, and production environments.
467
521
468
522
## FileUploadStep Modular Architecture
469
523
@@ -1295,63 +1349,156 @@ POST /api/upload
1295
1349
1296
1350
### Rollback System
1297
1351
1298
-
**Purpose**: Comprehensive rollback functionality that allows users to safely reverse Dataverse deployments with step-by-step progress tracking matching the deployment experience.
1352
+
**Purpose**: Comprehensive rollback functionality that allows users to safely reverse Dataverse deployments with step-by-step progress tracking matching the deployment experience, **with full multi-environment support**.
1299
1353
1300
1354
**Key Features**:
1355
+
-**Multi-Environment Rollback**: Delete deployments from the correct Dataverse environment
1356
+
-**Environment-Aware Operations**: Automatically routes rollback to the environment where deployment was created
0 commit comments