Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment PR - 1450 #2044

Open
wants to merge 106 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
44795aa
Check for OATS schema before running migration
trslater Dec 20, 2024
bcbaf52
Merge pull request #2043 from bcgov/feature/ALCS-1949-migration-fix
trslater Dec 20, 2024
f7953c0
add tags to commissioner view on ALCS
Abradat Dec 31, 2024
dcb5664
fix commissioner access to tags
Abradat Dec 31, 2024
fc9ef91
add application status pill to commissioner view
Abradat Dec 31, 2024
f6bf2ec
remove unused input file tag service
Abradat Jan 6, 2025
8d8bcab
Merge pull request #2045 from bcgov/feature/ALCS-2351
Abradat Jan 6, 2025
83da74e
ALCS-2453 Handle unique descriptions on condition types
fbarreta Jan 6, 2025
ad16834
Merge pull request #2047 from bcgov/hotfix/ALCS-2453-handle-unique-de…
fbarreta Jan 6, 2025
33d17d6
Merge pull request #2042 from bcgov/hotfix/ALCS-2450
trslater Dec 20, 2024
47566b7
fix portal status and file type dropdown bugs
Abradat Jan 7, 2025
eedaa74
ALCS-2451 Allow to remove check box if the value is zero
fbarreta Jan 6, 2025
3a53525
Merge pull request #2049 from bcgov/bugfix/ALCS-2176
Abradat Jan 7, 2025
1d91eec
Merge pull request #2050 from bcgov/hotfix/ALCS-2451-check-zero-on-ad…
fbarreta Jan 7, 2025
71f0f9d
Merge branch 'develop' into feature/ALCS-2059-decision-view-summary
fbarreta Jan 7, 2025
1665cdf
add db migrations for application conditions board
Abradat Jan 10, 2025
33a594d
add application decision condition card
Abradat Jan 10, 2025
7910210
add internal error exception
Abradat Jan 10, 2025
745b307
add application decision condition card mappings
Abradat Jan 10, 2025
5f251f0
add application decision condition card to module
Abradat Jan 10, 2025
1cfcf41
add application decision condition card support
Abradat Jan 10, 2025
ab04551
add mapper
Abradat Jan 10, 2025
a3d96d4
fix mapping
Abradat Jan 10, 2025
9cb3589
fix mapping
Abradat Jan 10, 2025
8fce040
remove log
Abradat Jan 13, 2025
2ee1c44
add application decision condition card to decision conditions page
Abradat Jan 13, 2025
aa6f59e
ALCS-2059 Create summary
fbarreta Jan 13, 2025
83c8532
Merge pull request #2051 from bcgov/feature/ALCS-2059-decision-view-s…
fbarreta Jan 14, 2025
a7d8bba
ALCS-2426 Navigate to conditions when decision released
fbarreta Jan 14, 2025
41cd24e
Merge pull request #2052 from bcgov/feature/ALCS-2426-update-nav-on-d…
fbarreta Jan 14, 2025
f17d84c
ALCS-2467 Check decisions
fbarreta Jan 14, 2025
0f7921f
Merge pull request #2054 from bcgov/hotfix/ALCS-2467-check-decision-o…
fbarreta Jan 14, 2025
b7a51ad
Update backend document service to check for virus scan failures
trslater Jan 2, 2025
040b100
Fix small file name resolution error
trslater Jan 2, 2025
c0771f3
Fix inquiry document service typo
trslater Jan 3, 2025
d6e38de
Move app decision doc upload dialog to shared component
trslater Jan 6, 2025
33aa818
Create shared interface for decision services
trslater Jan 7, 2025
2ee5e5c
Accept any decision service in shared upload dialog
trslater Jan 7, 2025
3cabbb2
Use shared upload component and pass in decision service for PR's and…
trslater Jan 7, 2025
5626bff
Add missed interface and fix reference
trslater Jan 7, 2025
6e6d5be
Clean up unused NOI/PR dialogs
trslater Jan 7, 2025
3aee92a
Update shared upload dialog for use in apps documents and use there
trslater Jan 7, 2025
5f7d979
Clean up more unused dialogs
trslater Jan 7, 2025
af00a17
Use shared upload dialog in inquiries
trslater Jan 7, 2025
f0d61cb
Use shared upload dialog on notifications
trslater Jan 8, 2025
9c39dbe
Switch PR's to use shared upload dialog
trslater Jan 8, 2025
85a9acc
Switch to shared upload dialog for NOI's
trslater Jan 8, 2025
aefbeaa
Handle scan fail error separately from infected error
trslater Jan 8, 2025
044c42c
Make visibility flags configurable for shared upload dialogs
trslater Jan 9, 2025
9723c76
Allow configuring auto-visibility when selecting type
trslater Jan 9, 2025
648f5e3
Update shared portal uploader to handle separate virus errors
trslater Jan 9, 2025
3572c38
Add server error flag to all portal components with upload and pass i…
trslater Jan 9, 2025
ffeccc1
Strip error-handling and toasts from frontend services
trslater Jan 13, 2025
e59bfa9
Make sure all upload components have toasts
trslater Jan 13, 2025
e22051a
Allow setting name property on API exceptions
trslater Jan 14, 2025
4965f19
Set name for ClamAV errors
trslater Jan 14, 2025
a8de496
For files step, just re-throw errors
trslater Jan 14, 2025
c509b6b
Update all portal instances
trslater Jan 14, 2025
14e2ed2
Fix missing doc type -> vis map keys throwing error
trslater Jan 14, 2025
ee8f2fc
Remove unneeded unknown error text
trslater Jan 14, 2025
a7af049
Remove smiley
trslater Jan 14, 2025
cebe693
Make tests pass
trslater Jan 14, 2025
864e291
Merge pull request #2055 from bcgov/bugfix/ALCS-2370
trslater Jan 15, 2025
d54b942
Allow all but commissioner to archive cards
trslater Jan 15, 2025
25f34ae
Merge pull request #2056 from bcgov/feature/ALCS-2321
trslater Jan 15, 2025
de26f0a
ALCS-2059 QA fixes
fbarreta Jan 15, 2025
0e65c1e
Merge pull request #2057 from bcgov/feature/ALCS-2059-qa-fixes
fbarreta Jan 15, 2025
14345d6
ALCS-2426 Added navigation according to status on search
fbarreta Jan 16, 2025
eacade6
Merge pull request #2058 from bcgov/feature/ALCS-2426-update-nav-on-s…
fbarreta Jan 16, 2025
b8bd077
remove unused import
Abradat Jan 16, 2025
21c7c58
update condition status
Abradat Jan 16, 2025
ecc89ad
update condition card dto, service, and controller
Abradat Jan 16, 2025
674c9f5
add status to decision condition DTO and update API
Abradat Jan 16, 2025
aae2573
update decision condition card service and DTO
Abradat Jan 16, 2025
43a7d78
add optional query parameter for condition status
Abradat Jan 16, 2025
b603350
add application decision condition card to board
Abradat Jan 16, 2025
58d43cc
add application decision condition card dialog component
Abradat Jan 16, 2025
b9f2097
ALCS-2059 Ui Fixes
fbarreta Jan 16, 2025
ed1a8b4
add recon and modification to DTO and API
Abradat Jan 17, 2025
6a8946f
fix decision
Abradat Jan 17, 2025
f418ce5
add tests
Abradat Jan 17, 2025
6723a51
update application decision condition card dialog
Abradat Jan 17, 2025
ff9e4cd
Merge branch 'develop' into feature/ALCS-1871
Abradat Jan 17, 2025
fff57c2
Merge pull request #2059 from bcgov/feature/ALCS-2059-qa-ui-fixes
fbarreta Jan 17, 2025
c73e2bb
ALCS-2474 Fix single date updates
fbarreta Jan 17, 2025
0d14a89
Merge pull request #2062 from bcgov/hotfix/ALCS-2474-fix-single-date-…
fbarreta Jan 17, 2025
9e105d9
ALCS-2447 Change icon color
fbarreta Jan 17, 2025
4a6f086
ALCS-2059 Alignment fix
fbarreta Jan 17, 2025
50bcb05
Merge pull request #2061 from bcgov/feature/ALCS-1871
Abradat Jan 20, 2025
7f9d308
Merge pull request #2064 from bcgov/feature/ALCS-2059-alignment-fix
fbarreta Jan 20, 2025
8ea28bf
Merge pull request #2063 from bcgov/feature/ALCS-2447-fix-conditions-…
fbarreta Jan 20, 2025
775f9f8
ALCS-2360 Migration and label fixes
fbarreta Jan 20, 2025
a76fb28
Merge pull request #2065 from bcgov/bugfix/ALCS-2360-fix-label-typos
fbarreta Jan 20, 2025
3956bb0
Add application decision condition card new API and decision service
Abradat Jan 20, 2025
17d5b42
update application decision condition card and APPCON board card
Abradat Jan 20, 2025
8536bbe
Add and fix tests
Abradat Jan 20, 2025
abcca42
ALCS-2319 Remove card relationship on archive
fbarreta Jan 21, 2025
4764972
ALCS-2319 Fix tests
fbarreta Jan 21, 2025
857d7a5
Merge pull request #2067 from bcgov/feature/ALCS-2319-remove-conditio…
fbarreta Jan 21, 2025
acec672
Merge pull request #2066 from bcgov/feature/ALCS-1871-2
Abradat Jan 21, 2025
bdf0285
fix application condition cards drag and drop not working
Abradat Jan 21, 2025
dfd0f66
ALCS-2478 Allow to add a new date on conditions component
fbarreta Jan 21, 2025
7192c5d
Merge pull request #2070 from bcgov/hotfix/ALCS-2478-add-new-date-on-…
fbarreta Jan 21, 2025
3fb3783
Add sort to conditions by created date
Abradat Jan 21, 2025
c7b9d2c
Fix application decision condition board card bugs
Abradat Jan 21, 2025
da77acd
Merge pull request #2072 from bcgov/feature/ALCS-1871-3
Abradat Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ <h4>{{ isEdit ? 'Edit' : 'Create' }} Decision Condition Type</h4>
<mat-label>Description</mat-label>
<input required matInput id="description" formControlName="description" name="description" />
</mat-form-field>
<div *ngIf="conditionTypeForm.get('description')?.hasError('descriptionExists')">
<app-error-message message="Description already in use or deteled, pick a different description."></app-error-message>
</div>
</div>

<div class="dialog-field full-width">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { ApplicationDecisionConditionService } from '../../../../services/application/decision/application-decision-v2/application-decision-condition/application-decision-condition.service';
import { NoticeOfIntentDecisionConditionService } from '../../../../services/notice-of-intent/decision-v2/notice-of-intent-decision-condition/notice-of-intent-decision-condition.service';
import { catchError, debounceTime, map, Observable, of, switchMap } from 'rxjs';
import { codeExistsValidator } from '../../../../shared/validators/code-exists-validator';
import { codeExistsValidator, descriptionExistsValidator } from '../../../../shared/validators/code-exists-validator';

enum ValidationFields {
Dates,
Expand Down Expand Up @@ -54,6 +54,7 @@ export class DecisionConditionTypesDialogComponent {
this.conditionTypeForm = new FormGroup({
description: new FormControl(this.data?.content?.description ? this.data.content.description : '', [
Validators.required,
descriptionExistsValidator(this.data?.existingDescriptions ? this.data.existingDescriptions : []),
]),
label: new FormControl(this.data?.content?.label ? this.data.content.label : '', [Validators.required]),
code: new FormControl(this.data?.content?.code ? this.data.content.code : '', [
Expand Down Expand Up @@ -195,18 +196,18 @@ export class DecisionConditionTypesDialogComponent {
hasAnyDates(
conditions: Partial<ApplicationDecisionConditionDto>[] | Partial<NoticeOfIntentDecisionConditionDto>[],
): boolean {
return conditions.some((condition) => condition.dates && condition.dates.length > 0);
return conditions.filter((c) => c.decision !== null).some((condition) => condition.dates && condition.dates.length > 0);
}

hasAdminFee(
conditions: Partial<ApplicationDecisionConditionDto>[] | Partial<NoticeOfIntentDecisionConditionDto>[],
): boolean {
return conditions.map((c) => c.administrativeFee).filter((f) => f !== null).length > 0;
return conditions.filter((c) => c.decision !== null).map((c) => c.administrativeFee).filter((f) => f !== null && f !== undefined && f > 0).length > 0;
}

hasSecurityAmount(
conditions: Partial<ApplicationDecisionConditionDto>[] | Partial<NoticeOfIntentDecisionConditionDto>[],
): boolean {
return conditions.map((c) => c.securityAmount).filter((f) => f !== null).length > 0;
return conditions.filter((c) => c.decision !== null).map((c) => c.securityAmount).filter((f) => f !== null && f !== undefined && f > 0).length > 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class DecisionConditionTypesComponent implements OnInit {

decisionConditionTypeDtos: ApplicationDecisionConditionTypeDto[] | NoticeOfIntentDecisionConditionTypeDto[] = [];
decisionConditionTypeCodeDtos: string[] = [];
decisionConditionTypeDescriptionDtos: string[] = [];
displayedColumns: string[] = ['label', 'description', 'code', 'isActive', 'actions'];

constructor(
Expand All @@ -45,6 +46,7 @@ export class DecisionConditionTypesComponent implements OnInit {
if (!this.service) return;
this.decisionConditionTypeDtos = await this.service.fetch();
this.decisionConditionTypeCodeDtos = await this.service.fetchCodesWithDeleted();
this.decisionConditionTypeDescriptionDtos = this.decisionConditionTypeDtos.map((d) => d.description);
}

async onCreate() {
Expand All @@ -57,6 +59,7 @@ export class DecisionConditionTypesComponent implements OnInit {
service: this.service,
conditionService: this.conditionService,
existingCodes: this.decisionConditionTypeCodeDtos,
existingDescriptions: this.decisionConditionTypeDescriptionDtos,
},
});
dialog.beforeClosed().subscribe(async (result) => {
Expand All @@ -77,6 +80,7 @@ export class DecisionConditionTypesComponent implements OnInit {
conditionService: this.conditionService,
content: dto,
existingCodes: this.decisionConditionTypeCodeDtos,
existingDescriptions: this.decisionConditionTypeDescriptionDtos.filter((d) => d !== dto.description),
},
});
dialog.beforeClosed().subscribe(async (result) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export interface DecisionDialogDataInterface {
conditionService: ApplicationDecisionConditionService | NoticeOfIntentDecisionConditionService;
content: ApplicationDecisionConditionTypeDto;
existingCodes: string[];
existingDescriptions: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[application]="application"
[modifications]="modifications"
[reconsiderations]="reconsiderations"
[conditionCards]="decisionConditionCards"
[showStatus]="true"
[submissionStatusService]="applicationStatusService"
[applicationDetailService]="applicationDetailService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { ApplicationSubmissionService } from '../../services/application/applica
import { ApplicationSubmissionStatusService } from '../../services/application/application-submission-status/application-submission-status.service';

import { ApplicationComponent } from './application.component';
import { ApplicationDecisionConditionCardService } from '../../services/application/decision/application-decision-v2/application-decision-condition/application-decision-condition-card/application-decision-condition-card.service';

describe('ApplicationComponent', () => {
let component: ApplicationComponent;
Expand All @@ -25,6 +26,7 @@ describe('ApplicationComponent', () => {
let mockReviewService: DeepMocked<ApplicationReviewService>;
let mockAppSubmissionService: DeepMocked<ApplicationSubmissionService>;
let mockAppStatusService: DeepMocked<ApplicationSubmissionStatusService>;
let mockApplicationDecisionConditionCardService: DeepMocked<ApplicationDecisionConditionCardService>;

beforeEach(async () => {
mockAppDetailService = createMock();
Expand All @@ -40,6 +42,8 @@ describe('ApplicationComponent', () => {
mockAppSubmissionService = createMock();
mockAppStatusService = createMock();

mockApplicationDecisionConditionCardService = createMock();

await TestBed.configureTestingModule({
providers: [
{
Expand Down Expand Up @@ -70,6 +74,10 @@ describe('ApplicationComponent', () => {
provide: ApplicationSubmissionStatusService,
useValue: mockAppStatusService,
},
{
provide: ApplicationDecisionConditionCardService,
useValue: mockApplicationDecisionConditionCardService,
},
{
provide: ActivatedRoute,
useValue: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ import { ReviewComponent } from './review/review.component';
import { ApplicationSubmissionStatusService } from '../../services/application/application-submission-status/application-submission-status.service';
import { ApplicationTagService } from '../../services/application/application-tag/application-tag.service';
import { FileTagService } from '../../services/common/file-tag.service';
import { ApplicationDecisionV2Service } from '../../services/application/decision/application-decision-v2/application-decision-v2.service';
import { ApplicationDecisionConditionCardDto } from '../../services/application/decision/application-decision-v2/application-decision-v2.dto';
import { ApplicationDecisionConditionCardService } from '../../services/application/decision/application-decision-v2/application-decision-condition/application-decision-condition-card/application-decision-condition-card.service';

export const unsubmittedRoutes = [
{
Expand Down Expand Up @@ -184,6 +187,7 @@ export class ApplicationComponent implements OnInit, OnDestroy {
application: ApplicationDto | undefined;
reconsiderations: ApplicationReconsiderationDto[] = [];
modifications: ApplicationModificationDto[] = [];
decisionConditionCards: ApplicationDecisionConditionCardDto[] = [];
submission?: ApplicationSubmissionDto;

isApplicantSubmission = false;
Expand All @@ -195,6 +199,7 @@ export class ApplicationComponent implements OnInit, OnDestroy {
public applicationSubmissionService: ApplicationSubmissionService,
private reconsiderationService: ApplicationReconsiderationService,
private modificationService: ApplicationModificationService,
private decisionConditionCardService: ApplicationDecisionConditionCardService,
private route: ActivatedRoute,
private titleService: Title,
public applicationStatusService: ApplicationSubmissionStatusService,
Expand All @@ -214,6 +219,9 @@ export class ApplicationComponent implements OnInit, OnDestroy {
this.reconsiderationService.fetchByApplication(application.fileNumber);
this.modificationService.fetchByApplication(application.fileNumber);

this.decisionConditionCards =
(await this.decisionConditionCardService.fetchByApplicationFileNumber(application.fileNumber)) || [];

this.isApplicantSubmission = application.source !== SYSTEM_SOURCE_TYPES.ALCS;
let wasSubmittedToLfng = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { appChildRoutes, ApplicationComponent } from './application.component';
import { BoundaryAmendmentComponent } from './boundary-amendment/boundary-amendment.component';
import { EditBoundaryAmendmentDialogComponent } from './boundary-amendment/edit-boundary-amendment-dialog/edit-boundary-amendment-dialog.component';
import { DecisionModule } from './decision/decision.module';
import { DocumentUploadDialogComponent } from './documents/document-upload-dialog/document-upload-dialog.component';
import { DocumentsComponent } from './documents/documents.component';
import { InfoRequestsComponent } from './info-requests/info-requests.component';
import { InfoRequestDialogComponent } from './info-requests/info-request-dialog/info-request-dialog.component';
Expand Down Expand Up @@ -73,7 +72,6 @@ const routes: Routes = [
ApplicantInfoComponent,
LfngInfoComponent,
DocumentsComponent,
DocumentUploadDialogComponent,
ProposalComponent,
NfuProposalComponent,
SubdProposalComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<div class="container">
<div class="section">
<h3>Create New Condition Card</h3>
</div>
<div class="section">
<ng-select
class="card-type"
appearance="outline"
[items]="conditionBoard?.statuses!"
placeholder="Workflow Stage*"
bindLabel="label"
bindValue="statusCode"
[clearable]="false"
[(ngModel)]="selectedStatus"
(change)="onStatusSelected($event)"
>
<ng-template ng-option-tmp let-item="item">
<span [innerHTML]="item.label"> </span>
</ng-template>
<ng-template ng-label-tmp let-item="item">
<span [innerHTML]="item.label"> </span>
</ng-template>
</ng-select>
</div>
<div class="section">
<span>Add one or more conditions*</span>
<div class="table-container">
<table mat-table class="conditions-table mat-elevation-z3" [dataSource]="dataSource" style="width: 100%">
<ng-container matColumnDef="select">
<th mat-header-cell *matHeaderCellDef class="column-select"></th>
<td mat-cell *matCellDef="let element" class="column-select">
<mat-checkbox [(ngModel)]="element.selected" [disabled]="isConditionCardNotNull(element)"></mat-checkbox>
</td>
</ng-container>

<ng-container matColumnDef="index">
<th mat-header-cell *matHeaderCellDef class="column-index">#</th>
<td mat-cell *matCellDef="let element" class="column-index">{{ element.index }}</td>
</ng-container>

<ng-container matColumnDef="type">
<th mat-header-cell *matHeaderCellDef class="column-type">Type</th>
<td mat-cell *matCellDef="let element" class="column-type">{{ element.condition.type.label }}</td>
</ng-container>

<ng-container matColumnDef="description">
<th mat-header-cell *matHeaderCellDef class="column-description">Description</th>
<td mat-cell *matCellDef="let element" class="column-description">{{ element.condition.description }}</td>
</ng-container>

<tr mat-header-row *matHeaderRowDef="displayColumns"></tr>
<tr
mat-row
*matRowDef="let row; columns: displayColumns"
[class.disabled-row]="isConditionCardNotNull(row)"
matTooltip="Condition is already used by another card"
[matTooltipDisabled]="!isConditionCardNotNull(row)"
></tr>
</table>
</div>
</div>
<div class="section">
<div class="button-row">
<button type="button" mat-stroked-button color="primary" (click)="onCancel()">Cancel</button>
<button type="button" mat-flat-button color="primary" [disabled]="isSaveDisabled()" (click)="onSave()">
Save
</button>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
@use '../../../../../../styles/colors.scss' as *;

.container {
display: flex;
flex-direction: column;
width: 100%;
padding: 12px 8px;
overflow-y: hidden;
}

.section {
width: 100%;
padding: 16px;
}

.button-row {
display: flex;
justify-content: flex-end;
gap: 8px;
}

.column-select {
width: 10%;
}

.column-index {
width: 10%;
}

.column-type {
width: 30%;
}

.column-description {
width: 50%;
}

.conditions-table {
margin-top: 16px;
width: 100%;
}

.table-container {
max-height: 300px;
overflow-y: auto;
padding: 2px;
}

.disabled-row {
background-color: #f0f0f0;
opacity: 0.6;
cursor: default;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { createMock, DeepMocked } from '@golevelup/ts-jest';
import { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { MatTableModule } from '@angular/material/table';
import { MatSortModule } from '@angular/material/sort';
import { HttpClientTestingModule } from '@angular/common/http/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ApplicationDecisionConditionCardService } from '../../../../../services/application/decision/application-decision-v2/application-decision-condition/application-decision-condition-card/application-decision-condition-card.service';
import { BoardService } from '../../../../../services/board/board.service';
import { ToastService } from '../../../../../services/toast/toast.service';
import { ConditionCardDialogComponent } from './condition-card-dialog.component';

describe('ConditionCardDialogComponent', () => {
let component: ConditionCardDialogComponent;
let fixture: ComponentFixture<ConditionCardDialogComponent>;
let mockDecisionConditionCardService: DeepMocked<ApplicationDecisionConditionCardService>;
let mockBoardService: DeepMocked<BoardService>;
let mockToastService: DeepMocked<ToastService>;

beforeEach(async () => {
mockDecisionConditionCardService = createMock();
mockBoardService = createMock();
mockToastService = createMock();

await TestBed.configureTestingModule({
declarations: [ConditionCardDialogComponent],
imports: [
MatDialogModule,
BrowserAnimationsModule,
MatTableModule,
MatSortModule,
HttpClientTestingModule,
RouterTestingModule,
],
providers: [
{ provide: MAT_DIALOG_DATA, useValue: { conditions: [], decision: 'decision-uuid' } },
{ provide: MatDialogRef, useValue: {} },
{ provide: ApplicationDecisionConditionCardService, useValue: mockDecisionConditionCardService },
{ provide: BoardService, useValue: mockBoardService },
{ provide: ToastService, useValue: mockToastService },
],
schemas: [NO_ERRORS_SCHEMA],
}).compileComponents();

fixture = TestBed.createComponent(ConditionCardDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Loading
Loading