Skip to content

Commit

Permalink
rm optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
lastminutediorama committed Dec 20, 2024
1 parent 2a52029 commit aebb77e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
align-items: center;
height: 100%;
width: 100%;
// z-index: 5;
top: 0;
left: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@ import {
TestBed,
tick,
} from '@angular/core/testing';
// import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BehaviorSubject, of } from 'rxjs';

import {
Scenario,
ScenarioResult,
TreatmentGoalConfig,
// TreatmentQuestionConfig,
} from '@types';
import { Scenario, ScenarioResult, TreatmentGoalConfig } from '@types';

import { PlanModule } from '../plan.module';
import { CreateScenariosComponent } from './create-scenarios.component';
// import { HarnessLoader } from '@angular/cdk/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { POLLING_INTERVAL } from '../plan-helpers';
import { PlanState, PlanStateService, ScenarioService } from '@services';
Expand All @@ -38,15 +31,6 @@ describe('CreateScenariosComponent', () => {
let fixture: ComponentFixture<CreateScenariosComponent>;
let fakePlanStateService: PlanStateService;

// let loader: HarnessLoader;
// let defaultSelectedQuestion: TreatmentQuestionConfig = {
// short_question_text: '',
// scenario_output_fields_paths: {},
// scenario_priorities: [''],
// stand_thresholds: [''],
// global_thresholds: [''],
// weights: [0],
// };
let fakeScenario: Scenario = {
id: '1',
name: 'name',
Expand Down Expand Up @@ -156,7 +140,6 @@ describe('CreateScenariosComponent', () => {

fixture = TestBed.createComponent(CreateScenariosComponent);
component = fixture.componentInstance;
// loader = TestbedHarnessEnvironment.loader(fixture);
});

it('should create', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export class CreateScenariosComponent implements OnInit {
(control: AbstractControl) =>
scenarioNameMustBeNew(control, this.existingScenarioNames),
]),
priorities: this.prioritiesComponent?.createForm() || '',
constrains: this.constraintsPanelComponent?.createForm() || '',
priorities: this.prioritiesComponent.createForm() || '',
constrains: this.constraintsPanelComponent.createForm() || '',
projectAreas: this.fb.group({
generateAreas: [''],
uploadedArea: [''],
Expand Down Expand Up @@ -221,7 +221,7 @@ export class CreateScenariosComponent implements OnInit {
);
}
// setting constraints
this.constraintsPanelComponent?.setFormData(scenario.configuration);
this.constraintsPanelComponent.setFormData(scenario.configuration);
},
error: () => {
this.scenarioNotFound = true;
Expand Down

0 comments on commit aebb77e

Please sign in to comment.