fixtures.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 { IMembers, IOrganizationRole, IOrganization } from 'app/containers/Organizations/types'
  21. import { IProject } from 'app/containers/Projects/types'
  22. import { ProjectDemo } from '../Projects/fixtures'
  23. const memberDemo: IMembers = {
  24. id: 811,
  25. user: {
  26. avatar: '',
  27. email: '',
  28. id: 1,
  29. role: 0,
  30. username: 'shan'
  31. }
  32. }
  33. const orgDemo: IOrganization = {
  34. id: 1,
  35. name: 'string',
  36. avatar: '',
  37. description: ''
  38. }
  39. const roleDemo: IOrganizationRole = {
  40. id: 1,
  41. name: 'roleName',
  42. description: 'desc'
  43. }
  44. interface ImockStore {
  45. orgId: number
  46. memberId: number
  47. project: IProject
  48. projects: IProject[]
  49. orgProjects: {
  50. list: IProject[]
  51. }
  52. member: IMembers
  53. members: IMembers[]
  54. role: IOrganizationRole
  55. roles: IOrganizationRole[]
  56. organization: IOrganization
  57. organizations: IOrganization[]
  58. resolve: () => void
  59. }
  60. export const mockStore: ImockStore = {
  61. orgId: 1,
  62. memberId: 1,
  63. project: ProjectDemo,
  64. projects: [ProjectDemo],
  65. member: memberDemo,
  66. members: [memberDemo],
  67. role: roleDemo,
  68. roles: [roleDemo],
  69. organization: orgDemo,
  70. organizations: [orgDemo],
  71. orgProjects: {
  72. list: [ProjectDemo]
  73. },
  74. resolve: () => void 0
  75. }