From: Stephan Müller Date: Tue, 11 Sep 2018 09:00:06 +0000 (+0200) Subject: mgr/dashboard: Fixes ts warning in RBD snapshot tests X-Git-Tag: v14.0.1~239^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8a41efc5945ec7b4dc43eb414909acfbdb5ec04;p=ceph.git mgr/dashboard: Fixes ts warning in RBD snapshot tests Typescript has thrown an warning because a private method is called in the RBD snapshot unit tests. Signed-off-by: Stephan Müller --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts index 0bf3454482dc..e0fff07a0cab 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-list/rbd-snapshot-list.component.spec.ts @@ -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\$`) );