ApiKeysPage.test.tsx.snap 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`Render should render API keys table if there are any keys 1`] = `
  3. <Page
  4. navModel={
  5. Object {
  6. "main": Object {
  7. "text": "Configuration",
  8. },
  9. "node": Object {
  10. "text": "Api Keys",
  11. },
  12. }
  13. }
  14. >
  15. <PageContents
  16. isLoading={true}
  17. />
  18. </Page>
  19. `;
  20. exports[`Render should render CTA if there are no API keys 1`] = `
  21. <Page
  22. navModel={
  23. Object {
  24. "main": Object {
  25. "text": "Configuration",
  26. },
  27. "node": Object {
  28. "text": "Api Keys",
  29. },
  30. }
  31. }
  32. >
  33. <PageContents
  34. isLoading={false}
  35. >
  36. <EmptyListCTA
  37. model={
  38. Object {
  39. "buttonIcon": "gicon gicon-apikeys",
  40. "buttonLink": "#",
  41. "buttonTitle": " New API Key",
  42. "onClick": [Function],
  43. "proTip": "Remember you can provide view-only API access to other applications.",
  44. "proTipLink": "",
  45. "proTipLinkTitle": "",
  46. "proTipTarget": "_blank",
  47. "title": "You haven't added any API Keys yet.",
  48. }
  49. }
  50. />
  51. <Component
  52. in={false}
  53. >
  54. <div
  55. className="cta-form"
  56. >
  57. <button
  58. className="cta-form__close btn btn-transparent"
  59. onClick={[Function]}
  60. >
  61. <i
  62. className="fa fa-close"
  63. />
  64. </button>
  65. <h5>
  66. Add API Key
  67. </h5>
  68. <form
  69. className="gf-form-group"
  70. onSubmit={[Function]}
  71. >
  72. <div
  73. className="gf-form-inline"
  74. >
  75. <div
  76. className="gf-form max-width-21"
  77. >
  78. <span
  79. className="gf-form-label"
  80. >
  81. Key name
  82. </span>
  83. <Input
  84. className="gf-form-input"
  85. onChange={[Function]}
  86. placeholder="Name"
  87. type="text"
  88. value=""
  89. />
  90. </div>
  91. <div
  92. className="gf-form"
  93. >
  94. <span
  95. className="gf-form-label"
  96. >
  97. Role
  98. </span>
  99. <span
  100. className="gf-form-select-wrapper"
  101. >
  102. <select
  103. className="gf-form-input gf-size-auto"
  104. onChange={[Function]}
  105. value="Viewer"
  106. >
  107. <option
  108. key="Viewer"
  109. label="Viewer"
  110. value="Viewer"
  111. >
  112. Viewer
  113. </option>
  114. <option
  115. key="Editor"
  116. label="Editor"
  117. value="Editor"
  118. >
  119. Editor
  120. </option>
  121. <option
  122. key="Admin"
  123. label="Admin"
  124. value="Admin"
  125. >
  126. Admin
  127. </option>
  128. </select>
  129. </span>
  130. </div>
  131. <div
  132. className="gf-form"
  133. >
  134. <button
  135. className="btn gf-form-btn btn-primary"
  136. >
  137. Add
  138. </button>
  139. </div>
  140. </div>
  141. </form>
  142. </div>
  143. </Component>
  144. </PageContents>
  145. </Page>
  146. `;