Commit 7800f992 authored by Kushal Pandya's avatar Kushal Pandya Committed by Jarka Kadlecová

Update props to include todos info

parent 30d46c86
......@@ -23,6 +23,7 @@ describe('EpicShowApp', () => {
mock.onAny().reply(404, null);
const {
epicId,
canUpdate,
canDestroy,
endpoint,
......@@ -43,6 +44,9 @@ describe('EpicShowApp', () => {
participants,
subscribed,
toggleSubscriptionPath,
todoExists,
todoPath,
todoDeletePath,
} = props;
const EpicShowApp = Vue.extend(epicShowApp);
......@@ -76,6 +80,7 @@ describe('EpicShowApp', () => {
const EpicSidebar = Vue.extend(epicSidebar);
sidebarVm = mountComponent(EpicSidebar, {
epicId,
endpoint,
editable: canUpdate,
initialStartDate: startDate,
......@@ -83,12 +88,15 @@ describe('EpicShowApp', () => {
initialLabels: labels,
initialParticipants: participants,
initialSubscribed: subscribed,
initialTodoExists: todoExists,
updatePath: updateEndpoint,
toggleSubscriptionPath,
labelsPath,
labelsWebUrl,
epicsWebUrl,
namespace,
todoPath,
todoDeletePath,
});
setTimeout(done);
......
......@@ -28,9 +28,12 @@ export const mockParticipants = [
];
export const contentProps = {
epicId: 1,
endpoint: '',
toggleSubscriptionPath: gl.TEST_HOST,
updateEndpoint: gl.TEST_HOST,
todoPath: gl.TEST_HOST,
todoDeletePath: gl.TEST_HOST,
canAdmin: true,
canUpdate: true,
canDestroy: true,
......@@ -49,6 +52,7 @@ export const contentProps = {
labels: mockLabels,
participants: mockParticipants,
subscribed: true,
todoExists: false,
};
export const headerProps = {
......
......@@ -13,6 +13,7 @@ describe('epicSidebar', () => {
let originalCookieState;
let EpicSidebar;
const {
epicId,
updateEndpoint,
labelsPath,
labelsWebUrl,
......@@ -21,18 +22,25 @@ describe('epicSidebar', () => {
participants,
subscribed,
toggleSubscriptionPath,
todoExists,
todoPath,
todoDeletePath,
} = props;
const defaultPropsData = {
epicId,
endpoint: gl.TEST_HOST,
initialLabels: labels,
initialParticipants: participants,
initialSubscribed: subscribed,
initialTodoExists: todoExists,
updatePath: updateEndpoint,
toggleSubscriptionPath,
labelsPath,
labelsWebUrl,
epicsWebUrl,
todoPath,
todoDeletePath,
};
beforeEach(() => {
......
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