Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
fix: show version dropdown when runtime is selected (#354)
Browse files Browse the repository at this point in the history
To see the auto-change behavior:
1- Deployment: zip
2- Choose runtime `Node` with version `10.x (RHOAR)`
3- Choose mission `Istio - Circuit Breaker`
=> Version has changed to 8.x `(Community)`

Fixes fabric8-launcher/launcher-ui-components#648
  • Loading branch information
ia3andy authored and edewit committed Aug 13, 2018
1 parent 56f4f70 commit 3d84da2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ <h2 class="card-pf-title">
<div class="list-view-pf-description">
<div class="list-group-item-heading">
{{runtime.name}}
<div *ngIf="!runtime.disabled && canChangeVersion && missionId && runtime.id == runtimeId" class="dropdown" dropdown>
<div *ngIf="!runtime.disabled && canChangeVersion && runtime.id == runtimeId" class="dropdown" dropdown>
<button type="button" class="btn btn-default dropdown-toggle" dropdownToggle
[disabled]="runtime.disabled">
{{runtime.selectedVersion.name}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,16 +390,12 @@ describe('MissionRuntimeStepComponent', () => {
}));

it(`should show versions dropdown only when canChangeVersion is true
and mission and runtime are selected`, fakeAsync(() => {
and runtime are selected`, fakeAsync(() => {
component.canChangeVersion = true;
fixture.detectChanges();
expect(getRuntimeItem(0).querySelector('.dropdown')).toBeFalsy();
expect(getRuntimeItem(1).querySelector('.dropdown')).toBeFalsy();

selectItem(getMissionItem(0));
expect(getRuntimeItem(0).querySelector('.dropdown')).toBeFalsy();
expect(getRuntimeItem(1).querySelector('.dropdown')).toBeFalsy();

selectItem(getRuntimeItem(0));
expect(getRuntimeItem(0).querySelector('.dropdown')).toBeTruthy();
expect(getRuntimeItem(1).querySelector('.dropdown')).toBeFalsy();
Expand Down

0 comments on commit 3d84da2

Please sign in to comment.