graphdb-workbench-tests 3.0.2 → 3.1.0-TR2

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 (252) hide show
  1. package/.editorconfig +17 -0
  2. package/cypress-flaky.config.js +15 -4
  3. package/cypress-legacy.config.js +32 -0
  4. package/cypress.config.js +8 -4
  5. package/{integration-flaky → e2e-flaky}/explore/visual.graph.spec.js +4 -1
  6. package/{integration-flaky → e2e-flaky}/import/import-server-files-operations.spec.js +1 -1
  7. package/{integration-flaky → e2e-flaky}/setup/sparql-template-create.js +9 -2
  8. package/{integration-flaky → e2e-flaky}/sparql-editor/yasr/table-plugin.spec.js +2 -1
  9. package/{integration → e2e-legacy}/cluster/edit-cluster-nodes-modal.spec.js +44 -0
  10. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-with-selected-repository-without-class-hierarchy.spec.js +42 -0
  11. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-with-selected-repository.spec.js +43 -0
  12. package/e2e-legacy/explore/class-hierarchy/class-hierarchy-without-selected-repository.spec.js +30 -0
  13. package/{integration/explore → e2e-legacy/explore/class-hierarchy}/class.hierarchy.spec.js +1 -1
  14. package/e2e-legacy/explore/class-relationships/class-relationships-repository-with-data.spec.js +42 -0
  15. package/e2e-legacy/explore/class-relationships/class-relationships-with-selected-repository.spec.js +39 -0
  16. package/e2e-legacy/explore/class-relationships/class-relationships-without-selected-repository.spec.js +21 -0
  17. package/{integration/explore/class.relationships.spec.js → e2e-legacy/explore/class-relationships/class-relationships.spec.js} +18 -50
  18. package/{integration/explore → e2e-legacy/explore/graphs-overview}/graphs.overview.spec.js +3 -3
  19. package/e2e-legacy/explore/graphs-overview/initial-state/graphs-overview-with-selected-repository.spec.js +44 -0
  20. package/e2e-legacy/explore/graphs-overview/initial-state/graphs-overview-without-selected-repository.spec.js +32 -0
  21. package/e2e-legacy/explore/similarity-index/similarity-index-with-repository.spec.js +38 -0
  22. package/e2e-legacy/explore/similarity-index/similarity-index-without-repository.spec.js +21 -0
  23. package/{integration → e2e-legacy}/explore/visual-graph/graphs-config.spec.js +1 -6
  24. package/e2e-legacy/explore/visual-graph/visual-graph-with-selected-repository.js +38 -0
  25. package/e2e-legacy/explore/visual-graph/visual-graph-without-selected-repository.js +21 -0
  26. package/{integration → e2e-legacy}/explore/visual-graph/visual.graph.spec.js +2 -7
  27. package/{integration → e2e-legacy}/graphql/create-graphql-endpoint.spec.js +0 -2
  28. package/{integration → e2e-legacy}/graphql/edit-graphql-enpoint.spec.js +1 -1
  29. package/{integration → e2e-legacy}/graphql/filter-graphql-endpoints-on-management-view.spec.js +1 -1
  30. package/e2e-legacy/graphql/graphql-endpoint management-without-selected-repository.spec.js +21 -0
  31. package/{integration → e2e-legacy}/graphql/graphql-endpoint-management-view.spec.js +4 -4
  32. package/e2e-legacy/graphql/graphql-endpoint-management-with-endpoints.spec.js +43 -0
  33. package/e2e-legacy/graphql/graphql-endpoint-management-with-selected-repository.spec.jsx +39 -0
  34. package/e2e-legacy/graphql/graphql-playground-with-endpoints.spec.js +40 -0
  35. package/e2e-legacy/graphql/graphql-playground-with-selected-repository.spec.js +38 -0
  36. package/e2e-legacy/graphql/graphql-playground-without-selected-repository.spec.js +22 -0
  37. package/{integration → e2e-legacy}/graphql/graphql-playground.spec.js +1 -1
  38. package/{integration → e2e-legacy}/graphql/import-graphql-endpoint-definitions.spec.js +4 -7
  39. package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
  40. package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
  41. package/{integration → e2e-legacy/help}/guides/movies-interactive-guide.spec.js +3 -3
  42. package/{integration → e2e-legacy/help}/guides/star-wars-interactive-guide.js +3 -2
  43. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
  44. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
  45. package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
  46. package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
  47. package/{integration → e2e-legacy}/home/cookie-policy.spec.js +6 -7
  48. package/{integration → e2e-legacy}/home/documentation-link.spec.js +27 -23
  49. package/e2e-legacy/home/home-page-with-selected-repository.spec.js +69 -0
  50. package/e2e-legacy/home/home-page-without-repositories.spec.js +87 -0
  51. package/e2e-legacy/home/home-page-without-selected-repository.spec.js +59 -0
  52. package/{integration → e2e-legacy}/home/language-change.spec.js +2 -2
  53. package/e2e-legacy/home/rdf-resource-search.spec.js +149 -0
  54. package/e2e-legacy/home/view-resource-autocomplete.spec.js +65 -0
  55. package/{integration → e2e-legacy}/import/import-user-data-file-upload.spec.js +16 -10
  56. package/{integration → e2e-legacy}/import/import-user-data-text-snippet.spec.js +0 -2
  57. package/{integration → e2e-legacy}/import/import-user-data.spec.js +9 -2
  58. package/e2e-legacy/import/initial-state/import-page-with-selected-repositor.js +51 -0
  59. package/e2e-legacy/import/initial-state/import-page-with-selected-repository-without-imported-files.js +45 -0
  60. package/e2e-legacy/import/initial-state/import-page-without-selected-repository.spec.js +28 -0
  61. package/e2e-legacy/license/license-with-repository.spec.js +113 -0
  62. package/e2e-legacy/license/license-without-repository.spec.js +103 -0
  63. package/{integration → e2e-legacy}/license/license.spec.js +4 -4
  64. package/e2e-legacy/monitor/backup-and-restore/backup-and-restore-with-repository.spec.js +36 -0
  65. package/e2e-legacy/monitor/backup-and-restore/backup-and-restore-without-repository.spec.js +25 -0
  66. package/{integration/monitor/monitor.backup-and-restore.spec.js → e2e-legacy/monitor/backup-and-restore/backup-and-restore.spec.js} +2 -2
  67. package/{integration → e2e-legacy}/monitor/global-operation-statuses-component.spec.js +12 -5
  68. package/e2e-legacy/monitor/query-and-updates/queries-and-updates-with-repository.spec.js +39 -0
  69. package/e2e-legacy/monitor/query-and-updates/queries-and-updates-without-repository.spec.js +21 -0
  70. package/{integration/monitor → e2e-legacy/monitor/system}/monitor.resources.spec.js +3 -2
  71. package/e2e-legacy/monitor/system/system-monitoring-with-repository.spec.js +32 -0
  72. package/e2e-legacy/monitor/system/system-monitoring-without-repository.spec.js +20 -0
  73. package/{integration → e2e-legacy}/repository/repositories.spec.js +34 -45
  74. package/{integration → e2e-legacy}/resource/resource.spec.js +16 -1
  75. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +40 -0
  76. package/e2e-legacy/setup/aclmanagement/acl-management-without-repositories.spec.js +21 -0
  77. package/{integration → e2e-legacy}/setup/aclmanagement/create-rule.spec.js +1 -0
  78. package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
  79. package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
  80. package/{integration/setup → e2e-legacy/setup/autocomplete}/autocomplete.spec.js +2 -2
  81. package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
  82. package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
  83. package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +41 -0
  84. package/e2e-legacy/setup/connectors/connectors-initial-state-without-repositories.spec.js +21 -0
  85. package/e2e-legacy/setup/jdbc/jdbc-with-repository.spec.js +39 -0
  86. package/e2e-legacy/setup/jdbc/jdbc-without-repository.spec.js +27 -0
  87. package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
  88. package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
  89. package/{integration/setup → e2e-legacy/setup/namespaces}/namespaces.spec.js +6 -5
  90. package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
  91. package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
  92. package/{integration/setup → e2e-legacy/setup/plugins}/plugins.spec.js +3 -3
  93. package/e2e-legacy/setup/rdf-rank/rdf-rank-with-repository.spec.js +40 -0
  94. package/e2e-legacy/setup/rdf-rank/rdf-rank-without-repository.spec.js +30 -0
  95. package/{integration/setup → e2e-legacy/setup/rdf-rank}/rdf-rank.spec.js +1 -1
  96. package/e2e-legacy/setup/repositories/repositories-view-with-repositories.spec.js +40 -0
  97. package/e2e-legacy/setup/repositories/repositories-view-without-repositories.spec.js +28 -0
  98. package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +86 -0
  99. package/{integration/setup → e2e-legacy/setup/settings}/my-settings.spec.js +5 -75
  100. package/{integration/setup → e2e-legacy/setup/sparql-template}/sparql-template-create.js +16 -8
  101. package/e2e-legacy/setup/sparql-template/sparql-template-with-repository.spec.js +39 -0
  102. package/e2e-legacy/setup/sparql-template/sparql-template-without-repository.spec.js +29 -0
  103. package/{integration/setup → e2e-legacy/setup/sparql-template}/sparql-templates.spec.js +4 -4
  104. package/{integration/setup → e2e-legacy/setup/users-and-access}/user-and-access.spec.js +50 -15
  105. package/e2e-legacy/setup/users-and-access/users-and-access-initial-state.spec.js +25 -0
  106. package/{integration → e2e-legacy}/sparql-editor/actions/inferred-sameas.spec.js +3 -1
  107. package/{integration → e2e-legacy}/sparql-editor/saved-query/edit-query.spec.js +3 -3
  108. package/{integration → e2e-legacy}/sparql-editor/saved-query/readonly-query.spec.js +7 -13
  109. package/{integration → e2e-legacy}/sparql-editor/saved-query/share-query.spec.js +3 -1
  110. package/e2e-legacy/sparql-editor/sparql-page-with-selected-repository.spec.js +33 -0
  111. package/e2e-legacy/sparql-editor/sparql-page-without-selected-repository.spec.js +26 -0
  112. package/{integration → e2e-legacy}/ttyg/agent-list.spec.js +20 -0
  113. package/{integration → e2e-legacy}/ttyg/agent-select-menu.spec.js +24 -0
  114. package/{integration → e2e-legacy}/ttyg/chat-panel.spec.js +29 -3
  115. package/{integration → e2e-legacy}/ttyg/create-chat.spec.js +3 -1
  116. package/{integration → e2e-legacy}/ttyg/edit-agent.spec.js +19 -9
  117. package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
  118. package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +43 -0
  119. package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
  120. package/e2e-legacy/ttyg/ttyg-permission.spec.js +66 -0
  121. package/{integration → e2e-legacy}/ttyg/ttyg-view.spec.js +1 -0
  122. package/fixtures/locale-en.json +22 -4
  123. package/fixtures/repositories/free-access.json +13 -0
  124. package/fixtures/ttyg/agent/get-agent-list-with-incompatible-agents.json +79 -0
  125. package/fixtures/ttyg/chats/ask-question.json +12 -2
  126. package/fixtures/ttyg/chats/get-chat.json +6 -1
  127. package/npm-shrinkwrap.json +3557 -3815
  128. package/package.json +42 -42
  129. package/plugins/index.js +2 -2
  130. package/steps/application-steps.js +1 -1
  131. package/steps/base-steps.js +21 -0
  132. package/steps/class-views-steps.js +16 -0
  133. package/steps/cluster/cluster-page-steps.js +12 -2
  134. package/steps/error-steps.js +15 -0
  135. package/steps/explore/class-relationships-steps.js +64 -0
  136. package/steps/explore/graphs-overview-steps.js +21 -1
  137. package/steps/explore/similarity-indexes-steps.js +12 -2
  138. package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
  139. package/steps/guides/guide-steps.js +20 -1
  140. package/steps/home-steps.js +137 -48
  141. package/steps/import/import-steps.js +11 -15
  142. package/steps/import/import-user-data-steps.js +4 -0
  143. package/steps/language-selector-steps.js +2 -2
  144. package/steps/license-steps.js +91 -9
  145. package/steps/login-steps.js +3 -3
  146. package/steps/main-menu-steps.js +198 -13
  147. package/steps/modal-dialog-steps.js +20 -0
  148. package/steps/monitoring/backup-and-restore-steps.js +9 -3
  149. package/steps/monitoring/queries-and-updates-steps.js +20 -0
  150. package/steps/monitoring/system-monitoring-steps.js +40 -0
  151. package/steps/operations-statuses-component-steps.js +5 -10
  152. package/steps/rdf-resource-search-steps.js +55 -0
  153. package/steps/repository-selector-steps.js +3 -3
  154. package/steps/repository-steps.js +17 -12
  155. package/steps/resource/resource-steps.js +4 -0
  156. package/steps/rest-api-documentation-steps.js +15 -0
  157. package/steps/setup/autocomplete-steps.js +13 -6
  158. package/steps/setup/connectors-steps.js +19 -0
  159. package/steps/setup/jdbc-steps.js +18 -4
  160. package/steps/setup/namespace-steps.js +9 -6
  161. package/steps/setup/plugins-steps.js +11 -4
  162. package/steps/setup/rdf-rank-steps.js +22 -4
  163. package/steps/setup/settings-steps.js +82 -1
  164. package/steps/setup/sparql-templates-steps.js +19 -1
  165. package/steps/setup/user-and-access-steps.js +9 -1
  166. package/steps/system-information-steps.js +70 -0
  167. package/steps/ttyg/chat-panel-steps.js +1 -1
  168. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +8 -12
  169. package/steps/ttyg/ttyg-view-steps.js +59 -8
  170. package/steps/visual-graph-steps.js +4 -0
  171. package/steps/widgets/active-repository-widget-steps.js +25 -0
  172. package/steps/widgets/license-widget-steps.js +9 -0
  173. package/steps/widgets/repository-errors-widget-steps.js +21 -0
  174. package/steps/widgets/saved-sparql-queries-widget-steps.js +9 -0
  175. package/stubs/autocomplete/autocomplete-stubs.js +7 -0
  176. package/stubs/browser-stubs.js +31 -0
  177. package/stubs/environment-stubs.js +9 -1
  178. package/stubs/license-stubs.js +51 -0
  179. package/stubs/repositories/repositories-stubs.js +8 -0
  180. package/stubs/repositories-stub.js +6 -6
  181. package/stubs/saved-queries-stubs.js +5 -0
  182. package/stubs/ttyg/ttyg-stubs.js +4 -7
  183. package/support/commands.js +19 -0
  184. package/support/repository-commands.js +20 -4
  185. package/Dockerfile +0 -11
  186. package/integration/explore/similarity-index/similarity-index-create.spec.js +0 -333
  187. package/integration/explore/similarity-index/similarity-index.spec.js +0 -88
  188. package/integration/explore/similarity-index/similarity.spec.js +0 -628
  189. package/integration/home/language-selector.spec.js +0 -19
  190. package/integration/home/rdf-resource-search.spec.js +0 -177
  191. package/integration/home/view-resource-autocomplete.spec.js +0 -52
  192. package/integration/home/workbench.home.spec.js +0 -30
  193. package/integration/monitor/monitor.queries.spec.js +0 -31
  194. package/integration-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -54
  195. package/{integration-flaky → e2e-flaky}/import/import-user-data-batch-operations.spec.js +0 -0
  196. package/{integration-flaky → e2e-flaky}/import/import.server.files.spec.js +0 -0
  197. package/{integration-flaky → e2e-flaky}/sparql-editor/actions/execute-update-query.spec.js +0 -0
  198. package/{integration-flaky → e2e-flaky}/sparql-editor/actions/share-query.spec.js +0 -0
  199. package/{integration-flaky → e2e-flaky}/sparql-editor/lucene-connector.spec.js +0 -0
  200. package/{integration-flaky → e2e-flaky}/sparql-editor/plugins/error-plugin.spec.js +0 -0
  201. package/{integration-flaky → e2e-flaky}/ttyg/ttyg-permission.spec.js +0 -0
  202. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +0 -0
  203. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +0 -0
  204. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration-properties.spec.js +0 -0
  205. package/{integration → e2e-legacy}/cluster/cluster-configuration/cluster-configuration.spec.js +0 -0
  206. package/{integration → e2e-legacy}/cluster/cluster-legend.spec.js +0 -0
  207. package/{integration → e2e-legacy}/cluster/cluster-states.spec.js +0 -0
  208. package/{integration → e2e-legacy}/explore/visual-graph/visual-graph-node-labels.spec.js +0 -0
  209. package/{integration → e2e-legacy}/graphql/activate-deactivate-graphql-endpoint.spec.js +0 -0
  210. package/{integration → e2e-legacy}/graphql/delete-graphql-endpoint.spec.js +0 -0
  211. package/{integration → e2e-legacy}/graphql/export-graphql-endpoint-definition.spec.js +0 -0
  212. package/{integration → e2e-legacy}/graphql/set-default-graphql-endpoint.spec.js +0 -0
  213. package/{integration/help → e2e-legacy/help/system-information}/system-information.spec.js +0 -0
  214. package/{integration → e2e-legacy}/home/create-repository.spec.js +0 -0
  215. package/{integration → e2e-legacy}/home/google-analytics.spec.js +0 -0
  216. package/{integration → e2e-legacy}/import/import-server-files-batch-operations.spec.js +0 -0
  217. package/{integration → e2e-legacy}/import/import-server-files.spec.js +0 -0
  218. package/{integration → e2e-legacy}/import/import-user-data-settings-dialog.spec.js +0 -0
  219. package/{integration → e2e-legacy}/import/import-user-data-url.spec.js +0 -0
  220. package/{integration → e2e-legacy}/import/import-view.spec.js +0 -0
  221. package/{integration → e2e-legacy}/repository/attach-remote-location.spec.js +1 -1
  222. /package/{integration → e2e-legacy}/repository/ontop-repository.spec.js +0 -0
  223. /package/{integration → e2e-legacy}/repository/repository-commands.spec.js +0 -0
  224. /package/{integration → e2e-legacy}/setup/aclmanagement/delete-rule.spec.js +0 -0
  225. /package/{integration → e2e-legacy}/setup/aclmanagement/edit-rule.spec.js +0 -0
  226. /package/{integration → e2e-legacy}/setup/aclmanagement/render-rules.spec.js +0 -0
  227. /package/{integration → e2e-legacy}/setup/aclmanagement/reorder-rules.spec.js +0 -0
  228. /package/{integration → e2e-legacy}/setup/aclmanagement/revert-rules.spec.js +0 -0
  229. /package/{integration → e2e-legacy}/setup/aclmanagement/scopes.spec.js +0 -0
  230. /package/{integration → e2e-legacy}/setup/aclmanagement/update-rules.spec.js +0 -0
  231. /package/{integration → e2e-legacy}/setup/connectors-lucene.spec.js +0 -0
  232. /package/{integration → e2e-legacy}/setup/jdbc/jdbc-create.spec.js +0 -0
  233. /package/{integration → e2e-legacy}/setup/jdbc/jdbc.spec.js +0 -0
  234. /package/{integration → e2e-legacy}/sparql-editor/actions/execute-query.spec.js +0 -0
  235. /package/{integration → e2e-legacy}/sparql-editor/actions/expand-results-over-sameas.spec.js +0 -0
  236. /package/{integration → e2e-legacy}/sparql-editor/actions/include-inferred-statements.spec.js +0 -0
  237. /package/{integration → e2e-legacy}/sparql-editor/actions/save-query.spec.js +0 -0
  238. /package/{integration → e2e-legacy}/sparql-editor/actions/show-saved-queries.spec.js +0 -0
  239. /package/{integration → e2e-legacy}/sparql-editor/internationalization.spec.js +0 -0
  240. /package/{integration → e2e-legacy}/sparql-editor/saved-query/abort-query.spec.js +0 -0
  241. /package/{integration → e2e-legacy}/sparql-editor/saved-query/delete-query.spec.js +0 -0
  242. /package/{integration → e2e-legacy}/sparql-editor/sparql-editor.spec.js +0 -0
  243. /package/{integration → e2e-legacy}/sparql-editor/yasgui-tabs.spec.js +0 -0
  244. /package/{integration → e2e-legacy}/sparql-editor/yasr/download-as.spec.js +0 -0
  245. /package/{integration → e2e-legacy}/sparql-editor/yasr/pagination.spec.js +0 -0
  246. /package/{integration → e2e-legacy}/sparql-editor/yasr/table-plugin.spec.js +0 -0
  247. /package/{integration → e2e-legacy}/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +0 -0
  248. /package/{integration → e2e-legacy}/ttyg/chat-list.spec.js +0 -0
  249. /package/{integration → e2e-legacy}/ttyg/clone-agent.spec.js +0 -0
  250. /package/{integration → e2e-legacy}/ttyg/create-agent.spec.js +0 -0
  251. /package/{integration → e2e-legacy}/ttyg/delete-agent.spec.js +0 -0
  252. /package/support/{index.js → e2e.js} +0 -0
@@ -1,10 +1,10 @@
1
- import {SparqlCreateUpdateSteps} from "../../steps/setup/sparql-create-update-steps";
2
- import {YasqeSteps} from "../../steps/yasgui/yasqe-steps";
3
- import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
4
- import {MainMenuSteps} from "../../steps/main-menu-steps";
5
- import {RepositorySelectorSteps} from "../../steps/repository-selector-steps";
6
- import {SparqlTemplatesSteps} from "../../steps/setup/sparql-templates-steps";
7
- import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
1
+ import {SparqlCreateUpdateSteps} from "../../../steps/setup/sparql-create-update-steps";
2
+ import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
3
+ import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
4
+ import {MainMenuSteps} from "../../../steps/main-menu-steps";
5
+ import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
6
+ import {SparqlTemplatesSteps} from "../../../steps/setup/sparql-templates-steps";
7
+ import {ImportUserDataSteps} from "../../../steps/import/import-user-data-steps";
8
8
 
9
9
  describe('SPARQL create template', () => {
10
10
 
@@ -17,15 +17,16 @@ describe('SPARQL create template', () => {
17
17
  cy.presetRepository(repositoryId);
18
18
  secondRepositoryId = 'sparql-templates-second-repo' + Date.now();
19
19
  cy.createRepository({id: secondRepositoryId});
20
- SparqlCreateUpdateSteps.visit();
21
20
  });
22
21
 
23
22
  afterEach(() => {
23
+ cy.unsetRepository();
24
24
  cy.deleteRepository(repositoryId);
25
25
  cy.deleteRepository(secondRepositoryId);
26
26
  });
27
27
 
28
28
  it('should has error message described that template id is required', () => {
29
+ SparqlCreateUpdateSteps.visit();
29
30
  // When I visit 'Sparql create template' view,
30
31
  // and click on "Save" button without to fill template id.
31
32
  SparqlCreateUpdateSteps.clickOnSaveButton();
@@ -35,6 +36,7 @@ describe('SPARQL create template', () => {
35
36
  });
36
37
 
37
38
  it('should has error message described that template id is invalid', () => {
39
+ SparqlCreateUpdateSteps.visit();
38
40
  // When I visit 'Sparql create template' view,
39
41
  // and fill an invalid template id,
40
42
  const invalidTemplateName = 'invalid-template-id';
@@ -47,6 +49,7 @@ describe('SPARQL create template', () => {
47
49
  });
48
50
 
49
51
  it('should has error message described that query mode is invalid', () => {
52
+ SparqlCreateUpdateSteps.visit();
50
53
  // When I visit 'Sparql create template' view,
51
54
  // and fill valid template id.
52
55
  SparqlCreateUpdateSteps.typeTemplateId('http://test');
@@ -62,6 +65,7 @@ describe('SPARQL create template', () => {
62
65
  });
63
66
 
64
67
  it('should navigate to other view if there are no changes', () => {
68
+ SparqlCreateUpdateSteps.visit();
65
69
  // When I visit 'Sparql create template' view,
66
70
  // and navigate to other view.
67
71
  ImportUserDataSteps.visitUserImport(repositoryId);
@@ -71,6 +75,7 @@ describe('SPARQL create template', () => {
71
75
  });
72
76
 
73
77
  it('should confirm me before navigate when template id is changed', () => {
78
+ SparqlCreateUpdateSteps.visit();
74
79
  // When I visit 'Sparql create template' view,
75
80
  // and set template id.
76
81
  SparqlCreateUpdateSteps.typeTemplateId('http://test');
@@ -104,6 +109,7 @@ describe('SPARQL create template', () => {
104
109
  });
105
110
 
106
111
  it('should not change the view if I am creating a new sparql template and change the repository', () => {
112
+ SparqlCreateUpdateSteps.visit();
107
113
  // When I visit 'Sparql create template' view,
108
114
  // make some changes.
109
115
  SparqlCreateUpdateSteps.typeTemplateId('http://test');
@@ -116,6 +122,7 @@ describe('SPARQL create template', () => {
116
122
  });
117
123
 
118
124
  it('Should redirect to templates catalog view when repository is changed', () => {
125
+ SparqlCreateUpdateSteps.visit();
119
126
  // When I visit 'Sparql create template' view
120
127
  // When I change the repository.
121
128
  RepositorySelectorSteps.selectRepository(secondRepositoryId);
@@ -125,6 +132,7 @@ describe('SPARQL create template', () => {
125
132
  });
126
133
 
127
134
  it('should ask for confirmation when try to save sparql template with already existing template id', () => {
135
+ SparqlCreateUpdateSteps.visit();
128
136
  // When I visit 'Sparql create template' view,
129
137
  // create a SPARQL template
130
138
  const templateName = 'http://' + Date.now();
@@ -0,0 +1,39 @@
1
+ import HomeSteps from "../../../steps/home-steps";
2
+ import {MainMenuSteps} from "../../../steps/main-menu-steps";
3
+ import {SparqlTemplatesSteps} from "../../../steps/setup/sparql-templates-steps";
4
+
5
+ describe('Sparql templates with selected repository', () => {
6
+ let repositoryId;
7
+
8
+ beforeEach(() => {
9
+ repositoryId = 'sparql-template-init-' + Date.now();
10
+ cy.createRepository({id: repositoryId});
11
+ cy.presetRepository(repositoryId);
12
+ });
13
+
14
+ afterEach(() => {
15
+ cy.deleteRepository(repositoryId);
16
+ });
17
+
18
+ it('Should display the correct initial state when navigating via URL', () => {
19
+ // Given, I visit the Sparql templates page via URL with a repository selected
20
+ SparqlTemplatesSteps.visit();
21
+ // Then,
22
+ verifyInitialStateWithSelectedRepository();
23
+ });
24
+
25
+ it('Should display the correct initial state when navigating via the navigation bar', () => {
26
+ // Given, I visit the Sparql templates page via the navigation menu with a repository selected
27
+ HomeSteps.visit();
28
+ MainMenuSteps.clickOnSparqlTemplates();
29
+ // Then,
30
+ verifyInitialStateWithSelectedRepository();
31
+ });
32
+
33
+ const verifyInitialStateWithSelectedRepository = () => {
34
+ SparqlTemplatesSteps.getSparqlTemplatesPage().should('exist');
35
+ SparqlTemplatesSteps.getSparqlTemplatesContent().should('be.visible');
36
+ SparqlTemplatesSteps.getSparqlTemplatesCreateLink().should('be.visible');
37
+ SparqlTemplatesSteps.getNoSparqlTemplatesMessage().should('be.visible');
38
+ };
39
+ })
@@ -0,0 +1,29 @@
1
+ import {ErrorSteps} from "../../../steps/error-steps";
2
+ import HomeSteps from "../../../steps/home-steps";
3
+ import {MainMenuSteps} from "../../../steps/main-menu-steps";
4
+ import {SparqlTemplatesSteps} from "../../../steps/setup/sparql-templates-steps";
5
+
6
+ describe('Sparql templates without selected repository', () => {
7
+ it('Should display the correct initial state when navigating via URL', () => {
8
+ // Given, I visit the Sparql templates page via URL without a repository selected
9
+ SparqlTemplatesSteps.visit();
10
+ // Then,
11
+ verifyInitialStateWithoutSelectedRepository();
12
+ });
13
+
14
+ it('Should display the correct initial state when navigating via the navigation menu', () => {
15
+ // Given, I visit the Sparql templates page via the navigation menu without a repository selected
16
+ HomeSteps.visit();
17
+ MainMenuSteps.clickOnSparqlTemplates();
18
+ // Then,
19
+ verifyInitialStateWithoutSelectedRepository()
20
+ });
21
+
22
+ const verifyInitialStateWithoutSelectedRepository = () => {
23
+ ErrorSteps.verifyNoConnectedRepoMessage();
24
+ SparqlTemplatesSteps.getSparqlTemplatesPage().should('exist');
25
+ SparqlTemplatesSteps.getSparqlTemplatesContent().should('not.exist');
26
+ SparqlTemplatesSteps.getSparqlTemplatesCreateLink().should('not.exist');
27
+ SparqlTemplatesSteps.getNoSparqlTemplatesMessage().should('not.exist');
28
+ };
29
+ })
@@ -1,7 +1,7 @@
1
- import {SparqlTemplatesSteps} from "../../steps/setup/sparql-templates-steps";
2
- import {SparqlCreateUpdateSteps} from "../../steps/setup/sparql-create-update-steps";
3
- import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
4
- import {ToasterSteps} from "../../steps/toaster-steps";
1
+ import {SparqlTemplatesSteps} from "../../../steps/setup/sparql-templates-steps";
2
+ import {SparqlCreateUpdateSteps} from "../../../steps/setup/sparql-create-update-steps";
3
+ import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
4
+ import {ToasterSteps} from "../../../steps/toaster-steps";
5
5
 
6
6
  describe('SPARQL Templates', () => {
7
7
 
@@ -1,12 +1,15 @@
1
- import {UserAndAccessSteps} from "../../steps/setup/user-and-access-steps";
2
- import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
3
- import {RepositorySelectorSteps} from "../../steps/repository-selector-steps";
4
- import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
5
- import {ToasterSteps} from "../../steps/toaster-steps";
6
- import HomeSteps from "../../steps/home-steps";
7
- import {LoginSteps} from "../../steps/login-steps";
8
-
9
-
1
+ import {UserAndAccessSteps} from "../../../steps/setup/user-and-access-steps";
2
+ import {RepositoriesStubs} from "../../../stubs/repositories/repositories-stubs";
3
+ import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
4
+ import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
5
+ import {ToasterSteps} from "../../../steps/toaster-steps";
6
+ import HomeSteps from "../../../steps/home-steps";
7
+ import {LoginSteps} from "../../../steps/login-steps";
8
+
9
+
10
+ /**
11
+ * TODO: Fix me. Broken due to migration (Error: unknown)
12
+ */
10
13
  describe('User and Access', () => {
11
14
 
12
15
  const PASSWORD = "password";
@@ -117,6 +120,36 @@ describe('User and Access', () => {
117
120
  UserAndAccessSteps.getUsersTable().should('be.visible');
118
121
  UserAndAccessSteps.getSplashLoader().should('not.be.visible');
119
122
  });
123
+
124
+ it('should toggle free access after Admin has logged in', () => {
125
+ // Given I have available repositories to allow Free Access for
126
+ RepositoriesStubs.stubRepositories();
127
+ RepositoriesStubs.stubFreeAccess();
128
+ // When I enable security
129
+ UserAndAccessSteps.toggleSecurity();
130
+ // When I log in as an Admin
131
+ LoginSteps.loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
132
+ // Then the page should load
133
+ UserAndAccessSteps.getSplashLoader().should('not.be.visible');
134
+ UserAndAccessSteps.getUsersTable().should('be.visible');
135
+ // The Free Access toggle should be OFF
136
+ UserAndAccessSteps.getFreeAccessSwitchInput().should('not.be.checked');
137
+ // When I toggle Free Access ON
138
+ UserAndAccessSteps.toggleFreeAccess();
139
+ // And I allow free access to a repository
140
+ ModalDialogSteps.getDialog().should('be.visible');
141
+ // Then I click OK in the modal
142
+ ModalDialogSteps.clickOKButton();
143
+ // Then the toggle button should be ON
144
+ UserAndAccessSteps.getFreeAccessSwitchInput().should('be.checked');
145
+ // And I should see a success message
146
+ ToasterSteps.verifySuccess('Free access has been enabled.');
147
+ UserAndAccessSteps.getUsersTable().should('be.visible');
148
+ // When I toggle Free Access OFF
149
+ UserAndAccessSteps.toggleFreeAccess();
150
+ // Then I should see a success message
151
+ ToasterSteps.verifySuccess('Free access has been disabled.');
152
+ });
120
153
  })
121
154
 
122
155
  context('GraphQL only', () => {
@@ -156,7 +189,8 @@ describe('User and Access', () => {
156
189
  createUser(graphqlUser, PASSWORD, ROLE_USER, {read: true, graphql: true, repoName: repositoryId2});
157
190
  });
158
191
 
159
- it('Can create user with different auth combinations', () => {
192
+ // Fails for unknown reason only in CI
193
+ it.skip('Can create user with different auth combinations', () => {
160
194
  cy.wait('@getRepositories');
161
195
  // WHEN I create a user with read + GraphQL for repository #2
162
196
  createUser(graphqlUser, PASSWORD, ROLE_USER, {read: true, graphql: true, repoName: repositoryId2});
@@ -197,7 +231,8 @@ describe('User and Access', () => {
197
231
  assertUserAuths(graphqlUser, {repo: repositoryId3, read: false, write: true, graphql: true});
198
232
  });
199
233
 
200
- it('Should have access to 5 pages when have graphql only rights', () => {
234
+ // TODO remove skipped flag from all tests after merge of https://github.com/Ontotext-AD/graphdb-workbench/pull/2042
235
+ it.skip('Should have access to 5 pages when have graphql only rights', () => {
201
236
  cy.wait('@getRepositories');
202
237
  // WHEN I create a user with read + GraphQL for repository #2
203
238
  createUser(graphqlUser, PASSWORD, ROLE_USER, {readWrite: true, graphql: true, repoName: repositoryId1});
@@ -215,7 +250,7 @@ describe('User and Access', () => {
215
250
  });
216
251
  });
217
252
 
218
- it('Should not have access endpoints management when have read graphql only rights', () => {
253
+ it.skip('Should not have access endpoints management when have read graphql only rights', () => {
219
254
  cy.wait('@getRepositories');
220
255
  // WHEN I create a user with read + GraphQL for repository #2
221
256
  createUser(graphqlUser, PASSWORD, ROLE_USER, {read: true, graphql: true, repoName: repositoryId1});
@@ -233,7 +268,7 @@ describe('User and Access', () => {
233
268
  });
234
269
  });
235
270
 
236
- it('Should have all access to endpoints management when have REPO_MANAGER role', () => {
271
+ it.skip('Should have all access to endpoints management when have REPO_MANAGER role', () => {
237
272
  cy.wait('@getRepositories');
238
273
  createUser(graphqlUser, PASSWORD, ROLE_REPO_MANAGER);
239
274
  //enable security
@@ -249,7 +284,7 @@ describe('User and Access', () => {
249
284
  });
250
285
  });
251
286
 
252
- it('Can have Free Access and GraphQL working together', () => {
287
+ it.skip('Can have Free Access and GraphQL working together', () => {
253
288
  cy.wait('@getRepositories');
254
289
  //enable security
255
290
  UserAndAccessSteps.toggleSecurity();
@@ -368,7 +403,7 @@ describe('User and Access', () => {
368
403
  if (isAdmin) {
369
404
  UserAndAccessSteps.getUsersTable().should('be.visible');
370
405
  } else {
371
- UserAndAccessSteps.getError().should('contain',
406
+ UserAndAccessSteps.getPermissionError().should('contain',
372
407
  'You have no permission to access this functionality with your current credentials.');
373
408
  }
374
409
  }
@@ -0,0 +1,25 @@
1
+ import {UserAndAccessSteps} from "../../../steps/setup/user-and-access-steps";
2
+ import {MainMenuSteps} from "../../../steps/main-menu-steps";
3
+
4
+ function validateInitialState() {
5
+ UserAndAccessSteps.getCreateNewUserButton().should('be.visible');
6
+ UserAndAccessSteps.getToggleSecuritySwitch().should('be.visible');
7
+ UserAndAccessSteps.getUsersTable().should('be.visible');
8
+ }
9
+
10
+ describe('Users and Access initial state', () => {
11
+ it('Should display the correct initial state when navigating via URL', () => {
12
+ // Given, I visit the Users and Access page via URL
13
+ UserAndAccessSteps.visit();
14
+ // Then,
15
+ validateInitialState();
16
+ });
17
+
18
+ it('Should display the correct initial state when navigating via the navigation menu', () => {
19
+ // Given, I visit the Users and Access page via the navigation menu
20
+ UserAndAccessSteps.visit();
21
+ MainMenuSteps.clickOnUsersAndAccess();
22
+ // Then,
23
+ validateInitialState();
24
+ });
25
+ })
@@ -1,6 +1,7 @@
1
1
  import {SparqlEditorSteps} from "../../../steps/sparql-editor-steps";
2
2
  import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
3
3
  import {RepositoriesStub} from "../../../stubs/repositories-stub";
4
+ import {AutocompleteStubs} from "../../../stubs/autocomplete/autocomplete-stubs";
4
5
 
5
6
  describe('Expand results over owl:sameAs', () => {
6
7
 
@@ -8,9 +9,10 @@ describe('Expand results over owl:sameAs', () => {
8
9
 
9
10
  beforeEach(() => {
10
11
  repositoryId = 'sparql-editor-' + Date.now();
11
- cy.setLocalStorage("ls.repository-id", repositoryId);
12
+ cy.presetRepository(repositoryId);
12
13
  RepositoriesStub.stubOntopRepository(repositoryId);
13
14
  RepositoriesStub.stubNameSpaces(repositoryId);
15
+ AutocompleteStubs.stubAutocompleteEnabled(false);
14
16
  });
15
17
 
16
18
  it('should not be able to toggle the sameAs button state if repository is virtual', () => {
@@ -4,6 +4,7 @@ import {QueryStubs} from "../../../stubs/yasgui/query-stubs";
4
4
  import {SavedQuery} from "../../../steps/yasgui/saved-query";
5
5
  import {SavedQueriesDialog} from "../../../steps/yasgui/saved-queries-dialog";
6
6
  import {SaveQueryDialog} from "../../../steps/yasgui/save-query-dialog";
7
+ import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
7
8
 
8
9
  describe('Edit saved queries', () => {
9
10
 
@@ -19,7 +20,7 @@ describe('Edit saved queries', () => {
19
20
  QueryStubs.stubDefaultQueryResponse(repositoryId);
20
21
 
21
22
  SparqlEditorSteps.visitSparqlEditorPage();
22
- YasguiSteps.getYasgui().should('be.visible');
23
+ RepositorySelectorSteps.getSelectedRepository().should('contain', repositoryId);
23
24
  });
24
25
 
25
26
  afterEach(() => {
@@ -54,8 +55,7 @@ describe('Edit saved queries', () => {
54
55
  SaveQueryDialog.closeSaveQueryDialog();
55
56
  });
56
57
 
57
- // TODO skipped until .env can be updated with BE version, which includes the API changes
58
- it.skip('should allow renaming saved query', () => {
58
+ it('should allow renaming saved query', () => {
59
59
  // Given I have created a query
60
60
  SavedQuery.create(savedQueryName);
61
61
  // When I open the saved queries popup
@@ -10,13 +10,7 @@ const USER_NAME = 'saved_query_user';
10
10
  const USER_ADMINISTRATOR = 'admin';
11
11
  const PASSWORD = 'root';
12
12
 
13
- /**
14
- * Skipped because this type of implementation is not ideal. If the test fails and the `afterEach` hook
15
- * fails to toggle security, all remaining tests will fail because security remains enabled.
16
- *
17
- * Tests like this should be refactored to use stubs or other alternative implementations.
18
- */
19
- describe.skip('Readonly saved query', () => {
13
+ describe('Readonly saved query', () => {
20
14
 
21
15
  let repositoryId;
22
16
 
@@ -32,17 +26,18 @@ describe.skip('Readonly saved query', () => {
32
26
  });
33
27
 
34
28
  afterEach(() => {
35
- LoginSteps.logout();
29
+ cy.loginAsAdmin().then(()=> {
30
+ cy.switchOffSecurity(true);
31
+ cy.deleteUser(USER_NAME, true);
36
32
  cy.deleteRepository(repositoryId);
37
- UserAndAccessSteps.visit();
38
- LoginSteps.loginWithUser(USER_ADMINISTRATOR, PASSWORD);
39
- UserAndAccessSteps.toggleSecurity();
40
- cy.deleteUser(USER_NAME);
33
+ });
41
34
  });
42
35
 
43
36
  it('Should not allow modifying a saved query if it is readonly', () => {
44
37
  // Given: There is a public saved query created by a user.
45
38
  LoginSteps.loginWithUser(USER_NAME, PASSWORD);
39
+ // Wait for the users page to be loaded, before changing the URL to ensure the user is logged in successfully
40
+ UserAndAccessSteps.isUsersUrlLoaded();
46
41
  SparqlEditorSteps.visitSparqlEditorPage();
47
42
  YasguiSteps.getYasgui().should('be.visible');
48
43
  const savedQueryName = SavedQuery.generateQueryName();
@@ -52,7 +47,6 @@ describe.skip('Readonly saved query', () => {
52
47
  // When: I log in with another user
53
48
  LoginSteps.loginWithUser(USER_ADMINISTRATOR, PASSWORD);
54
49
  // and open the popup with the saved query.
55
- SparqlEditorSteps.visitSparqlEditorPage();
56
50
  YasguiSteps.showSavedQueries();
57
51
 
58
52
  // Then: I expect:
@@ -6,6 +6,7 @@ import {DEFAULT_QUERY, SavedQuery} from "../../../steps/yasgui/saved-query";
6
6
  import {SavedQueriesDialog} from "../../../steps/yasgui/saved-queries-dialog";
7
7
  import {ShareSavedQueryDialog} from "../../../steps/yasgui/share-saved-query-dialog";
8
8
 
9
+
9
10
  describe('Share saved queries', () => {
10
11
 
11
12
  let repositoryId;
@@ -44,7 +45,8 @@ describe('Share saved queries', () => {
44
45
  ApplicationSteps.getSuccessNotifications().should('be.visible');
45
46
  });
46
47
 
47
- it('Should be able to open a share link in a new editor tab', () => {
48
+ // FIX: Skipped because the functionality is not working. There is a bug in the application https://graphwise.atlassian.net/browse/GDB-12633
49
+ it.skip('Should be able to open a share link in a new editor tab', () => {
48
50
  // Given I have created a query
49
51
  YasguiSteps.getTabs().should('have.length', 1);
50
52
  const savedQueryName = SavedQuery.generateQueryName();
@@ -0,0 +1,33 @@
1
+ import SparqlSteps from "../../steps/sparql-steps";
2
+ import HomeSteps from "../../steps/home-steps";
3
+ import {MainMenuSteps} from "../../steps/main-menu-steps";
4
+
5
+ describe('SPARQL page with selected repository', () => {
6
+
7
+ let repositoryId;
8
+
9
+ beforeEach(() => {
10
+ repositoryId = 'sparql-page-' + Date.now();
11
+ cy.createRepository({id: repositoryId});
12
+ cy.presetRepository(repositoryId);
13
+ });
14
+
15
+ afterEach(() => {
16
+ cy.deleteRepository(repositoryId);
17
+ });
18
+
19
+ it('Should render SPARQL page with editor via URL', () => {
20
+ // Given, I visit the SPARQL page via URL, and I have a selected repository
21
+ SparqlSteps.visit();
22
+ // Then, I expect to see the editor
23
+ SparqlSteps.getQueryArea().should('be.visible');
24
+ });
25
+
26
+ it('Should render SPARQL page with editor via navigation menu', () => {
27
+ // Given I open the SPARQL page, via navigation through the home page, and I have a selected repository
28
+ HomeSteps.visit();
29
+ MainMenuSteps.clickOnSparqlMenu();
30
+ // Then, I expect to see the editor
31
+ SparqlSteps.getQueryArea().should('be.visible');
32
+ });
33
+ })
@@ -0,0 +1,26 @@
1
+ import SparqlSteps from "../../steps/sparql-steps";
2
+ import HomeSteps from "../../steps/home-steps";
3
+ import {MainMenuSteps} from "../../steps/main-menu-steps";
4
+ import {ErrorSteps} from "../../steps/error-steps";
5
+
6
+ describe('SPARQL page without selected repository', () => {
7
+ it('Should render SPARQL page without selected repository via URL', () => {
8
+ // Given, I visit the SPARQL page via URL and I haven't selected a repository
9
+ SparqlSteps.visit();
10
+ // Then
11
+ validateNoRepositoriesSparqlPage();
12
+ });
13
+
14
+ it('Should render SPARQL page without selected repository via navigation menu', () => {
15
+ // Given, I visit the SPARQL page via navigation menu and I haven't selected a repository'
16
+ HomeSteps.visit();
17
+ MainMenuSteps.clickOnSparqlMenu();
18
+ // Then
19
+ validateNoRepositoriesSparqlPage();
20
+ });
21
+ });
22
+
23
+ function validateNoRepositoriesSparqlPage() {
24
+ SparqlSteps.getQueryArea().should('not.exist');
25
+ ErrorSteps.verifyNoConnectedRepoMessage();
26
+ }
@@ -73,4 +73,24 @@ describe('TTYG agent list', () => {
73
73
  {name: 'Databricks-biomarkers', repositoryId: 'biomarkers', isRepositoryDeleted: false}
74
74
  ]);
75
75
  });
76
+
77
+ it('should filter agent actions based on compatibility', () => {
78
+ TTYGStubs.stubAgentListWithIncompatibleGet();
79
+ // When: I visit the ttyg page with incompatible agents
80
+ TTYGViewSteps.visit();
81
+ // Then: Only the delete action should be available for incompatible agents
82
+ TTYGViewSteps.expandAgentsSidebar();
83
+ TTYGViewSteps.getAgentsPanel(0).should('be.visible');
84
+ TTYGViewSteps.getOpenAgentActionsButton(0).should('be.visible');
85
+ TTYGViewSteps.toggleAgentActionMenu(0);
86
+ TTYGViewSteps.getDeleteAgentButton(0).should('be.visible');
87
+ TTYGViewSteps.getCloneAgentButton(0).should('not.exist');
88
+ TTYGViewSteps.getEditAgentButton(0).should('not.exist');
89
+ TTYGViewSteps.toggleAgentActionMenu(0);
90
+ // And: All actions should be available for compatible agents
91
+ TTYGViewSteps.toggleAgentActionMenu(1);
92
+ TTYGViewSteps.getDeleteAgentButton(1).should('be.visible');
93
+ TTYGViewSteps.getCloneAgentButton(1).should('be.visible');
94
+ TTYGViewSteps.getEditAgentButton(1).should('be.visible');
95
+ });
76
96
  });
@@ -29,6 +29,30 @@ describe('TTYG agent select menu', () => {
29
29
  ]);
30
30
  });
31
31
 
32
+ it('should not allow selecting an incompatible agent from the menu', () => {
33
+ TTYGStubs.stubAgentListWithIncompatibleGet();
34
+ // Given: I have opened the ttyg page
35
+ TTYGViewSteps.visit();
36
+ // And: The agent dropdown menu is not visible
37
+ TTYGViewSteps.getAgentsDropdownMenu().should('not.be.visible');
38
+ // And: No agent is currently selected
39
+ TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'Select an agent');
40
+
41
+ // When: I open the agent selection menu
42
+ TTYGViewSteps.openAgentsMenu();
43
+ // Then: I should see that the first agent is marked as incompatible
44
+ TTYGViewSteps.getAgentFromMenu(0)
45
+ .trigger('mouseover')
46
+ .should('have.css', 'cursor', 'not-allowed');
47
+
48
+ // When: I attempt to select an incompatible agent from the menu
49
+ TTYGViewSteps.selectAgent(0);
50
+ // Then: The incompatible agent should not be selected
51
+ TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'Select an agent');
52
+ // And: The dropdown menu should remain open
53
+ TTYGViewSteps.getAgentsDropdownMenu().should('be.visible');
54
+ });
55
+
32
56
  it('Should be able to select agent from the menu', () => {
33
57
  TTYGStubs.stubAgentListGet();
34
58
  // Given I have opened the ttyg page
@@ -42,7 +42,7 @@ describe('Ttyg ChatPanel', () => {
42
42
  // When the new question input is empty.
43
43
  // The "Ask" button must be disabled.
44
44
  ChatPanelSteps.getAskButtonElement().should('be.disabled');
45
- ChatPanelSteps.getQuestionInputElement().should('be.disabled');
45
+ ChatPanelSteps.getQuestionInputElement().should('have.attr', 'disabled');
46
46
 
47
47
  // Then I expect the "Ask" button be not active because agent is not selected
48
48
  ChatPanelSteps.getAskButtonElement().should('not.be.enabled');
@@ -54,7 +54,8 @@ describe('Ttyg ChatPanel', () => {
54
54
  // When I type a question
55
55
  ChatPanelSteps.getQuestionInputElement()
56
56
  .should('be.visible')
57
- .and('not.be.disabled')
57
+ .and('not.have.attr', 'disabled');
58
+ ChatPanelSteps.getQuestionInputElement()
58
59
  .type('Who is Han Solo?');
59
60
 
60
61
  // Then I expect the "Ask" button be active.
@@ -68,13 +69,22 @@ describe('Ttyg ChatPanel', () => {
68
69
  ChatPanelSteps.getChatDetailsElements().should('have.length', 3);
69
70
  ChatPanelSteps.getChatDetailQuestionElement(2).contains('Who is Han Solo?');
70
71
  // and input field be empty,
71
- ChatPanelSteps.getQuestionInputElement().should('be.enabled');
72
+ ChatPanelSteps.getQuestionInputElement().should('not.have.attr', 'disabled');
72
73
  ChatPanelSteps.getQuestionInputElement().should('have.value', '');
73
74
  // and "Ask" button be disabled.
74
75
  ChatPanelSteps.getAskButtonElement().should('be.disabled');
75
76
  // and only the actions for the last message are visible.
76
77
  ChatPanelSteps.getChatDetailActions(2, 0).should('not.be.visible');
77
78
  ChatPanelSteps.getChatDetailActions(2, 1).should('be.visible');
79
+ // When: I hover over the token usage info button
80
+ TTYGViewSteps.hoverTokenUsageInfoButton(0);
81
+ // Then: I expect the token usage info popover to be displayed.
82
+ TTYGViewSteps.getTokenUsageInfoPopover()
83
+ .should("exist")
84
+ .and('contain', '10,246')
85
+ .and('contain', 'prompt tokens')
86
+ .and('contain', '82')
87
+ .and('contain', 'completion tokens');
78
88
 
79
89
  // When I click on regenerate button on the last response => +2 messages
80
90
  TTYGStubs.stubAnswerQuestion();
@@ -164,6 +174,22 @@ describe('Ttyg ChatPanel', () => {
164
174
  TTYGViewSteps.getExplainQueryQueryElement(1, 2).contains("PREFIX rdfs: <http://www.w3.org/2000/01/rdf-sch");
165
175
  });
166
176
 
177
+ it('Should display info about used tokens for response', () => {
178
+ // Given: I visit the TTYG page, a chat with two questions and answers is loaded.
179
+ // Wait to chat be loaded
180
+ ChatPanelSteps.getChatDetailsElements().should('have.length', 2);
181
+
182
+ // When: I hover over the token usage info button
183
+ TTYGViewSteps.hoverTokenUsageInfoButton(0);
184
+ // Then: I expect the token usage info popover to be displayed.
185
+ TTYGViewSteps.getTokenUsageInfoPopover()
186
+ .should("exist")
187
+ .and('contain', '10,245')
188
+ .and('contain', 'prompt tokens')
189
+ .and('contain', '81')
190
+ .and('contain', 'completion tokens');
191
+ });
192
+
167
193
  // Can't test this on CI
168
194
  it.skip('Should copy an answer when click on copy button', () => {
169
195
  // When I click on copy button
@@ -38,9 +38,11 @@ describe('TTYG create chat', () => {
38
38
  // When I type a question
39
39
  ChatPanelSteps.getQuestionInputElement()
40
40
  .should('be.visible')
41
- .and('not.be.disabled')
41
+ .and('not.have.attr', 'disabled');
42
+ ChatPanelSteps.getQuestionInputElement()
42
43
  .type('Who is Han Solo?');
43
44
 
45
+
44
46
  // Then I expect the "Ask" button be active.
45
47
  ChatPanelSteps.getAskButtonElement().should('be.enabled');
46
48