From 0273bc5516e0897ff45f3ea87ff6cc2f33f7b695 Mon Sep 17 00:00:00 2001 From: Philipp Czora Date: Thu, 14 Feb 2019 14:13:50 +0100 Subject: [PATCH] Fixed unit tests --- .../components/buttons/DeletePermissionButton.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scm-ui/src/repos/permissions/components/buttons/DeletePermissionButton.test.js b/scm-ui/src/repos/permissions/components/buttons/DeletePermissionButton.test.js index 811c9dc335..03eebe3c50 100644 --- a/scm-ui/src/repos/permissions/components/buttons/DeletePermissionButton.test.js +++ b/scm-ui/src/repos/permissions/components/buttons/DeletePermissionButton.test.js @@ -29,7 +29,7 @@ describe("DeletePermissionButton", () => { expect(navLink.text()).toBe(""); }); - it("should render the navLink", () => { + it("should render the delete icon", () => { const permission = { _links: { delete: { @@ -38,14 +38,14 @@ describe("DeletePermissionButton", () => { } }; - const navLink = mount( + const deleteIcon = mount( {}} />, options.get() ); - expect(navLink.text()).not.toBe(""); + expect(deleteIcon.html()).not.toBe(""); }); it("should open the confirm dialog on button click", () => { @@ -64,7 +64,7 @@ describe("DeletePermissionButton", () => { />, options.get() ); - button.find("button").simulate("click"); + button.find(".fa-trash").simulate("click"); expect(confirmAlert.mock.calls.length).toBe(1); }); @@ -91,7 +91,7 @@ describe("DeletePermissionButton", () => { />, options.get() ); - button.find("button").simulate("click"); + button.find(".fa-trash").simulate("click"); expect(calledUrl).toBe("/permission"); });