ApiKeysPage.test.tsx.snap 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. buttonIcon="gicon gicon-apikeys"
  38. buttonLink="#"
  39. buttonTitle=" New API Key"
  40. onClick={[Function]}
  41. proTip="Remember you can provide view-only API access to other applications."
  42. title="You haven't added any API Keys yet."
  43. />
  44. <Component
  45. in={false}
  46. >
  47. <div
  48. className="cta-form"
  49. >
  50. <button
  51. className="cta-form__close btn btn-transparent"
  52. onClick={[Function]}
  53. >
  54. <i
  55. className="fa fa-close"
  56. />
  57. </button>
  58. <h5>
  59. Add API Key
  60. </h5>
  61. <form
  62. className="gf-form-group"
  63. onSubmit={[Function]}
  64. >
  65. <div
  66. className="gf-form-inline"
  67. >
  68. <div
  69. className="gf-form max-width-21"
  70. >
  71. <span
  72. className="gf-form-label"
  73. >
  74. Key name
  75. </span>
  76. <Input
  77. className="gf-form-input"
  78. onChange={[Function]}
  79. placeholder="Name"
  80. type="text"
  81. value=""
  82. />
  83. </div>
  84. <div
  85. className="gf-form"
  86. >
  87. <span
  88. className="gf-form-label"
  89. >
  90. Role
  91. </span>
  92. <span
  93. className="gf-form-select-wrapper"
  94. >
  95. <select
  96. className="gf-form-input gf-size-auto"
  97. onChange={[Function]}
  98. value="Viewer"
  99. >
  100. <option
  101. key="Viewer"
  102. label="Viewer"
  103. value="Viewer"
  104. >
  105. Viewer
  106. </option>
  107. <option
  108. key="Editor"
  109. label="Editor"
  110. value="Editor"
  111. >
  112. Editor
  113. </option>
  114. <option
  115. key="Admin"
  116. label="Admin"
  117. value="Admin"
  118. >
  119. Admin
  120. </option>
  121. </select>
  122. </span>
  123. </div>
  124. <div
  125. className="gf-form max-width-21"
  126. >
  127. <Component
  128. tooltip="The api key life duration. For example 1d if your key is going to last for one day. All the supported units are: s,m,h,d,w,M,y"
  129. >
  130. Time to live
  131. </Component>
  132. <Input
  133. className="gf-form-input"
  134. onChange={[Function]}
  135. placeholder="1d"
  136. type="text"
  137. validationEvents={
  138. Object {
  139. "onBlur": Array [
  140. Object {
  141. "errorMessage": "Not a valid duration",
  142. "rule": [Function],
  143. },
  144. ],
  145. }
  146. }
  147. value=""
  148. />
  149. </div>
  150. <div
  151. className="gf-form"
  152. >
  153. <button
  154. className="btn gf-form-btn btn-primary"
  155. >
  156. Add
  157. </button>
  158. </div>
  159. </div>
  160. </form>
  161. </div>
  162. </Component>
  163. </PageContents>
  164. </Page>
  165. `;