Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 0dfaf64

Browse files
authored
Delete unused reset code (#1067)
Closes #950 Signed-off-by: James Taylor <jamest@uk.ibm.com>
1 parent f9d68dc commit 0dfaf64

File tree

9 files changed

+0
-151
lines changed

9 files changed

+0
-151
lines changed

packages/composer-playground/src/app/app.component.spec.ts

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -594,32 +594,6 @@ describe('AppComponent', () => {
594594
}));
595595
});
596596

597-
describe('reset', () => {
598-
let mockOnBusy;
599-
let mockOnError;
600-
601-
beforeEach(() => {
602-
mockOnBusy = sinon.stub(component, 'onBusyStatus');
603-
mockOnError = sinon.stub(component, 'onErrorStatus');
604-
});
605-
606-
// Can't test this properly as can't mock window.location.reload;
607-
it('should reset the business network', fakeAsync(() => {
608-
mockModal.open.returns({result: Promise.resolve(false)});
609-
610-
activatedRoute.testParams = {};
611-
612-
updateComponent();
613-
614-
component.reset();
615-
616-
tick();
617-
618-
mockModal.open.should.have.been.called;
619-
620-
}));
621-
});
622-
623597
describe('updateConnectionData', () => {
624598
let mockOnBusy;
625599
let mockOnError;

packages/composer-playground/src/app/app.component.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { IdentityService } from './services/identity.service';
1212
import { InitializationService } from './services/initialization.service';
1313
import { BusyComponent } from './busy';
1414
import { ErrorComponent } from './error';
15-
import { ResetComponent } from './reset';
1615
import { WelcomeComponent } from './welcome';
1716
import { VersionCheckComponent } from './version-check/version-check.component.ts';
1817
import { LocalStorageService } from 'angular-2-local-storage';
@@ -169,14 +168,6 @@ export class AppComponent implements OnInit, OnDestroy {
169168
});
170169
}
171170

172-
reset(): Promise<any> {
173-
return this.modalService.open(ResetComponent).result.then((result) => {
174-
if (result) {
175-
window.location.reload();
176-
}
177-
});
178-
}
179-
180171
updateConnectionData(): Promise<any> {
181172
let newConnectionProfiles = [];
182173
return this.adminService.getAdminConnection().getAllProfiles()

packages/composer-playground/src/app/app.module.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { AboutComponent } from './about';
3131
import { BusyComponent } from './busy';
3232
import { ErrorComponent } from './error';
3333
import { SuccessComponent } from './success';
34-
import { ResetComponent } from './reset';
3534
import { FileImporterComponent } from './file-importer';
3635
import { ImportComponent } from './import';
3736
import { ResourceComponent } from './resource';
@@ -110,7 +109,6 @@ type StoreType = {
110109
IdentityIssuedComponent,
111110
WelcomeComponent,
112111
VersionCheckComponent,
113-
ResetComponent,
114112
BusyComponent,
115113
SwitchIdentityComponent
116114
],
@@ -130,7 +128,6 @@ type StoreType = {
130128
SuccessComponent,
131129
ConfirmComponent,
132130
DeleteComponent,
133-
ResetComponent,
134131
ImportComponent,
135132
GithubComponent,
136133
NoContentComponent,

packages/composer-playground/src/app/reset/index.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/composer-playground/src/app/reset/reset.component.css

Whitespace-only changes.

packages/composer-playground/src/app/reset/reset.component.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

packages/composer-playground/src/app/reset/reset.component.scss

Lines changed: 0 additions & 14 deletions
This file was deleted.

packages/composer-playground/src/app/reset/reset.component.spec.ts

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/composer-playground/src/app/reset/reset.component.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)