fixtures.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * <<
  3. * Davinci
  4. * ==
  5. * Copyright (C) 2016 - 2017 EDP
  6. * ==
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. * >>
  19. */
  20. import {
  21. JobType,
  22. IUserInfo,
  23. ISchedule,
  24. JobStatus
  25. } from 'app/containers/Schedule/components/types'
  26. import { IDashboard } from 'app/containers/Dashboard/types'
  27. interface ImockStore {
  28. schedule: ISchedule
  29. projectId: number
  30. schedules: ISchedule[]
  31. scheduleId: number
  32. resolve: () => void
  33. jobType: JobType
  34. mails: IUserInfo[]
  35. keywords: string
  36. jobStatus: JobStatus
  37. dashboard: IDashboard
  38. api: string
  39. }
  40. const scheduleDemo: ISchedule = {
  41. id: 1,
  42. name: 'scheduleName',
  43. description: 'desc',
  44. projectId: 2,
  45. startDate: '',
  46. endDate: '',
  47. cronExpression: '',
  48. jobStatus: 'new',
  49. jobType: 'email',
  50. execLog: '',
  51. config: {
  52. webHookUrl: 'string',
  53. type: 'string',
  54. imageWidth: 1,
  55. contentList: [],
  56. setCronExpressionManually: false
  57. }
  58. }
  59. export const mockStore: ImockStore = {
  60. schedule: scheduleDemo,
  61. projectId: 1,
  62. schedules: [scheduleDemo],
  63. jobStatus: scheduleDemo.jobStatus,
  64. scheduleId: 2,
  65. keywords: 'keywords',
  66. resolve: () => void 0,
  67. jobType: 'email',
  68. mails: [
  69. {
  70. id: 1,
  71. username: '',
  72. email: '',
  73. avatar: ''
  74. }
  75. ],
  76. dashboard: {
  77. id: 1,
  78. name: 'string',
  79. parentId: 1,
  80. index: 1,
  81. dashboardPortalId: 1,
  82. type: 0,
  83. config: {
  84. filters: [],
  85. linkages: [],
  86. queryMode: 0
  87. }
  88. },
  89. api: '/api/v3/protal/projectId'
  90. }