Commit 961695a6 by Torkel Ödegaard

Improved dashboard page test

parent a4841a72
...@@ -89,7 +89,7 @@ describe('DashboardPage', () => { ...@@ -89,7 +89,7 @@ describe('DashboardPage', () => {
ctx.mount(); ctx.mount();
}); });
it('should render nothing', () => { it('Should render nothing', () => {
expect(ctx.wrapper).toMatchSnapshot(); expect(ctx.wrapper).toMatchSnapshot();
}); });
}); });
...@@ -103,7 +103,7 @@ describe('DashboardPage', () => { ...@@ -103,7 +103,7 @@ describe('DashboardPage', () => {
}); });
}); });
it('should render slow init state', () => { it('Should render slow init state', () => {
expect(ctx.wrapper).toMatchSnapshot(); expect(ctx.wrapper).toMatchSnapshot();
}); });
}); });
...@@ -123,7 +123,7 @@ describe('DashboardPage', () => { ...@@ -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.setup(() => {
ctx.mount(); ctx.mount();
ctx.setDashboardProp(); ctx.setDashboardProp();
...@@ -143,11 +143,10 @@ describe('DashboardPage', () => { ...@@ -143,11 +143,10 @@ describe('DashboardPage', () => {
const state = ctx.wrapper.state(); const state = ctx.wrapper.state();
expect(state.isEditing).toBe(true); expect(state.isEditing).toBe(true);
expect(state.isFullscreen).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.setup(() => {
ctx.mount(); ctx.mount();
ctx.setDashboardProp(); ctx.setDashboardProp();
......
...@@ -217,7 +217,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1` ...@@ -217,7 +217,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
</div> </div>
`; `;
exports[`DashboardPage Dashboard is fetching slowly should render slow init state 1`] = ` exports[`DashboardPage Dashboard is fetching slowly Should render slow init state 1`] = `
<div <div
className="dashboard-loading" className="dashboard-loading"
> >
...@@ -233,7 +233,7 @@ exports[`DashboardPage Dashboard is fetching slowly should render slow init stat ...@@ -233,7 +233,7 @@ exports[`DashboardPage Dashboard is fetching slowly should render slow init stat
</div> </div>
`; `;
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`] = ` exports[`DashboardPage When dashboard has editview url state should render settings view 1`] = `
<div <div
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment