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