From f8a41efc5945ec7b4dc43eb414909acfbdb5ec04 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Tue, 11 Sep 2018 11:00:06 +0200 Subject: [PATCH] mgr/dashboard: Fixes ts warning in RBD snapshot tests MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Typescript has thrown an warning because a private method is called in the RBD snapshot unit tests. Signed-off-by: Stephan Müller --- .../rbd-snapshot-list/rbd-snapshot-list.component.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 0bf3454482d..e0fff07a0ca 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\$`) ); -- 2.39.5