From 961695a61fd1b6bf631e399ea03acba6a92af7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 6 Feb 2019 21:07:01 +0100 Subject: [PATCH] Improved dashboard page test --- .../features/dashboard/containers/DashboardPage.test.tsx | 9 ++++----- .../containers/__snapshots__/DashboardPage.test.tsx.snap | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/public/app/features/dashboard/containers/DashboardPage.test.tsx b/public/app/features/dashboard/containers/DashboardPage.test.tsx index 41b09a7c361..94aa0b32d46 100644 --- a/public/app/features/dashboard/containers/DashboardPage.test.tsx +++ b/public/app/features/dashboard/containers/DashboardPage.test.tsx @@ -89,7 +89,7 @@ describe('DashboardPage', () => { ctx.mount(); }); - it('should render nothing', () => { + it('Should render nothing', () => { expect(ctx.wrapper).toMatchSnapshot(); }); }); @@ -103,7 +103,7 @@ describe('DashboardPage', () => { }); }); - it('should render slow init state', () => { + it('Should render slow init state', () => { expect(ctx.wrapper).toMatchSnapshot(); }); }); @@ -123,7 +123,7 @@ describe('DashboardPage', () => { }); }); - dashboardPageScenario("where user goes into panel edit", (ctx) => { + dashboardPageScenario("When user goes into panel edit", (ctx) => { ctx.setup(() => { ctx.mount(); ctx.setDashboardProp(); @@ -143,11 +143,10 @@ describe('DashboardPage', () => { const state = ctx.wrapper.state(); expect(state.isEditing).toBe(true); expect(state.isFullscreen).toBe(true); - expect(state.rememberScrollTop).toBe(100); }); }); - dashboardPageScenario("where user goes back to dashboard from panel edit", (ctx) => { + dashboardPageScenario("When user goes back to dashboard from panel edit", (ctx) => { ctx.setup(() => { ctx.mount(); ctx.setDashboardProp(); diff --git a/public/app/features/dashboard/containers/__snapshots__/DashboardPage.test.tsx.snap b/public/app/features/dashboard/containers/__snapshots__/DashboardPage.test.tsx.snap index c1aa5972b6d..002cac2306e 100644 --- a/public/app/features/dashboard/containers/__snapshots__/DashboardPage.test.tsx.snap +++ b/public/app/features/dashboard/containers/__snapshots__/DashboardPage.test.tsx.snap @@ -217,7 +217,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1` `; -exports[`DashboardPage Dashboard is fetching slowly should render slow init state 1`] = ` +exports[`DashboardPage Dashboard is fetching slowly Should render slow init state 1`] = `
@@ -233,7 +233,7 @@ exports[`DashboardPage Dashboard is fetching slowly should render slow init stat
`; -exports[`DashboardPage Given initial state should render nothing 1`] = `""`; +exports[`DashboardPage Given initial state Should render nothing 1`] = `""`; exports[`DashboardPage When dashboard has editview url state should render settings view 1`] = `