Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -149,7 +149,7 @@ <h2 class="settings-drawer-header-title">Connection settings</h2>
class="save-button"
color="primary"
(click)="saveSetting()"
[disabled]="!isFormValues || isLessThanTwoInterfaces">
[disabled]="!isFormValues || isLessThanOneInterface">
Save
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,13 +249,9 @@ describe('GeneralSettingsComponent', () => {
});
});

describe('with intefaces lenght less then two', () => {
describe('with interfaces length less than one', () => {
beforeEach(() => {
component.interfaces = { mockDeviceValue: 'mockDeviceValue' };
testRunServiceMock.systemConfig$ = of(MOCK_SYSTEM_CONFIG_WITH_DATA);
testRunServiceMock.getSystemConfig.and.returnValue(
of(MOCK_SYSTEM_CONFIG_WITH_DATA)
);
component.interfaces = {};
fixture.detectChanges();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export class GeneralSettingsComponent implements OnInit, OnDestroy {
return this.settingForm.hasError('hasSameValues');
}

get isLessThanTwoInterfaces(): boolean {
return Object.keys(this.interfaces).length < 2;
get isLessThanOneInterface(): boolean {
return Object.keys(this.interfaces).length < 1;
}

constructor(
Expand Down