fixtures.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. IProject,
  22. IStarUser,
  23. IProjectRole
  24. } from 'app/containers/Projects/types'
  25. interface ImockStore {
  26. projectId: number
  27. project: IProject
  28. projects: IProject[]
  29. resolve: () => void
  30. orgId: number
  31. isFavorite: boolean
  32. adminIds: number[]
  33. relationId: number
  34. user: IStarUser
  35. role: IProjectRole
  36. }
  37. export const ProjectDemo: IProject = {
  38. createBy: {
  39. avatar: '',
  40. email: '',
  41. id: 4,
  42. username: ''
  43. },
  44. description: '',
  45. id: 4,
  46. initialOrgId: 4,
  47. isStar: true,
  48. isTransfer: false,
  49. name: 'test',
  50. orgId: 4,
  51. permission: {
  52. downloadPermission: false,
  53. schedulePermission: 0,
  54. sharePermission: false,
  55. sourcePermission: 0,
  56. viewPermission: 0,
  57. vizPermission: 1,
  58. widgetPermission: 0
  59. },
  60. pic: '15',
  61. starNum: 1,
  62. userId: 4,
  63. visibility: true
  64. }
  65. export const mockStore: ImockStore = {
  66. orgId: 1,
  67. projectId: 1000,
  68. projects: [ProjectDemo],
  69. project: ProjectDemo,
  70. resolve: () => void 0,
  71. isFavorite: false,
  72. adminIds: [1, 3],
  73. relationId: 33,
  74. user: {
  75. avatar: '3c-f759-45c6-a3cb-a9b5ed88acfd.png',
  76. email: 'xxxx@xxx.cn',
  77. id: 5,
  78. starTime: '2020-06-04 10:53:39',
  79. username: 'xxxx'
  80. },
  81. role: {
  82. description: 'deving',
  83. id: 7,
  84. name: 'tank'
  85. }
  86. }