ApiKeysPage.test.tsx.snap 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. <div
  37. className="page-container page-body"
  38. >
  39. <EmptyListCTA
  40. model={
  41. Object {
  42. "buttonIcon": "fa fa-plus",
  43. "buttonLink": "#",
  44. "buttonTitle": " New API Key",
  45. "onClick": [Function],
  46. "proTip": "Remember you can provide view-only API access to other applications.",
  47. "proTipLink": "",
  48. "proTipLinkTitle": "",
  49. "proTipTarget": "_blank",
  50. "title": "You haven't added any API Keys yet.",
  51. }
  52. }
  53. />
  54. <Component
  55. in={false}
  56. >
  57. <div
  58. className="cta-form"
  59. >
  60. <button
  61. className="cta-form__close btn btn-transparent"
  62. onClick={[Function]}
  63. >
  64. <i
  65. className="fa fa-close"
  66. />
  67. </button>
  68. <h5>
  69. Add API Key
  70. </h5>
  71. <form
  72. className="gf-form-group"
  73. onSubmit={[Function]}
  74. >
  75. <div
  76. className="gf-form-inline"
  77. >
  78. <div
  79. className="gf-form max-width-21"
  80. >
  81. <span
  82. className="gf-form-label"
  83. >
  84. Key name
  85. </span>
  86. <input
  87. className="gf-form-input"
  88. onChange={[Function]}
  89. placeholder="Name"
  90. type="text"
  91. value=""
  92. />
  93. </div>
  94. <div
  95. className="gf-form"
  96. >
  97. <span
  98. className="gf-form-label"
  99. >
  100. Role
  101. </span>
  102. <span
  103. className="gf-form-select-wrapper"
  104. >
  105. <select
  106. className="gf-form-input gf-size-auto"
  107. onChange={[Function]}
  108. value="Viewer"
  109. >
  110. <option
  111. key="Viewer"
  112. label="Viewer"
  113. value="Viewer"
  114. >
  115. Viewer
  116. </option>
  117. <option
  118. key="Editor"
  119. label="Editor"
  120. value="Editor"
  121. >
  122. Editor
  123. </option>
  124. <option
  125. key="Admin"
  126. label="Admin"
  127. value="Admin"
  128. >
  129. Admin
  130. </option>
  131. </select>
  132. </span>
  133. </div>
  134. <div
  135. className="gf-form"
  136. >
  137. <button
  138. className="btn gf-form-btn btn-success"
  139. >
  140. Add
  141. </button>
  142. </div>
  143. </div>
  144. </form>
  145. </div>
  146. </Component>
  147. </div>
  148. </PageContents>
  149. </Page>
  150. `;