graphdb-workbench-tests 3.0.2 → 3.1.0-RC1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (268) hide show
  1. package/.editorconfig +17 -0
  2. package/.nycrc +10 -0
  3. package/cypress-flaky.config.js +15 -4
  4. package/cypress-legacy.config.js +40 -0
  5. package/cypress-security.config.js +40 -0
  6. package/cypress.config.js +8 -4
  7. package/{integration-flaky → e2e-flaky}/explore/visual.graph.spec.js +4 -1
  8. package/{integration-flaky → e2e-flaky}/import/import-server-files-operations.spec.js +1 -1
  9. package/e2e-flaky/import/import-user-data-url.spec.js +63 -0
  10. package/{integration-flaky → e2e-flaky}/setup/sparql-template-create.js +9 -2
  11. package/{integration-flaky → e2e-flaky}/sparql-editor/yasr/table-plugin.spec.js +2 -1
  12. package/{integration → e2e-legacy}/cluster/edit-cluster-nodes-modal.spec.js +44 -0
  13. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-with-selected-repository-without-class-hierarchy.spec.js +42 -0
  14. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-with-selected-repository.spec.js +43 -0
  15. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-without-selected-repository.spec.js +30 -0
  16. package/{integration/explore → e2e-legacy/explore/class-hierarchy}/class.hierarchy.spec.js +1 -1
  17. package/e2e-legacy/explore/class-relationships/class-relationships-repository-with-data.spec.js +42 -0
  18. package/e2e-legacy/explore/class-relationships/class-relationships-with-selected-repository.spec.js +39 -0
  19. package/e2e-legacy/explore/class-relationships/class-relationships-without-selected-repository.spec.js +21 -0
  20. package/{integration/explore/class.relationships.spec.js → e2e-legacy/explore/class-relationships/class-relationships.spec.js} +18 -50
  21. package/{integration/explore → e2e-legacy/explore/graphs-overview}/graphs.overview.spec.js +4 -4
  22. package/e2e-legacy/explore/graphs-overview/initial-state/graphs-overview-with-selected-repository.spec.js +44 -0
  23. package/e2e-legacy/explore/graphs-overview/initial-state/graphs-overview-without-selected-repository.spec.js +32 -0
  24. package/e2e-legacy/explore/similarity-index/similarity-index-with-repository.spec.js +38 -0
  25. package/e2e-legacy/explore/similarity-index/similarity-index-without-repository.spec.js +21 -0
  26. package/{integration → e2e-legacy}/explore/visual-graph/graphs-config.spec.js +1 -6
  27. package/e2e-legacy/explore/visual-graph/visual-graph-with-selected-repository.js +38 -0
  28. package/e2e-legacy/explore/visual-graph/visual-graph-without-selected-repository.js +21 -0
  29. package/{integration → e2e-legacy}/explore/visual-graph/visual.graph.spec.js +2 -7
  30. package/{integration → e2e-legacy}/graphql/create-graphql-endpoint.spec.js +0 -2
  31. package/{integration → e2e-legacy}/graphql/edit-graphql-enpoint.spec.js +1 -1
  32. package/{integration → e2e-legacy}/graphql/filter-graphql-endpoints-on-management-view.spec.js +1 -1
  33. package/e2e-legacy/graphql/graphql-endpoint management-without-selected-repository.spec.js +21 -0
  34. package/{integration → e2e-legacy}/graphql/graphql-endpoint-management-view.spec.js +4 -4
  35. package/e2e-legacy/graphql/graphql-endpoint-management-with-endpoints.spec.js +43 -0
  36. package/e2e-legacy/graphql/graphql-endpoint-management-with-selected-repository.spec.jsx +39 -0
  37. package/e2e-legacy/graphql/graphql-playground-with-endpoints.spec.js +40 -0
  38. package/e2e-legacy/graphql/graphql-playground-with-selected-repository.spec.js +38 -0
  39. package/e2e-legacy/graphql/graphql-playground-without-selected-repository.spec.js +22 -0
  40. package/{integration → e2e-legacy}/graphql/graphql-playground.spec.js +1 -1
  41. package/{integration → e2e-legacy}/graphql/import-graphql-endpoint-definitions.spec.js +0 -6
  42. package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
  43. package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
  44. package/{integration → e2e-legacy/help}/guides/movies-interactive-guide.spec.js +3 -3
  45. package/{integration → e2e-legacy/help}/guides/star-wars-interactive-guide.js +3 -2
  46. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
  47. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
  48. package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
  49. package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
  50. package/e2e-legacy/home/cookie-policy.spec.js +108 -0
  51. package/e2e-legacy/home/documentation-link.spec.js +61 -0
  52. package/{integration → e2e-legacy}/home/google-analytics.spec.js +4 -6
  53. package/e2e-legacy/home/home-page-with-selected-repository.spec.js +69 -0
  54. package/e2e-legacy/home/home-page-without-repositories.spec.js +87 -0
  55. package/e2e-legacy/home/home-page-without-selected-repository.spec.js +59 -0
  56. package/{integration → e2e-legacy}/home/language-change.spec.js +2 -2
  57. package/e2e-legacy/home/rdf-resource-search.spec.js +148 -0
  58. package/e2e-legacy/home/view-resource-autocomplete.spec.js +65 -0
  59. package/{integration → e2e-legacy}/import/import-user-data-file-upload.spec.js +16 -10
  60. package/{integration → e2e-legacy}/import/import-user-data-text-snippet.spec.js +0 -2
  61. package/{integration → e2e-legacy}/import/import-user-data-url.spec.js +0 -23
  62. package/{integration → e2e-legacy}/import/import-user-data.spec.js +9 -2
  63. package/e2e-legacy/import/initial-state/import-page-with-selected-repositor.js +51 -0
  64. package/e2e-legacy/import/initial-state/import-page-with-selected-repository-without-imported-files.js +45 -0
  65. package/e2e-legacy/import/initial-state/import-page-without-selected-repository.spec.js +28 -0
  66. package/e2e-legacy/license/license-with-repository.spec.js +113 -0
  67. package/e2e-legacy/license/license-without-repository.spec.js +103 -0
  68. package/{integration → e2e-legacy}/license/license.spec.js +4 -4
  69. package/e2e-legacy/monitor/backup-and-restore/backup-and-restore-with-repository.spec.js +36 -0
  70. package/e2e-legacy/monitor/backup-and-restore/backup-and-restore-without-repository.spec.js +25 -0
  71. package/{integration/monitor/monitor.backup-and-restore.spec.js → e2e-legacy/monitor/backup-and-restore/backup-and-restore.spec.js} +2 -2
  72. package/{integration → e2e-legacy}/monitor/global-operation-statuses-component.spec.js +12 -5
  73. package/e2e-legacy/monitor/query-and-updates/queries-and-updates-with-repository.spec.js +39 -0
  74. package/e2e-legacy/monitor/query-and-updates/queries-and-updates-without-repository.spec.js +21 -0
  75. package/{integration/monitor → e2e-legacy/monitor/system}/monitor.resources.spec.js +3 -2
  76. package/e2e-legacy/monitor/system/system-monitoring-with-repository.spec.js +32 -0
  77. package/e2e-legacy/monitor/system/system-monitoring-without-repository.spec.js +20 -0
  78. package/{integration → e2e-legacy}/repository/repositories.spec.js +34 -45
  79. package/{integration → e2e-legacy}/resource/resource.spec.js +16 -1
  80. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +40 -0
  81. package/e2e-legacy/setup/aclmanagement/acl-management-without-repositories.spec.js +21 -0
  82. package/{integration → e2e-legacy}/setup/aclmanagement/create-rule.spec.js +1 -0
  83. package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
  84. package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
  85. package/{integration/setup → e2e-legacy/setup/autocomplete}/autocomplete.spec.js +5 -6
  86. package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
  87. package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
  88. package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +41 -0
  89. package/e2e-legacy/setup/connectors/connectors-initial-state-without-repositories.spec.js +21 -0
  90. package/e2e-legacy/setup/jdbc/jdbc-with-repository.spec.js +39 -0
  91. package/e2e-legacy/setup/jdbc/jdbc-without-repository.spec.js +27 -0
  92. package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
  93. package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
  94. package/{integration/setup → e2e-legacy/setup/namespaces}/namespaces.spec.js +6 -5
  95. package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
  96. package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
  97. package/{integration/setup → e2e-legacy/setup/plugins}/plugins.spec.js +3 -3
  98. package/e2e-legacy/setup/rdf-rank/rdf-rank-with-repository.spec.js +40 -0
  99. package/e2e-legacy/setup/rdf-rank/rdf-rank-without-repository.spec.js +30 -0
  100. package/{integration/setup → e2e-legacy/setup/rdf-rank}/rdf-rank.spec.js +1 -1
  101. package/e2e-legacy/setup/repositories/repositories-view-with-repositories.spec.js +40 -0
  102. package/e2e-legacy/setup/repositories/repositories-view-without-repositories.spec.js +28 -0
  103. package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +86 -0
  104. package/{integration/setup → e2e-legacy/setup/settings}/my-settings.spec.js +5 -75
  105. package/{integration/setup → e2e-legacy/setup/sparql-template}/sparql-template-create.js +16 -8
  106. package/e2e-legacy/setup/sparql-template/sparql-template-with-repository.spec.js +39 -0
  107. package/e2e-legacy/setup/sparql-template/sparql-template-without-repository.spec.js +29 -0
  108. package/{integration/setup → e2e-legacy/setup/sparql-template}/sparql-templates.spec.js +4 -4
  109. package/{integration/setup → e2e-legacy/setup/users-and-access}/user-and-access.spec.js +53 -19
  110. package/e2e-legacy/setup/users-and-access/users-and-access-initial-state.spec.js +25 -0
  111. package/{integration → e2e-legacy}/sparql-editor/actions/inferred-sameas.spec.js +3 -1
  112. package/{integration → e2e-legacy}/sparql-editor/saved-query/edit-query.spec.js +3 -3
  113. package/{integration → e2e-legacy}/sparql-editor/saved-query/readonly-query.spec.js +7 -13
  114. package/{integration → e2e-legacy}/sparql-editor/saved-query/share-query.spec.js +2 -0
  115. package/e2e-legacy/sparql-editor/sparql-page-with-selected-repository.spec.js +33 -0
  116. package/e2e-legacy/sparql-editor/sparql-page-without-selected-repository.spec.js +26 -0
  117. package/{integration → e2e-legacy}/ttyg/agent-list.spec.js +52 -0
  118. package/{integration → e2e-legacy}/ttyg/agent-select-menu.spec.js +24 -0
  119. package/{integration → e2e-legacy}/ttyg/chat-panel.spec.js +29 -3
  120. package/{integration → e2e-legacy}/ttyg/clone-agent.spec.js +1 -0
  121. package/{integration → e2e-legacy}/ttyg/create-agent.spec.js +7 -6
  122. package/{integration → e2e-legacy}/ttyg/create-chat.spec.js +3 -1
  123. package/e2e-legacy/ttyg/edit-agent.spec.js +169 -0
  124. package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
  125. package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +45 -0
  126. package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
  127. package/{integration-flaky → e2e-legacy}/ttyg/ttyg-permission.spec.js +25 -15
  128. package/{integration → e2e-legacy}/ttyg/ttyg-view.spec.js +1 -0
  129. package/e2e-security/setup/home/cookie-policy.spec.js +64 -0
  130. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +184 -0
  131. package/e2e-security/setup/users-and-access/graphql-user.spec.js +123 -0
  132. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +69 -0
  133. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +87 -0
  134. package/e2e-security/setup/users-and-access/user-and-access.spec.js +87 -0
  135. package/e2e-security/setup/users-and-access/users-and-access-initial-state.spec.js +38 -0
  136. package/fixtures/locale-en.json +62 -19
  137. package/fixtures/repositories/free-access.json +13 -0
  138. package/fixtures/ttyg/agent/get-agent-defaults-assistant-api.json +44 -0
  139. package/fixtures/ttyg/agent/get-agent-defaults.json +2 -0
  140. package/fixtures/ttyg/agent/get-agent-list-with-incompatible-agents.json +79 -0
  141. package/fixtures/ttyg/chats/ask-question.json +12 -2
  142. package/fixtures/ttyg/chats/get-chat.json +6 -1
  143. package/npm-shrinkwrap.json +9356 -3815
  144. package/package.json +48 -42
  145. package/plugins/index.js +3 -2
  146. package/steps/application-steps.js +1 -1
  147. package/steps/base-steps.js +21 -0
  148. package/steps/class-views-steps.js +16 -0
  149. package/steps/cluster/cluster-page-steps.js +12 -2
  150. package/steps/error-steps.js +15 -3
  151. package/steps/explore/class-relationships-steps.js +64 -0
  152. package/steps/explore/graphs-overview-steps.js +21 -1
  153. package/steps/explore/similarity-indexes-steps.js +12 -2
  154. package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
  155. package/steps/guides/guide-steps.js +20 -1
  156. package/steps/home-steps.js +158 -48
  157. package/steps/import/import-steps.js +11 -15
  158. package/steps/import/import-user-data-steps.js +4 -0
  159. package/steps/language-selector-steps.js +2 -2
  160. package/steps/license-steps.js +91 -9
  161. package/steps/login-steps.js +14 -3
  162. package/steps/main-menu-steps.js +207 -15
  163. package/steps/modal-dialog-steps.js +20 -0
  164. package/steps/monitoring/backup-and-restore-steps.js +9 -3
  165. package/steps/monitoring/queries-and-updates-steps.js +20 -0
  166. package/steps/monitoring/system-monitoring-steps.js +40 -0
  167. package/steps/operations-statuses-component-steps.js +5 -10
  168. package/steps/rdf-resource-search-steps.js +55 -0
  169. package/steps/repository-selector-steps.js +3 -3
  170. package/steps/repository-steps.js +18 -12
  171. package/steps/resource/resource-steps.js +4 -0
  172. package/steps/rest-api-documentation-steps.js +15 -0
  173. package/steps/setup/autocomplete-steps.js +17 -6
  174. package/steps/setup/connectors-steps.js +19 -0
  175. package/steps/setup/jdbc-steps.js +18 -4
  176. package/steps/setup/namespace-steps.js +9 -6
  177. package/steps/setup/plugins-steps.js +11 -4
  178. package/steps/setup/rdf-rank-steps.js +22 -4
  179. package/steps/setup/settings-steps.js +100 -1
  180. package/steps/setup/sparql-templates-steps.js +19 -1
  181. package/steps/setup/user-and-access-steps.js +33 -3
  182. package/steps/system-information-steps.js +70 -0
  183. package/steps/ttyg/chat-panel-steps.js +1 -1
  184. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +82 -23
  185. package/steps/ttyg/ttyg-view-steps.js +74 -8
  186. package/steps/visual-graph-steps.js +4 -0
  187. package/steps/widgets/active-repository-widget-steps.js +29 -0
  188. package/steps/widgets/license-widget-steps.js +9 -0
  189. package/steps/widgets/repository-errors-widget-steps.js +21 -0
  190. package/steps/widgets/saved-sparql-queries-widget-steps.js +9 -0
  191. package/steps/yasgui/yasr-steps.js +4 -0
  192. package/stubs/autocomplete/autocomplete-stubs.js +7 -0
  193. package/stubs/browser-stubs.js +21 -0
  194. package/stubs/environment-stubs.js +9 -1
  195. package/stubs/license-stubs.js +51 -0
  196. package/stubs/repositories/repositories-stubs.js +8 -0
  197. package/stubs/repositories-stub.js +6 -6
  198. package/stubs/saved-queries-stubs.js +5 -0
  199. package/stubs/security-stubs.js +4 -0
  200. package/stubs/ttyg/ttyg-stubs.js +19 -6
  201. package/support/commands.js +19 -0
  202. package/support/{index.js → e2e.js} +2 -1
  203. package/support/repository-commands.js +20 -4
  204. package/Dockerfile +0 -11
  205. package/integration/explore/similarity-index/similarity-index-create.spec.js +0 -333
  206. package/integration/explore/similarity-index/similarity-index.spec.js +0 -88
  207. package/integration/explore/similarity-index/similarity.spec.js +0 -628
  208. package/integration/home/cookie-policy.spec.js +0 -90
  209. package/integration/home/documentation-link.spec.js +0 -60
  210. package/integration/home/language-selector.spec.js +0 -19
  211. package/integration/home/rdf-resource-search.spec.js +0 -177
  212. package/integration/home/view-resource-autocomplete.spec.js +0 -52
  213. package/integration/home/workbench.home.spec.js +0 -30
  214. package/integration/monitor/monitor.queries.spec.js +0 -31
  215. package/integration/ttyg/edit-agent.spec.js +0 -99
  216. package/integration-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -54
  217. package/{integration-flaky → e2e-flaky}/import/import-user-data-batch-operations.spec.js +0 -0
  218. package/{integration-flaky → e2e-flaky}/import/import.server.files.spec.js +0 -0
  219. package/{integration-flaky → e2e-flaky}/sparql-editor/actions/execute-update-query.spec.js +0 -0
  220. package/{integration-flaky → e2e-flaky}/sparql-editor/actions/share-query.spec.js +0 -0
  221. package/{integration-flaky → e2e-flaky}/sparql-editor/lucene-connector.spec.js +0 -0
  222. package/{integration-flaky → e2e-flaky}/sparql-editor/plugins/error-plugin.spec.js +0 -0
  223. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +0 -0
  224. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +0 -0
  225. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-properties.spec.js +0 -0
  226. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration.spec.js +0 -0
  227. package/{integration → e2e-legacy}/cluster/cluster-legend.spec.js +0 -0
  228. package/{integration → e2e-legacy}/cluster/cluster-states.spec.js +0 -0
  229. package/{integration → e2e-legacy}/explore/visual-graph/visual-graph-node-labels.spec.js +0 -0
  230. package/{integration → e2e-legacy}/graphql/activate-deactivate-graphql-endpoint.spec.js +0 -0
  231. package/{integration → e2e-legacy}/graphql/delete-graphql-endpoint.spec.js +0 -0
  232. package/{integration → e2e-legacy}/graphql/export-graphql-endpoint-definition.spec.js +0 -0
  233. package/{integration → e2e-legacy}/graphql/set-default-graphql-endpoint.spec.js +0 -0
  234. package/{integration/help → e2e-legacy/help/system-information}/system-information.spec.js +0 -0
  235. package/{integration → e2e-legacy}/home/create-repository.spec.js +0 -0
  236. package/{integration → e2e-legacy}/import/import-server-files-batch-operations.spec.js +0 -0
  237. package/{integration → e2e-legacy}/import/import-server-files.spec.js +0 -0
  238. package/{integration → e2e-legacy}/import/import-user-data-settings-dialog.spec.js +0 -0
  239. package/{integration → e2e-legacy}/import/import-view.spec.js +0 -0
  240. package/{integration → e2e-legacy}/repository/attach-remote-location.spec.js +1 -1
  241. /package/{integration → e2e-legacy}/repository/ontop-repository.spec.js +0 -0
  242. /package/{integration → e2e-legacy}/repository/repository-commands.spec.js +0 -0
  243. /package/{integration → e2e-legacy}/setup/aclmanagement/delete-rule.spec.js +0 -0
  244. /package/{integration → e2e-legacy}/setup/aclmanagement/edit-rule.spec.js +0 -0
  245. /package/{integration → e2e-legacy}/setup/aclmanagement/render-rules.spec.js +0 -0
  246. /package/{integration → e2e-legacy}/setup/aclmanagement/reorder-rules.spec.js +0 -0
  247. /package/{integration → e2e-legacy}/setup/aclmanagement/revert-rules.spec.js +0 -0
  248. /package/{integration → e2e-legacy}/setup/aclmanagement/scopes.spec.js +0 -0
  249. /package/{integration → e2e-legacy}/setup/aclmanagement/update-rules.spec.js +0 -0
  250. /package/{integration → e2e-legacy}/setup/connectors-lucene.spec.js +0 -0
  251. /package/{integration → e2e-legacy}/setup/jdbc/jdbc-create.spec.js +0 -0
  252. /package/{integration → e2e-legacy}/setup/jdbc/jdbc.spec.js +0 -0
  253. /package/{integration → e2e-legacy}/sparql-editor/actions/execute-query.spec.js +0 -0
  254. /package/{integration → e2e-legacy}/sparql-editor/actions/expand-results-over-sameas.spec.js +0 -0
  255. /package/{integration → e2e-legacy}/sparql-editor/actions/include-inferred-statements.spec.js +0 -0
  256. /package/{integration → e2e-legacy}/sparql-editor/actions/save-query.spec.js +0 -0
  257. /package/{integration → e2e-legacy}/sparql-editor/actions/show-saved-queries.spec.js +0 -0
  258. /package/{integration → e2e-legacy}/sparql-editor/internationalization.spec.js +0 -0
  259. /package/{integration → e2e-legacy}/sparql-editor/saved-query/abort-query.spec.js +0 -0
  260. /package/{integration → e2e-legacy}/sparql-editor/saved-query/delete-query.spec.js +0 -0
  261. /package/{integration → e2e-legacy}/sparql-editor/sparql-editor.spec.js +0 -0
  262. /package/{integration → e2e-legacy}/sparql-editor/yasgui-tabs.spec.js +0 -0
  263. /package/{integration → e2e-legacy}/sparql-editor/yasr/download-as.spec.js +0 -0
  264. /package/{integration → e2e-legacy}/sparql-editor/yasr/pagination.spec.js +0 -0
  265. /package/{integration → e2e-legacy}/sparql-editor/yasr/table-plugin.spec.js +0 -0
  266. /package/{integration → e2e-legacy}/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +0 -0
  267. /package/{integration → e2e-legacy}/ttyg/chat-list.spec.js +0 -0
  268. /package/{integration → e2e-legacy}/ttyg/delete-agent.spec.js +0 -0
@@ -1,90 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
- import {EnvironmentStubs} from "../../stubs/environment-stubs";
3
- import {SecurityStubs} from "../../stubs/security-stubs";
4
- import {SettingsSteps} from "../../steps/setup/settings-steps";
5
- import {LicenseStubs} from "../../stubs/license-stubs";
6
-
7
- Cypress.env('set_default_user_data', false);
8
-
9
- describe('Cookie policy', () => {
10
- beforeEach(() => {
11
- cy.setDefaultUserData(false);
12
- cy.viewport(1280, 1000);
13
- LicenseStubs.stubFreeLicense();
14
- });
15
-
16
- afterEach(() => cy.setDefaultUserData());
17
-
18
- it('Should show consent popup to user', () => {
19
- HomeSteps.visit();
20
- EnvironmentStubs.stubWbProdMode();
21
- HomeSteps.getCookieConsentPopup().should('exist').and('be.visible');
22
- // When I click on the link
23
- HomeSteps.clickCookiePolicyLink();
24
- // Then I see the cookie policy
25
- HomeSteps.getCookiePolicyModal().should('exist').and('be.visible');
26
- });
27
-
28
- it('Should show cookie policy to user in user settings', () => {
29
- SettingsSteps.visit();
30
- EnvironmentStubs.stubWbProdMode();
31
- SettingsSteps.getCookiePolicyButton().should('exist').and('be.visible');
32
-
33
- // When I click on the link
34
- SettingsSteps.clickCookiePolicyLink();
35
- // Then I see the cookie policy
36
- SettingsSteps.getCookiePolicyModal().should('exist').and('be.visible');
37
- });
38
-
39
- it('Should NOT show consent popup to user when tracking is not applicable', () => {
40
- HomeSteps.visit();
41
- HomeSteps.getCookieConsentPopup().should('not.exist');
42
- });
43
-
44
- it('Should NOT show cookie policy to user when tracking is not applicable', {
45
- retries: {
46
- runMode: 1,
47
- openMode: 0
48
- }
49
- }, () => {
50
- SettingsSteps.visit();
51
- SettingsSteps.getCookiePolicyButton().should('not.exist');
52
- });
53
-
54
- it('Should save consent in user settings', () => {
55
- HomeSteps.visit();
56
- EnvironmentStubs.stubWbProdMode();
57
- SecurityStubs.stubUpdateUserData('admin');
58
-
59
- // When I click Agree button
60
- HomeSteps.clickAgreeButton();
61
-
62
- // I expect to save cookie consent in user settings
63
- cy.wait('@updateUser').then((xhr) => {
64
- expect(xhr.request.body.appSettings).to.include({
65
- DEFAULT_INFERENCE: true,
66
- DEFAULT_VIS_GRAPH_SCHEMA: true,
67
- DEFAULT_SAMEAS: true,
68
- IGNORE_SHARED_QUERIES: false,
69
- EXECUTE_COUNT: true
70
- });
71
-
72
- // Assert COOKIE_CONSENT properties, excluding updatedAt
73
- expect(xhr.request.body.appSettings.COOKIE_CONSENT).to.include({
74
- policyAccepted: true,
75
- statistic: true,
76
- thirdParty: true
77
- });
78
-
79
- // Assert that updatedAt is present, is a number, and is a reasonable timestamp
80
- const updatedAt = xhr.request.body.appSettings.COOKIE_CONSENT.updatedAt;
81
- expect(updatedAt).to.exist;
82
- expect(updatedAt).to.be.a('number');
83
-
84
- // Check that updatedAt is within 1 hour of the current time
85
- const oneHourInMilliseconds = 60 * 60 * 1000;
86
- const now = Date.now();
87
- expect(updatedAt).to.be.within(now - oneHourInMilliseconds, now + oneHourInMilliseconds);
88
- });
89
- });
90
- });
@@ -1,60 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
- import {EnvironmentStubs} from "../../stubs/environment-stubs";
3
-
4
- describe('Documentation links resolver', () => {
5
-
6
- beforeEach(() => {
7
- cy.viewport(1280, 1000);
8
- });
9
-
10
- it('Should link to master version when in dev mode', () => {
11
- HomeSteps.visit();
12
- EnvironmentStubs.stubWbDevMode();
13
- HomeSteps.clickHelpMenu();
14
- // Assert that links point to the master version
15
- assertDocumentationLinks('master');
16
- });
17
-
18
- it('Should link to master version when in prod mode and unofficial version', () => {
19
- EnvironmentStubs.stubProductInfo('10.8-TR1-test');
20
- HomeSteps.visit();
21
- EnvironmentStubs.stubWbProdMode();
22
- HomeSteps.clickHelpMenu();
23
- // Assert that links point to the master version
24
- assertDocumentationLinks('master');
25
- });
26
-
27
- it('Should link to GDB version when in prod mode and official version', () => {
28
- EnvironmentStubs.stubProductInfo('10.8');
29
- HomeSteps.visit();
30
- EnvironmentStubs.stubWbProdMode();
31
- HomeSteps.clickHelpMenu();
32
- // Assert that links point to the specific GDB version
33
- assertDocumentationLinks('10.8');
34
- });
35
- });
36
-
37
- function assertDocumentationLinks(version) {
38
- const baseUrl = `https://graphdb.ontotext.com/documentation/${version}`;
39
-
40
- HomeSteps.getDocumentationLink()
41
- .should('exist')
42
- .and('be.visible')
43
- .find('a')
44
- .should('have.attr', 'href', `${baseUrl}/index.html`)
45
- .and('contain.text', 'Documentation');
46
-
47
- HomeSteps.getTutorialsLink()
48
- .should('exist')
49
- .and('be.visible')
50
- .find('a')
51
- .should('have.attr', 'href', `${baseUrl}/tutorials.html`)
52
- .and('contain.text', 'Tutorials');
53
-
54
- HomeSteps.getSupportLink()
55
- .should('exist')
56
- .and('be.visible')
57
- .find('a')
58
- .should('have.attr', 'href', `${baseUrl}/support.html`)
59
- .and('contain.text', 'Support');
60
- }
@@ -1,19 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
-
3
- describe('Language selector', () => {
4
-
5
- beforeEach(() => {
6
- cy.viewport(1280, 1000);
7
- HomeSteps.visitAndWaitLoader();
8
- });
9
-
10
- it('Should be able to change the language', () => {
11
- cy.get('#languageGroupDrop')
12
- .should('be.visible')
13
- .click()
14
- .then(() => {
15
- cy.get('.dropdown-menu .dropdown-item')
16
- .should('have.length.at.least', 1);
17
- });
18
- });
19
- });
@@ -1,177 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
-
3
- const FILE_TO_IMPORT = 'wine.rdf';
4
-
5
- describe('RDF resource search', () => {
6
- let repositoryId;
7
- beforeEach(() => {
8
- cy.viewport(1280, 1000);
9
- repositoryId = '23repo' + Date.now();
10
- cy.createRepository({id: repositoryId});
11
- cy.initializeRepository(repositoryId);
12
- cy.enableAutocomplete(repositoryId);
13
- });
14
-
15
- afterEach(() => {
16
- cy.deleteRepository(repositoryId);
17
- });
18
-
19
- it('Search button should not be present when no repo is selected', () => {
20
- HomeSteps.visitAndWaitLoader();
21
- // Given the page has loaded the license label (otherwise locally test passes after the loader disappears and before other elements are rendered)
22
- HomeSteps.getLicenseAsLabel().should('be.visible');
23
- cy.get('.search-rdf-btn').should('not.exist');
24
- cy.get('.search-rdf-input').should('not.exist');
25
- });
26
-
27
- it('Search should be made from home page search when repo is set and on home page', () => {
28
- // When I visit home page with selected repository
29
- cy.presetRepository(repositoryId);
30
- HomeSteps.visitAndWaitLoader();
31
- // Search rdf button should be visible
32
- cy.get('.search-rdf-btn').should('be.visible');
33
- // When I click the button
34
- HomeSteps.doNotOpenRdfSearchBoxButFocusResourceSearch();
35
- // I should be able to type some text in the input on home page
36
- cy.get('#search-resource-input-home > #search-resource-box > input').type('hasPos');
37
- // And the autocomplete dropdown should become visible
38
- cy.get('#search-resource-input-home > #auto-complete-results-wrapper').should('be.visible');
39
- // // When I click the close button
40
- cy.get('#search-resource-input-home > #search-resource-box > .clear-icon').click();
41
- // // The input should be cleared
42
- cy.get('#search-resource-input-home > #search-resource-box > input').should('have.value', '');
43
- });
44
-
45
- it('Search should be present when repo is set', () => {
46
- // When I visit not home page with selected repository
47
- cy.presetRepository(repositoryId);
48
- cy.visit('/graphs');
49
- cy.get('.ot-splash').should('not.be.visible');
50
- cy.get('.ot-loader-new-content').should('not.exist');
51
- // Search rdf button should be visible
52
- cy.get('.search-rdf-btn').should('be.visible');
53
- // When I click the button
54
- HomeSteps.openRdfSearchBox();
55
- // I should be able to type some text in the input
56
- cy.get('.search-rdf-input search-resource-input .view-res-input').type('hasPos');
57
- // And the autocomplete dropdown should become visible
58
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
59
- // When I click the close button
60
- cy.get('.close-rdf-search-btn').click();
61
- // The input should not be cleared
62
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
63
- // And the search bar should hide and not be visible
64
- cy.get('.search-rdf-input').should('not.be.visible');
65
- // And the suggestions list should not be visible
66
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('not.be.visible');
67
- // And the search button should be visible
68
- cy.get('.search-rdf-btn').should('be.visible');
69
- // When I open again the search box
70
- HomeSteps.openRdfSearchBox();
71
- // The input should have value 'hasPos'
72
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
73
- // And dropdown should be visible
74
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
75
- // When I press 'escape'
76
- cy.get('.search-rdf-input search-resource-input .view-res-input').type('{esc}');
77
- // Search box should not be visible
78
- cy.get('.search-rdf-input').should('not.be.visible');
79
- });
80
-
81
- it('Search should be persisted on page reload', () => {
82
- // Given I've selected a repository and visit the page
83
- cy.presetRepository(repositoryId);
84
- cy.visit('/graphs', {
85
- onBeforeLoad(win) {
86
- cy.stub(win, 'open').as('window.open');
87
- }
88
- });
89
- cy.get('.ot-splash').should('not.be.visible');
90
- cy.get('.ot-loader-new-content').should('not.exist');
91
- // Search rdf button should be visible
92
- cy.get('.search-rdf-btn').should('be.visible');
93
- // When I click the button
94
- HomeSteps.openRdfSearchBox();
95
- // I should be able to type some text in the input
96
- cy.get('.search-rdf-input search-resource-input .view-res-input')
97
- .type('hasPos').then(() => {
98
- // When I select option from suggestions
99
- cy.get(".search-rdf-input #auto-complete-results-wrapper p")
100
- .contains('hasPos')
101
- .click()
102
- .then(() => {
103
- // Search result should be opened in new window
104
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
105
- });
106
- });
107
-
108
- // When I revisit the home page
109
- cy.visit('/graphs');
110
- // When I open again the search box
111
- HomeSteps.openRdfSearchBox();
112
- // The input should have value 'hasPos' from previous search
113
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
114
- // And dropdown should be visible
115
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
116
- // When I press 'escape'
117
- cy.get('.search-rdf-input search-resource-input .view-res-input')
118
- .type('{esc}')
119
- .then(() => {
120
- // Search box should not be visible
121
- cy.get('.search-rdf-input').should('not.be.visible');
122
- });
123
- });
124
-
125
- it('Should test RDF resource search box', () => {
126
- //Prepare repository and import data.
127
- cy.presetRepository(repositoryId);
128
- cy.importServerFile(repositoryId, FILE_TO_IMPORT);
129
- HomeSteps.visitAndWaitLoader();
130
-
131
- //Verify that the main resource search box is focused
132
- getRDFResourceSearchBox().click();
133
- cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...');
134
-
135
- //Navigate away from the Homepage, to be able to test the new resource search box
136
- cy.visit('/graphs', {
137
- onBeforeLoad(win) {
138
- cy.stub(win, 'open').as('window.open');
139
- }
140
- });
141
-
142
- cy.get('.ot-splash').should('not.be.visible');
143
- cy.get('.ot-loader-new-content').should('not.exist');
144
-
145
- getRDFResourceSearchBox().click();
146
- //Verify that the new resource search box is focused
147
- cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...');
148
-
149
- //Verify autocomplete suggestions count
150
- cy.focused().then(() => {
151
- cy.get('#search-resource-box input')
152
- .should('be.visible')
153
- .type('Dry');
154
- cy.get('#auto-complete-results-wrapper')
155
- .should('be.visible')
156
- .children()
157
- .should('have.length', 7);
158
- });
159
-
160
- //Test table and visual buttons.
161
- cy.get("#auto_0").should('be.visible').click();
162
- // Search result should be opened in new window
163
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
164
-
165
- getVisualButton().click();
166
- cy.get("#auto_0").should('be.visible').click();
167
- cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
168
- });
169
- });
170
-
171
- function getRDFResourceSearchBox() {
172
- return cy.get('rdf-resource-search').should('be.visible');
173
- }
174
-
175
- function getVisualButton() {
176
- return cy.get('.display-type-visual-btn').should('be.visible');
177
- }
@@ -1,52 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
-
3
- describe('View resource autocomplete', () => {
4
-
5
- const FOAT_SNIPPET = '@base <http://example.org/> .\n' +
6
- '@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n' +
7
- '<#green-goblin>\n' +
8
- 'a foaf:Person ; # in the context of the Marvel universe\n' +
9
- 'foaf:name "Green Goblin" .\n';
10
- const GOBLIN_URI = 'http://example.org/#green-goblin';
11
-
12
- beforeEach(() => {
13
- cy.viewport(1280, 1000);
14
- });
15
-
16
- it('Test homepage autocomplete when it is enabled', () => {
17
- const repositoryId = HomeSteps.createRepo();
18
- HomeSteps.selectRepo(repositoryId);
19
-
20
- // Type an invalid resource
21
- HomeSteps.getAutocompleteInput().type('hfsafa');
22
- HomeSteps.noAutocompleteToast();
23
-
24
- cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
25
- cy.enableAutocomplete(repositoryId);
26
-
27
- HomeSteps.visitAndWaitLoader(true).then((el) => el)
28
- .then(() => HomeSteps.getAutocompleteDisplayTypeButton('table').click())
29
- .then(() => HomeSteps.autocompleteText('Green', GOBLIN_URI))
30
- .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
31
- .then(() => // Search result should be opened in new window
32
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
33
- .then(() => HomeSteps.getAutocompleteDisplayTypeButton('visual').click())
34
- .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
35
- .then(() => // Search result should be opened in new window
36
- cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
37
- cy.deleteRepository(repositoryId);
38
- });
39
-
40
- it('should not suggest resources in "View resources" when autocomplete is not enabled', () => {
41
- const repositoryId = HomeSteps.createRepo();
42
- cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
43
-
44
- HomeSteps.visitAndWaitLoader();
45
- HomeSteps.selectRepo(repositoryId);
46
-
47
- HomeSteps.getAutocompleteInput().type('Green');
48
- HomeSteps.noAutocompleteToast();
49
-
50
- cy.deleteRepository(repositoryId);
51
- });
52
- });
@@ -1,30 +0,0 @@
1
- import HomeSteps from '../../steps/home-steps';
2
-
3
- describe('Home screen validation', () => {
4
-
5
- beforeEach(() => {
6
- cy.viewport(1280, 1000);
7
- HomeSteps.visitAndWaitLoader();
8
- });
9
-
10
- context('First visit', () => {
11
- it('Verify that tutorial panel exists', () => {
12
- HomeSteps.verifyTutorialVisible(true);
13
- });
14
-
15
- it('Test tutorial text', () => {
16
- HomeSteps.verifyTutorialText(0, 'Welcome to GraphDB');
17
- HomeSteps.verifyTutorialText(1, 'Create a repository');
18
- HomeSteps.verifyTutorialText(2, 'Load a sample dataset');
19
- HomeSteps.verifyTutorialText(3, 'Run a SPARQL query');
20
- HomeSteps.verifyTutorialText(4, 'REST API');
21
- });
22
-
23
- it('Verify that tutorial panel disappears if "No, thanks button" is clicked', () => {
24
- // Verify that tutorial panel is still visible
25
- HomeSteps.verifyTutorialVisible(true);
26
- HomeSteps.declineTutorial();
27
- HomeSteps.verifyTutorialVisible(false);
28
- });
29
- });
30
- });
@@ -1,31 +0,0 @@
1
- describe('Monitor Queries', () => {
2
-
3
- let repositoryId;
4
-
5
- before(() => {
6
- repositoryId = 'monitoring-repo' + Date.now();
7
- cy.createRepository({id: repositoryId});
8
- });
9
-
10
- beforeEach(() => {
11
- cy.presetRepository(repositoryId);
12
-
13
- cy.visit('/monitor/queries');
14
- cy.window();
15
-
16
- // Wait for loaders to disappear
17
- cy.get('.ot-splash').should('not.be.visible');
18
- cy.get('.ot-loader').should('not.be.visible');
19
- });
20
-
21
- after(() => {
22
- cy.deleteRepository(repositoryId);
23
- });
24
-
25
- it('Initial state ', () => {
26
- cy.get('.no-running-queries-alert')
27
- .should('be.visible')
28
- .and('contain', 'No running queries or updates.');
29
- cy.get('.pause-btn').should('be.visible');
30
- });
31
- });
@@ -1,99 +0,0 @@
1
- import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
2
- import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
3
- import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
4
- import {TtygAgentSettingsModalSteps} from "../../steps/ttyg/ttyg-agent-settings-modal.steps";
5
- import {ToasterSteps} from "../../steps/toaster-steps";
6
- import {RepositoriesStub} from "../../stubs/repositories-stub";
7
-
8
- describe('TTYG edit an agent', () => {
9
- const repositoryId = 'starwars';
10
-
11
- beforeEach(() => {
12
- RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
13
- RepositoriesStub.stubBaseEndpoints(repositoryId);
14
- cy.presetRepository(repositoryId);
15
- TTYGStubs.stubAgentDefaultsGet();
16
- });
17
-
18
- it(' should be able to edit an agent.', {
19
- retries: {
20
- runMode: 1,
21
- openMode: 0
22
- }
23
- }, () => {
24
- TTYGStubs.stubChatsListGet();
25
- TTYGStubs.stubAgentListGet();
26
- TTYGStubs.stubChatGet();
27
- // Given I have opened the ttyg page
28
- TTYGViewSteps.visit();
29
- cy.wait('@get-chat-list');
30
- cy.wait('@get-agent-list');
31
- cy.wait('@get-chat');
32
- // When I select an agent that don't have activated additional extraction method
33
- TTYGViewSteps.expandAgentsSidebar();
34
- TTYGViewSteps.openAgentsMenu();
35
- TTYGViewSteps.selectAgent(0);
36
- TTYGViewSteps.editCurrentAgent();
37
-
38
- // Then I expect that the iri discovery checkbox is not checked
39
- TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('not.be.checked');
40
-
41
- // When I check the iri discovery checkbox
42
- TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
43
-
44
- // and save the agent.
45
- TTYGStubs.stubAgentEdit();
46
- TtygAgentSettingsModalSteps.saveAgent();
47
- cy.wait('@edit-agent');
48
- // Then I expect the agent to be saved
49
- ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
50
- TTYGViewSteps.editCurrentAgent();
51
- TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('be.checked');
52
- });
53
-
54
-
55
- it.skip('should be able to edit Autocomplete extraction method option', {
56
- retries: {
57
- runMode: 1,
58
- openMode: 0
59
- }
60
- }, () => {
61
- TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-autocomplete-query.json');
62
- TTYGStubs.stubAutocompleteResponse();
63
- // Given I have opened the ttyg page
64
- TTYGViewSteps.visit();
65
- cy.wait('@get-agent-list');
66
- // When I select an agent that don't have activated additional extraction method
67
- TTYGViewSteps.expandAgentsSidebar();
68
- TTYGViewSteps.openAgentsMenu();
69
- TTYGViewSteps.selectAgent(0);
70
- TTYGViewSteps.editCurrentAgent();
71
-
72
- // Then I expect that the autocomplete iri discovery checkbox is not checked
73
- TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('not.be.checked');
74
-
75
- // When I check the autocomplete iri discovery checkbox
76
- TtygAgentSettingsModalSteps.checkAutocompleteSearchCheckbox();
77
-
78
- // Then I can set a value for the max results
79
- TtygAgentSettingsModalSteps.setAutocompleteMaxResults(2);
80
-
81
- // Then I can select predicates with the autocomplete
82
- TtygAgentSettingsModalSteps.enterSearchPredicate('rest');
83
- cy.wait('@autocomplete-suggestions');
84
- TtygAgentSettingsModalSteps.selectAutocompleteOption(3);
85
-
86
- // When I save the agent
87
- TTYGStubs.stubAgentEdit();
88
- TtygAgentSettingsModalSteps.saveAgent();
89
- cy.wait('@edit-agent');
90
- // Then I expect the agent to be saved
91
- ToasterSteps.verifySuccess('The agent \'Test autocomplete extraction agent\' was saved successfully.');
92
- TTYGViewSteps.editCurrentAgent();
93
- TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('be.checked');
94
- TtygAgentSettingsModalSteps.toggleAutocompleteSearchPanel();
95
- TtygAgentSettingsModalSteps.getAutocompleteMaxResults().should('have.value', '2');
96
- TtygAgentSettingsModalSteps.getSearchPredicateTags().should('have.length', '1');
97
- TtygAgentSettingsModalSteps.getSearchPredicateTags().should('contain.text', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#rest');
98
- });
99
- });
@@ -1,54 +0,0 @@
1
- import {UserAndAccessSteps} from "../../../steps/setup/user-and-access-steps";
2
- import {RepositoriesStubs} from "../../../stubs/repositories/repositories-stubs";
3
- import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
4
- import {ToasterSteps} from "../../../steps/toaster-steps";
5
- import {LoginSteps} from "../../../steps/login-steps";
6
-
7
- const DEFAULT_ADMIN_PASSWORD = "root";
8
- // Moved out of the standard test suite, because Cypress can't verify Free Access is ON in CI
9
- describe('Security and Free Access', () => {
10
- beforeEach(() => {
11
- UserAndAccessSteps.visit();
12
- cy.window();
13
- // Users table should be visible
14
- UserAndAccessSteps.getUsersTable().should('be.visible');
15
- });
16
-
17
- afterEach(() => {
18
- UserAndAccessSteps.visit();
19
- UserAndAccessSteps.getToggleSecurityCheckbox()
20
- .then(($toggle) => {
21
- if ($toggle.prop('checked')) {
22
- // Uncheck the security toggle button at the end of each test, if it is checked
23
- UserAndAccessSteps.toggleSecurity();
24
- }
25
- });
26
- });
27
-
28
- it('should toggle free access after Admin has logged in', () => {
29
- // Given I have available repositories to allow Free Access for
30
- RepositoriesStubs.stubRepositories();
31
- // When I enable security
32
- UserAndAccessSteps.toggleSecurity();
33
- // When I log in as an Admin
34
- LoginSteps.loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
35
- // Then the page should load
36
- UserAndAccessSteps.getSplashLoader().should('not.be.visible');
37
- UserAndAccessSteps.getUsersTable().should('be.visible');
38
- // The Free Access toggle should be OFF
39
- UserAndAccessSteps.getFreeAccessSwitchInput().should('not.be.checked');
40
- // When I toggle Free Access ON
41
- UserAndAccessSteps.toggleFreeAccess();
42
- // Then I click OK in the modal
43
- ModalDialogSteps.clickOKButton();
44
- // Then the toggle button should be ON
45
- UserAndAccessSteps.getFreeAccessSwitchInput().should('be.checked');
46
- // And I should see a success message
47
- ToasterSteps.verifySuccess('Free access has been enabled.');
48
- UserAndAccessSteps.getUsersTable().should('be.visible');
49
- // When I toggle Free Access OFF
50
- UserAndAccessSteps.toggleFreeAccess();
51
- // Then I should see a success message
52
- ToasterSteps.verifySuccess('Free access has been disabled.');
53
- });
54
- });