graphdb-workbench-tests 3.3.3 → 3.4.0-SPARQL12-TR1

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 (74) hide show
  1. package/cypress-flaky.config.js +2 -0
  2. package/cypress-legacy.config.js +2 -2
  3. package/cypress-security.config.js +3 -14
  4. package/e2e-flaky/import/import-server-files-operations.spec.js +1 -1
  5. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +1 -1
  6. package/e2e-flaky/setup/sparql-template-create.js +3 -18
  7. package/e2e-flaky/sparql-editor/actions/execute-update-query.spec.js +2 -12
  8. package/e2e-flaky/sparql-editor/actions/share-query.spec.js +1 -7
  9. package/e2e-flaky/sparql-editor/yasr/table-plugin.spec.js +1 -6
  10. package/e2e-legacy/cluster/cluster-states.spec.js +3 -3
  11. package/e2e-legacy/explore/visual-graph/node-info-panel.spec.js +58 -0
  12. package/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +142 -0
  13. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +57 -85
  14. package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
  15. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
  16. package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
  17. package/e2e-legacy/guides/navigation/navigation-guide.spec.js +64 -0
  18. package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
  19. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +168 -0
  20. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +34 -26
  21. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +2 -2
  22. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +372 -0
  23. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
  24. package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
  25. package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
  26. package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
  27. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -0
  28. package/e2e-legacy/resource/resource.spec.js +34 -19
  29. package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
  30. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
  31. package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
  32. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +1 -1
  33. package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
  34. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
  35. package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
  36. package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
  37. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +90 -41
  38. package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
  39. package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
  40. package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
  41. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
  42. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +73 -61
  43. package/fixtures/graph/graph-configurations.json +59 -0
  44. package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
  45. package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
  46. package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
  47. package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
  48. package/fixtures/guides/navigation/navigation-guide.json +60 -0
  49. package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
  50. package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
  51. package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
  52. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +6 -1
  53. package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
  54. package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
  55. package/fixtures/guides/welcome/welcome-guide.json +18 -0
  56. package/npm-shrinkwrap.json +332 -279
  57. package/package.json +1 -1
  58. package/steps/guides/guide-dialog-steps.js +60 -2
  59. package/steps/guides/movies-guide-steps.js +2 -1
  60. package/steps/main-menu-steps.js +1 -0
  61. package/steps/repository-steps.js +24 -0
  62. package/steps/resource/resource-steps.js +0 -8
  63. package/steps/setup/acl-management-steps.js +16 -0
  64. package/steps/sparql-editor-steps.js +18 -4
  65. package/steps/sparql-steps.js +13 -1
  66. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +1 -1
  67. package/steps/visual-graph-split-button-steps.js +45 -0
  68. package/steps/visual-graph-steps.js +80 -2
  69. package/steps/yasgui/yasqe-steps.js +29 -4
  70. package/steps/yasgui/yasr-steps.js +31 -5
  71. package/stubs/graph-config-stubs.js +17 -0
  72. package/stubs/guides/guides-stubs.js +41 -1
  73. package/support/commands.js +1 -0
  74. package/support/url-commands.js +13 -0
@@ -1,17 +1,19 @@
1
- import {SparqlEditorSteps} from "../../../../steps/sparql-editor-steps";
2
- import {YasqeSteps} from "../../../../steps/yasgui/yasqe-steps";
3
- import {YasrSteps} from "../../../../steps/yasgui/yasr-steps";
4
- import {QueryStubs} from "../../../../stubs/yasgui/query-stubs";
1
+ import {SparqlEditorSteps} from '../../../../steps/sparql-editor-steps';
2
+ import {YasqeSteps} from '../../../../steps/yasgui/yasqe-steps';
3
+ import {QueryStubs} from '../../../../stubs/yasgui/query-stubs';
4
+ import {GraphConfigStubs} from '../../../../stubs/graph-config-stubs.js';
5
+ import {BrowserStubs} from '../../../../stubs/browser-stubs.js';
6
+ import {VisualGraphSplitButtonSteps} from '../../../../steps/visual-graph-split-button-steps.js';
5
7
 
6
- describe('Visual graph button when user execute a CONSTRUCT query', () => {
8
+ describe('"Visualize" split button', () => {
7
9
  let repositoryId;
8
10
 
9
11
  beforeEach(() => {
10
- repositoryId = 'sparql-editor-' + Date.now();
12
+ repositoryId = 'yasr-vizualize-split-button' + Date.now();
11
13
  QueryStubs.stubQueryCountResponse();
12
14
  cy.createRepository({id: repositoryId});
13
15
  cy.presetRepository(repositoryId);
14
- // Given I visit a page with "ontotex-yasgu-web-component" in it.
16
+ // Given I visit a page with 'ontotex-yasgu-web-component' in it.
15
17
  SparqlEditorSteps.visitSparqlEditorPage();
16
18
  });
17
19
 
@@ -19,39 +21,86 @@ describe('Visual graph button when user execute a CONSTRUCT query', () => {
19
21
  cy.deleteRepository(repositoryId);
20
22
  });
21
23
 
22
- it('Should display a "Visual" graph button configured by user', {
23
- retries: {
24
- runMode: 1,
25
- openMode: 0
26
- }
27
- }, () => {
28
- // When I visit a page with "ontotext-yasgui-web-component" on it,
29
- // and select a CONSTRUCT query.
30
- YasqeSteps.executeQuery();
31
-
32
- // Then I expect "Visual" button to not be visible.
33
- YasrSteps.getVisualButton().should('not.be.visible');
34
-
35
- // When I execute a CONSTRUCT query.
36
- YasqeSteps.pasteQuery(
37
- 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>' +
38
- 'PREFIX onto: <http://www.ontotext.com/>' +
39
- 'CONSTRUCT {' +
40
- '?source rdf:type ?destination .' +
41
- '} WHERE {' +
42
- '?bag rdf:type ?source .' +
43
- '?flight rdf:type ?destination' +
44
- '}');
45
- YasqeSteps.executeQuery();
46
-
47
- // Then I expect "Visual" button to be visible.
48
- YasrSteps.getVisualButton().should('be.visible');
49
-
50
- // When I execute SELECT query again.
51
- YasqeSteps.pasteQuery('select * where {?s ?p ?o.}');
52
- YasqeSteps.executeQuery();
53
-
54
- // Then I expect "Visual" button to not be visible.
55
- YasrSteps.getVisualButton().should('not.be.visible');
24
+ it('should display "Visualize" split button when user execute a CONSTRUCT query', () => {
25
+ // WHEN: I visit a page with 'ontotext-yasgui-web-component' on it, and execute select query.
26
+ executeSelectQuery();
27
+ // THEN: I expect the 'Visualize' button to not be visible.
28
+ VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
29
+
30
+ // WHEN: I execute a CONSTRUCT query.
31
+ executeConstructQuery();
32
+ // THEN: I expect the 'Visualize' button to be visible.
33
+ VisualGraphSplitButtonSteps.getVisualizeMainButton().should('be.visible');
34
+
35
+ // WHEN: I execute SELECT query again.
36
+ executeSelectQuery();
37
+ // THEN: I expect the 'Visualize' button to not be visible.
38
+ VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
39
+ });
40
+
41
+ it('should inform user that there no created graph configurations', () => {
42
+ // GIVEN: There are no graph configurations.
43
+ GraphConfigStubs.stubGetEmptyGraphConfigs();
44
+ // AND: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
45
+ executeConstructQuery();
46
+
47
+ // WHEN: I open the dropdown.
48
+ VisualGraphSplitButtonSteps.toggleGraphConfigDropdown();
49
+ // THEN: I expect to see message that informs that there are no graph configurations.
50
+ VisualGraphSplitButtonSteps.getNoConfigurationsMessage().should('contain.text', 'No advanced graph configuration.');
51
+
52
+ // WHEN: I click on create link.
53
+ BrowserStubs.stubWindowOpen();
54
+ VisualGraphSplitButtonSteps.clickCreateGraphConfigLink();
55
+ // THEN: I expect to be navigated to graph configurations page.
56
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', 'graphs-visualizations', '_blank', 'noopener,noreferrer');
57
+ });
58
+
59
+ it('should open graphs-visualizations view when click on main button', () => {
60
+ // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
61
+ executeConstructQuery();
62
+
63
+ // WHEN: I click on main button
64
+ VisualGraphSplitButtonSteps.clickOnVisualizeMainButton();
65
+ // THEN: I expect to be navigated to graphs-visualizations view.
66
+ cy.url().should('include', 'graphs-visualizations');
67
+ cy.getQueryParam('query').should('include', 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX onto: <http://www.ontotext.com/>CONSTRUCT {?source rdf:type ?destination .} WHERE {?bag rdf:type ?source .?flight rdf:type ?destination}');
68
+ cy.getQueryParam('config').should('not.exist');
69
+ });
70
+
71
+ it('should open graphs-visualizations view when select a graph configuration', () => {
72
+ // GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'Visualize' button is visible.
73
+ executeConstructQuery();
74
+ GraphConfigStubs.stubGetGraphConfigs();
75
+
76
+ // WHEN: I open the dropdown.
77
+ VisualGraphSplitButtonSteps.toggleGraphConfigDropdown();
78
+ // THEN: I expect to see all graph configurations.
79
+ VisualGraphSplitButtonSteps.getGraphConfigs().should('have.length', 3);
80
+
81
+ // WHEN: I select a graph configuration
82
+ VisualGraphSplitButtonSteps.selectGraphConfig();
83
+ // THEN: I expect to be navigated to graphs-visualizations view.
84
+ cy.url().should('include', 'graphs-visualizations');
85
+ cy.getQueryParam('query').should('include', 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>PREFIX onto: <http://www.ontotext.com/>CONSTRUCT {?source rdf:type ?destination .} WHERE {?bag rdf:type ?source .?flight rdf:type ?destination}');
86
+ cy.getQueryParam('config').should('eq', 'de99fd5de7f94ef98f1875dff55fc1c9');
56
87
  });
57
88
  });
89
+
90
+ const executeSelectQuery = () => {
91
+ YasqeSteps.pasteQuery('select * where {?s ?p ?o.}');
92
+ YasqeSteps.executeQuery();
93
+ };
94
+
95
+ const executeConstructQuery = () => {
96
+ YasqeSteps.pasteQuery(
97
+ 'PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>' +
98
+ 'PREFIX onto: <http://www.ontotext.com/>' +
99
+ 'CONSTRUCT {' +
100
+ '?source rdf:type ?destination .' +
101
+ '} WHERE {' +
102
+ '?bag rdf:type ?source .' +
103
+ '?flight rdf:type ?destination' +
104
+ '}');
105
+ YasqeSteps.executeQuery();
106
+ };
@@ -0,0 +1,80 @@
1
+ import {SparqlEditorSteps} from '../../../steps/sparql-editor-steps.js';
2
+ import {YasrSteps} from '../../../steps/yasgui/yasr-steps.js';
3
+ import {YasqeSteps} from '../../../steps/yasgui/yasqe-steps.js';
4
+
5
+ describe('YASR', () => {
6
+ let repositoryId;
7
+ let secondRepositoryId;
8
+
9
+ beforeEach(() => {
10
+ repositoryId = 'yasr-' + Date.now();
11
+ cy.createRepository({id: repositoryId});
12
+ cy.presetRepository(repositoryId);
13
+ });
14
+
15
+ afterEach(() => {
16
+ cy.deleteRepository(repositoryId);
17
+ cy.deleteRepository(secondRepositoryId);
18
+ });
19
+
20
+ it('should load YASR in fullscreen with plugin config from URL', () => {
21
+ // WHEN: I visit SPARQL Query & Update page with url parameters: embedded and pluginName
22
+ SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId, 'pivotTable', true));
23
+ // THEN: YASR is in fullscreen mode because the workbench is embedded.
24
+ YasrSteps.getYasr().should('have.class', 'yasr-fullscreen');
25
+ // AND: I expect the raw response plugin to be visible
26
+ YasrSteps.getPivotTablePlugin().should('be.visible');
27
+
28
+ // WHEN: I press the ESC key.
29
+ YasrSteps.typeEscapeKey();
30
+ // THEN: I see YASR results in fullscreen mode because Escape is disabled in this mode.
31
+ YasrSteps.getYasr().should('have.class', 'yasr-fullscreen');
32
+
33
+ // WHEN: I visit SPARQL Query & Update page with without embedded url parameter.
34
+ SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId, 'googleChart'));
35
+ // THEN: I expect yasr to be in non-fullscreen mode
36
+ YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
37
+ // AND: I expect Google Chart plugin to be visible
38
+ YasrSteps.getGoogleChartPlugin().should('be.visible');
39
+
40
+ // WHEN: I visit SPARQL Query & Update page with without embedded and pluginName url parameters.
41
+ SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId));
42
+ // THEN: I expect yasr to be in non-fullscreen mode
43
+ YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
44
+ // AND: I expect Google Chart plugin to be visible, because it was the last used plugin.
45
+ YasrSteps.getGoogleChartPlugin().should('be.visible');
46
+
47
+ // WHEN: I visit SPARQL Query & Update page with without embedded and pluginName url parameters.
48
+ // AND: There are no persisted yasr data.
49
+ cy.clearLocalStorage('yagui__graphdb-workbench-sparql-editor');
50
+ SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId));
51
+ // THEN: I expect yasr to be in non-fullscreen mode
52
+ YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
53
+ // AND: I expect the default plugin to be visible
54
+ YasrSteps.getExtendedTablePlugin().should('be.visible');
55
+ });
56
+
57
+ it('should trigger YASR fullscreen mode', () => {
58
+ // GIVEN: I open a page that contains "ontotext-yasgui-web-component".
59
+ SparqlEditorSteps.visitSparqlEditorPage();
60
+
61
+ // WHEN: I execute a query.
62
+ YasqeSteps.executeQuery();
63
+ // THEN: I should see YASR results in non-fullscreen mode.
64
+ YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
65
+
66
+ // WHEN: I toggle to fullscreen mode.
67
+ YasrSteps.toggleFullscreen();
68
+ // THEN: I should see YASR results in fullscreen mode.
69
+ YasrSteps.getYasr().should('have.class', 'yasr-fullscreen');
70
+
71
+ // WHEN: I press the ESC key.
72
+ YasrSteps.typeEscapeKey();
73
+ // THEN: I should see YASR results in non-fullscreen mode, because escape is enabled when workbench is not embedded.
74
+ YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
75
+ });
76
+ });
77
+
78
+ const getUrl = (repositoryId, pluginName, embedded = false) => {
79
+ return `repositoryId=${repositoryId}${pluginName ? ('&pluginName=' + pluginName) : ''}${embedded ? '&embedded' : ''}&query=SELECT * { ?s ?p ?o }&execute=true`;
80
+ }
@@ -61,12 +61,7 @@ describe('TTYG chat list', () => {
61
61
  TTYGViewSteps.getChatByDayGroups().should('have.length', 0);
62
62
  });
63
63
 
64
- it('Should be able to edit an existing chat name by double click on the chat in the list', {
65
- retries: {
66
- runMode: 1,
67
- openMode: 0
68
- }
69
- }, () => {
64
+ it('Should be able to edit an existing chat name by double click on the chat in the list', () => {
70
65
  TTYGStubs.stubChatsListGet();
71
66
  TTYGStubs.stubChatGet();
72
67
  TTYGStubs.stubAgentListGet();
@@ -90,12 +85,7 @@ describe('TTYG chat list', () => {
90
85
  TTYGViewSteps.getChatFromGroup(1, 0).should('contain', 'New chat name');
91
86
  });
92
87
 
93
- it('Should be able to edit an existing chat name through the action menu', {
94
- retries: {
95
- runMode: 1,
96
- openMode: 0
97
- }
98
- }, () => {
88
+ it('Should be able to edit an existing chat name through the action menu', () => {
99
89
  TTYGStubs.stubChatsListGet();
100
90
  TTYGStubs.stubChatGet();
101
91
  TTYGStubs.stubAgentListGet();
@@ -17,12 +17,7 @@ describe('TTYG create new agent', () => {
17
17
  TTYGStubs.stubAgentDefaultsGet();
18
18
  });
19
19
 
20
- it('Should be able to cancel the new agent creation on the no agents view', {
21
- retries: {
22
- runMode: 1,
23
- openMode: 0
24
- }
25
- }, () => {
20
+ it('Should be able to cancel the new agent creation on the no agents view', () => {
26
21
  TTYGStubs.stubChatsListGetNoResults();
27
22
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
28
23
  // Given I have opened the ttyg page
@@ -38,12 +33,7 @@ describe('TTYG create new agent', () => {
38
33
  TTYGViewSteps.getNoAgentsView().should('be.visible');
39
34
  });
40
35
 
41
- it('Should be able to create a new agent with SPARQL extraction method on the no agents view', {
42
- retries: {
43
- runMode: 1,
44
- openMode: 0
45
- }
46
- }, () => {
36
+ it('Should be able to create a new agent with SPARQL extraction method on the no agents view', () => {
47
37
  TTYGStubs.stubChatsListGetNoResults();
48
38
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json', 1000);
49
39
  // Given I have opened the ttyg page
@@ -182,12 +172,7 @@ describe('TTYG create new agent', () => {
182
172
  TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
183
173
  });
184
174
 
185
- it('Should require FTS to be enabled for selected repository when creating agent with FTS extraction method', {
186
- retries: {
187
- runMode: 1,
188
- openMode: 0
189
- }
190
- }, () => {
175
+ it('Should require FTS to be enabled for selected repository when creating agent with FTS extraction method', () => {
191
176
  RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-disabled-fts.json');
192
177
  TTYGStubs.stubChatsListGetNoResults();
193
178
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
@@ -204,12 +189,7 @@ describe('TTYG create new agent', () => {
204
189
  TtygAgentSettingsModalSteps.getFtsDisabledHelp().should('be.visible');
205
190
  });
206
191
 
207
- it('Should be able to create agent with FTS extraction method', {
208
- retries: {
209
- runMode: 1,
210
- openMode: 0
211
- }
212
- }, () => {
192
+ it('Should be able to create agent with FTS extraction method', () => {
213
193
  RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-enabled-fts.json');
214
194
  TTYGStubs.stubChatsListGetNoResults();
215
195
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
@@ -245,12 +225,7 @@ describe('TTYG create new agent', () => {
245
225
  TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
246
226
  });
247
227
 
248
- it('Should require similarity index in order to create agent with similarity search method', {
249
- retries: {
250
- runMode: 1,
251
- openMode: 0
252
- }
253
- }, () => {
228
+ it('Should require similarity index in order to create agent with similarity search method', () => {
254
229
  TTYGStubs.stubChatsListGetNoResults();
255
230
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
256
231
  TTYGStubs.getSimilarityIndexesForRepo();
@@ -268,12 +243,7 @@ describe('TTYG create new agent', () => {
268
243
  TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
269
244
  });
270
245
 
271
- it('Should be able to configure and create agent with similarity index search method', {
272
- retries: {
273
- runMode: 1,
274
- openMode: 0
275
- }
276
- }, () => {
246
+ it('Should be able to configure and create agent with similarity index search method', () => {
277
247
  TTYGStubs.stubChatsListGetNoResults();
278
248
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
279
249
  TTYGStubs.getSimilarityIndexesForRepo(repositoryId);
@@ -316,12 +286,7 @@ describe('TTYG create new agent', () => {
316
286
  TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
317
287
  });
318
288
 
319
- it('Should require retrieval connector in order to create an agent with GPT retrieval connector method', {
320
- retries: {
321
- runMode: 1,
322
- openMode: 0
323
- }
324
- }, () => {
289
+ it('Should require retrieval connector in order to create an agent with GPT retrieval connector method', () => {
325
290
  TTYGStubs.stubChatsListGetNoResults();
326
291
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
327
292
  ConnectorStubs.stubGetConnectors();
@@ -343,12 +308,7 @@ describe('TTYG create new agent', () => {
343
308
  TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
344
309
  });
345
310
 
346
- it('Should be able to configure and create an agent with retrieval connector method', {
347
- retries: {
348
- runMode: 1,
349
- openMode: 0
350
- }
351
- }, () => {
311
+ it('Should be able to configure and create an agent with retrieval connector method', () => {
352
312
  TTYGStubs.stubChatsListGetNoResults();
353
313
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
354
314
  ConnectorStubs.stubGetConnectors();
@@ -17,12 +17,7 @@ describe('TTYG edit an agent', () => {
17
17
  TTYGStubs.stubAgentDefaultsGet();
18
18
  });
19
19
 
20
- it(' should be able to edit an agent.', {
21
- retries: {
22
- runMode: 1,
23
- openMode: 0
24
- }
25
- }, () => {
20
+ it(' should be able to edit an agent.', () => {
26
21
  TTYGStubs.stubChatsListGet();
27
22
  TTYGStubs.stubAgentListGet();
28
23
  TTYGStubs.stubChatGet();
@@ -67,12 +62,7 @@ describe('TTYG edit an agent', () => {
67
62
  TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
68
63
  });
69
64
 
70
- it('should be able to edit Autocomplete extraction method option', {
71
- retries: {
72
- runMode: 1,
73
- openMode: 0
74
- }
75
- }, () => {
65
+ it('should be able to edit Autocomplete extraction method option', () => {
76
66
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-autocomplete-query.json');
77
67
  // Given I have opened the ttyg page
78
68
  TTYGViewSteps.visit();
@@ -2,6 +2,8 @@ import {MainMenuSteps} from "../../../steps/main-menu-steps";
2
2
  import {UserAndAccessSteps} from "../../../steps/setup/user-and-access-steps";
3
3
  import {LoginSteps} from "../../../steps/login-steps";
4
4
  import {ToasterSteps} from "../../../steps/toaster-steps";
5
+ import {HeaderSteps} from '../../../steps/header-steps.js';
6
+ import HomeSteps from '../../../steps/home-steps.js';
5
7
 
6
8
  describe('Turn on Security', () => {
7
9
 
@@ -10,78 +12,88 @@ describe('Turn on Security', () => {
10
12
  cy.switchOnSecurity();
11
13
  });
12
14
 
13
- afterEach(() =>{
15
+ afterEach(() => {
14
16
  cy.loginAsAdmin();
15
17
  cy.switchOffSecurity(true);
16
18
  })
17
19
 
18
- it('should enable security and show login screen with only Help accessible', () => {
19
- // Navigate to Users & Access
20
- UserAndAccessSteps.visit();
21
- // Verify we are redirected to login page
22
- cy.url().should('include', '/login');
23
- MainMenuSteps.getMenuHelp().should('not.exist');
24
- MainMenuSteps.getMenuExplore().should('not.exist');
25
- MainMenuSteps.getMenuMonitoring().should('not.exist');
26
- MainMenuSteps.getMenuSetup().should('not.exist');
27
- });
20
+ it('should enable security and show login screen', () => {
21
+ // Navigate to Users & Access
22
+ UserAndAccessSteps.visit();
23
+ // Verify we are redirected to login page
24
+ cy.url().should('include', '/login');
25
+ HeaderSteps.getHeader().should('not.exist');
26
+ MainMenuSteps.getMainMenu().should('not.exist');
27
+ });
28
28
 
29
- it('should reject wrong credentials and accept admin/root', () => {
30
- // Attempt login with invalid credentials
31
- LoginSteps.visitLoginPage();
32
- LoginSteps.loginWithUser('wrongUser', 'wrongPass');
33
- // Expect error message
34
- ToasterSteps.verifyNewToasterError('Wrong credentials');
29
+ it('should reject wrong credentials and accept admin/root', () => {
30
+ // Attempt login with invalid credentials
31
+ LoginSteps.visitLoginPage();
32
+ LoginSteps.loginWithUser('wrongUser', 'wrongPass');
33
+ // Expect error message
34
+ ToasterSteps.verifyNewToasterError('Wrong credentials');
35
35
 
36
- // Login with correct admin credentials
37
- LoginSteps.visitLoginPage();
38
- LoginSteps.loginWithUser('admin', 'root');
39
- cy.url().should('include', '/');
40
- });
36
+ // Login with correct admin credentials
37
+ LoginSteps.visitLoginPage();
38
+ LoginSteps.loginWithUser('admin', 'root');
39
+ cy.url().should('include', '/');
40
+ });
41
41
 
42
- it('should change admin password and enforce new credentials', () => {
43
- // Navigate to Users & Access after login
44
- UserAndAccessSteps.visit();
45
- // Verify we are redirected to login page
46
- cy.url().should('include', '/login');
47
- LoginSteps.loginWithUser('admin', 'root');
42
+ it('should show toaster after logging out', () => {
43
+ UserAndAccessSteps.visit();
44
+ LoginSteps.loginWithUser('admin', 'root');
45
+ // Verify we are logged in
46
+ UserAndAccessSteps.getUsersCatalogContainer().should('be.visible');
47
+ // Log out
48
+ HeaderSteps.logout();
49
+ cy.url().should('include', '/login');
50
+ // Verify toaster message
51
+ ToasterSteps.verifySuccess('Signed out');
52
+ })
48
53
 
49
- // Open edit page for admin user
50
- UserAndAccessSteps.openEditUserPage('admin');
54
+ describe('Password Change', () => {
55
+ afterEach(() => {
56
+ // Reset password back to original value for test isolation
57
+ UserAndAccessSteps.visit();
58
+ UserAndAccessSteps.openEditUserPage('admin');
59
+ UserAndAccessSteps.typePassword('root');
60
+ UserAndAccessSteps.typeConfirmPasswordField('root');
61
+ UserAndAccessSteps.confirmUserEdit();
62
+ UserAndAccessSteps.getUsersCatalogContainer().should('be.visible');
63
+ })
51
64
 
52
- // Change password to a new value
53
- let newPassword = 'MyNewP@ssw0rd!';
54
- UserAndAccessSteps.typePassword(newPassword);
55
- UserAndAccessSteps.typeConfirmPasswordField(newPassword);
56
- UserAndAccessSteps.confirmUserEdit();
65
+ it('should change admin password and enforce new credentials', () => {
66
+ // Navigate to Users & Access after login
67
+ UserAndAccessSteps.visit();
68
+ // Verify we are redirected to login page
69
+ cy.url().should('include', '/login');
70
+ // Login with admin credentials
71
+ LoginSteps.loginWithUser('admin', 'root');
72
+ // Verify we are logged in
73
+ UserAndAccessSteps.getUsersCatalogContainer().should('be.visible');
57
74
 
58
- // Log out
59
- LoginSteps.logout();
60
- cy.url().should('include', '/login');
75
+ // Open edit page for admin user
76
+ UserAndAccessSteps.openEditUserPage('admin');
61
77
 
62
- // Attempt login with old password
63
- LoginSteps.loginWithUser('admin', 'root');
64
- ToasterSteps.verifyNewToasterError('Wrong credentials');
78
+ // Change password to a new value
79
+ let newPassword = 'MyNewP@ssw0rd!';
80
+ UserAndAccessSteps.typePassword(newPassword);
81
+ UserAndAccessSteps.typeConfirmPasswordField(newPassword);
82
+ UserAndAccessSteps.confirmUserEdit();
65
83
 
66
- // Attempt login with new password
67
- LoginSteps.visitLoginPage();
68
- LoginSteps.loginWithUser('admin', newPassword);
69
- MainMenuSteps.clickOnUsersAndAccess();
70
- // Open edit page for admin user
71
- UserAndAccessSteps.openEditUserPage('admin');
72
- newPassword = 'root';
73
- UserAndAccessSteps.typePassword(newPassword);
74
- UserAndAccessSteps.typeConfirmPasswordField(newPassword);
75
- UserAndAccessSteps.confirmUserEdit();
76
- });
84
+ // Log out
85
+ LoginSteps.logout();
86
+ cy.url().should('include', '/login');
77
87
 
78
- it('should show toaster when after logging out', () => {
79
- UserAndAccessSteps.visit();
80
- LoginSteps.loginWithUser('admin', 'root');
81
- // Log out
82
- LoginSteps.logout();
83
- cy.url().should('include', '/login');
84
- // Verify toaster message
85
- ToasterSteps.verifySuccess('Signed out');
86
- })
88
+ // Attempt login with old password
89
+ LoginSteps.loginWithUser('admin', 'root');
90
+ ToasterSteps.verifyNewToasterError('Wrong credentials');
91
+
92
+ // Attempt login with new password
93
+ LoginSteps.visitLoginPage();
94
+ LoginSteps.loginWithUser('admin', newPassword);
95
+ // Verify we are logged in and we are on the home page
96
+ HomeSteps.getView().should('be.visible');
97
+ });
98
+ });
87
99
  });
@@ -0,0 +1,59 @@
1
+ [
2
+ {
3
+ "id": "de99fd5de7f94ef98f1875dff55fc1c9",
4
+ "name": "Graph Config 1",
5
+ "startMode": "search",
6
+ "owner": "admin",
7
+ "startQueryIncludeInferred": true,
8
+ "startQuerySameAs": true,
9
+ "startGraphQuery": "# CONSTRUCT or DESCRIBE query. The results will be rendered visually as a graph of triples.\nCONSTRUCT WHERE {\n\t?s ?p ?o\n} LIMIT 10",
10
+ "startIRI": null,
11
+ "startIRILabel": null,
12
+ "expandQuery": null,
13
+ "resourceQuery": null,
14
+ "predicateLabelQuery": null,
15
+ "resourcePropertiesQuery": null,
16
+ "shared": false,
17
+ "description": null,
18
+ "hint": null,
19
+ "repositoryId": "A_test"
20
+ },
21
+ {
22
+ "id": "94cab6579df445c68c454b2156013811",
23
+ "name": "Graph Config 1",
24
+ "startMode": "search",
25
+ "owner": "admin",
26
+ "startQueryIncludeInferred": true,
27
+ "startQuerySameAs": true,
28
+ "startGraphQuery": "# CONSTRUCT or DESCRIBE query. The results will be rendered visually as a graph of triples.\nCONSTRUCT WHERE {\n\t?s ?p ?o\n} LIMIT 10",
29
+ "startIRI": null,
30
+ "startIRILabel": null,
31
+ "expandQuery": null,
32
+ "resourceQuery": null,
33
+ "predicateLabelQuery": null,
34
+ "resourcePropertiesQuery": null,
35
+ "shared": false,
36
+ "description": null,
37
+ "hint": null,
38
+ "repositoryId": null
39
+ },
40
+ {
41
+ "id": "94cab6579df445c68c454b2156013661",
42
+ "name": "Graph Config 1",
43
+ "startMode": "query",
44
+ "owner": "admin",
45
+ "startQueryIncludeInferred": true,
46
+ "startQuerySameAs": true,
47
+ "startGraphQuery": "# CONSTRUCT or DESCRIBE query. The results will be rendered visually as a graph of triples.\nCONSTRUCT WHERE {\n\t?s ?p ?o\n} LIMIT 10",
48
+ "startIRI": null,
49
+ "startIRILabel": null,
50
+ "expandQuery": null,
51
+ "resourceQuery": null,
52
+ "predicateLabelQuery": null,
53
+ "resourcePropertiesQuery": null,
54
+ "shared": false,
55
+ "description": null,
56
+ "hint": null,
57
+ "repositoryId": null
58
+ }
59
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "guideName": {
4
+ "en": "Confirm cancel dialog"
5
+ },
6
+ "guideDescription": {
7
+ "en": "Confirm cancel dialog guide"
8
+ },
9
+ "steps": [
10
+ {
11
+ "guideBlockName": "welcome"
12
+ }
13
+ ]
14
+ }
15
+ ]