]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fixes ts warning in RBD snapshot tests
authorStephan Müller <smueller@suse.com>
Tue, 11 Sep 2018 09:00:06 +0000 (11:00 +0200)
committerStephan Müller <smueller@suse.com>
Wed, 19 Sep 2018 15:16:58 +0000 (17:16 +0200)
Typescript has thrown an warning because a private method is called in the
RBD snapshot unit tests.

Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts

index 0bf3454482dc7b32371f14581494ce6d61c0c8f8..e0fff07a0cabe3b83a37e30cf50d3f0f22c52142 100644 (file)
@@ -189,13 +189,15 @@ describe('RbdSnapshotListComponent', () => {
     });
 
     it('should display old snapshot name', () => {
-      component.openSnapshotModal('rbd/snap/edit', 'oldname');
+      component.selection.selected = [{ name: 'oldname' }];
+      component.selection.update();
+      component.openEditSnapshotModal();
       expect(component.modalRef.content.snapName).toBe('oldname');
       expect(component.modalRef.content.editing).toBeTruthy();
     });
 
     it('should display suggested snapshot name', () => {
-      component.openSnapshotModal('rbd/snap/create');
+      component.openCreateSnapshotModal();
       expect(component.modalRef.content.snapName).toMatch(
         RegExp(`^${component.rbdName}-\\d+T\\d+Z\$`)
       );