graphdb-workbench-tests 3.2.1 → 3.3.0-RC2

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 (112) hide show
  1. package/cypress-security.config.js +12 -5
  2. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +2 -2
  3. package/e2e-legacy/explore/class-relationships/class-relationships.spec.js +2 -0
  4. package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +4 -4
  5. package/e2e-legacy/explore/visual-graph/visual-graph-node-labels.spec.js +14 -2
  6. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +23 -11
  7. package/e2e-legacy/guides/autocomplete/enable-autocomplete-guide.spec.js +49 -0
  8. package/e2e-legacy/guides/class-hierarcy/class-hierarchy-guide.spec.js +89 -0
  9. package/e2e-legacy/guides/class-relations/class-relations-guide.spec.js +76 -0
  10. package/e2e-legacy/guides/connectors/connectors-guide.spec.js +152 -0
  11. package/e2e-legacy/guides/create-similarity-index/create-similarity-index-guide.spec.js +74 -0
  12. package/e2e-legacy/guides/download-guide-resource/download-guide-resource-guide.js +55 -0
  13. package/e2e-legacy/guides/repositories/create-repository-guide.spec.js +69 -0
  14. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +150 -0
  15. package/e2e-legacy/guides/ttyg/conversation/ttyg-conversation-guide.spec.js +88 -0
  16. package/e2e-legacy/home/cookie-policy.spec.js +8 -8
  17. package/e2e-legacy/home/rdf-resource-search.spec.js +12 -0
  18. package/e2e-legacy/import/import-server-files.spec.js +2 -2
  19. package/e2e-legacy/import/import-user-data-file-upload.spec.js +3 -3
  20. package/e2e-legacy/import/import-user-data.spec.js +2 -2
  21. package/e2e-legacy/repository/ontop-repository.spec.js +1 -1
  22. package/e2e-legacy/repository/repositories.spec.js +1 -1
  23. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +155 -0
  24. package/e2e-legacy/setup/autocomplete/autocomplete.spec.js +1 -1
  25. package/e2e-legacy/setup/connectors-lucene.spec.js +2 -2
  26. package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +4 -4
  27. package/e2e-legacy/setup/rdf-rank/rdf-rank.spec.js +2 -4
  28. package/e2e-legacy/setup/settings/my-settings.spec.js +48 -60
  29. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +105 -78
  30. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +11 -11
  31. package/e2e-legacy/sparql-editor/actions/include-inferred-statements.spec.js +6 -6
  32. package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +7 -7
  33. package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
  34. package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +13 -16
  35. package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +30 -1
  36. package/e2e-legacy/ttyg/agent-list.spec.js +1 -2
  37. package/e2e-legacy/ttyg/agent-select-menu.spec.js +1 -2
  38. package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
  39. package/e2e-legacy/ttyg/chat-panel.spec.js +6 -3
  40. package/e2e-legacy/ttyg/clone-agent.spec.js +1 -2
  41. package/e2e-legacy/ttyg/create-agent.spec.js +2 -3
  42. package/e2e-legacy/ttyg/create-chat.spec.js +1 -2
  43. package/e2e-legacy/ttyg/delete-agent.spec.js +1 -2
  44. package/e2e-legacy/ttyg/edit-agent.spec.js +1 -2
  45. package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -6
  46. package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -2
  47. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +16 -7
  48. package/e2e-security/setup/users-and-access/graphql-user.spec.js +6 -3
  49. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -0
  50. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +3 -3
  51. package/e2e-security/setup/users-and-access/user-and-access.spec.js +8 -8
  52. package/fixtures/guides/autocomplete/enable-autocomplete-guide.json +12 -0
  53. package/fixtures/guides/class-hierarchy/class-hierarchy-guide.json +35 -0
  54. package/fixtures/guides/class-relations/class-relations-guide.json +33 -0
  55. package/fixtures/guides/connectors/connectors-guide.json +66 -0
  56. package/fixtures/guides/connectors/lucene-connector-guide.json +106 -0
  57. package/fixtures/guides/create-repository/create-repository-guide.json +25 -0
  58. package/fixtures/guides/create-similarity-index/create-similarity-index-guide.json +36 -0
  59. package/fixtures/guides/download-guide-resource/download-guide-resource-guide.json +25 -0
  60. package/fixtures/guides/download-resource.ttl +629 -0
  61. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +69 -0
  62. package/fixtures/guides/ttyg/conversation/ttyg-conversation-guide.json +26 -0
  63. package/fixtures/similarity/get-ttyg-similarity-instances.json +10 -0
  64. package/fixtures/ttyg/agent/get-similarity-indexes-for-another-repo.json +5 -3
  65. package/fixtures/ttyg/agent/get-similarity-indexes.json +17 -8
  66. package/fixtures/ttyg/chats/explain-response-3.json +12 -0
  67. package/npm-shrinkwrap.json +439 -444
  68. package/package.json +4 -3
  69. package/steps/application-steps.js +7 -5
  70. package/steps/class-views-steps.js +19 -7
  71. package/steps/explore/similarity-index-create-steps.js +5 -3
  72. package/steps/explore/similarity-indexes-steps.js +4 -0
  73. package/steps/guides/guide-dialog-steps.js +16 -0
  74. package/steps/guides/guide-steps.js +26 -1
  75. package/steps/header-steps.js +9 -0
  76. package/steps/home-steps.js +42 -30
  77. package/steps/import/import-steps.js +1 -1
  78. package/steps/import/import-user-data-steps.js +1 -1
  79. package/steps/login-steps.js +13 -4
  80. package/steps/main-menu-steps.js +24 -4
  81. package/steps/modal-dialog-steps.js +12 -1
  82. package/steps/repository-steps.js +54 -14
  83. package/steps/resource/resource-steps.js +2 -2
  84. package/steps/setup/acl-management-steps.js +2 -2
  85. package/steps/setup/autocomplete-steps.js +6 -2
  86. package/steps/setup/connectors-steps.js +13 -0
  87. package/steps/setup/namespace-steps.js +1 -1
  88. package/steps/setup/plugins-steps.js +1 -1
  89. package/steps/setup/rdf-rank-steps.js +1 -5
  90. package/steps/setup/user-and-access-steps.js +9 -13
  91. package/steps/sparql-editor-steps.js +5 -0
  92. package/steps/toaster-steps.js +18 -6
  93. package/steps/ttyg/chat-panel-steps.js +19 -1
  94. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +42 -8
  95. package/steps/ttyg/ttyg-view-steps.js +6 -2
  96. package/steps/visual-graph-steps.js +23 -9
  97. package/steps/yasgui/yasgui-loader.js +3 -3
  98. package/steps/yasgui/yasgui-steps.js +1 -1
  99. package/stubs/guides/guides-stubs.js +55 -0
  100. package/stubs/repositories/repositories-stubs.js +151 -76
  101. package/stubs/similarity-index-stubs.js +4 -0
  102. package/stubs/yasgui/query-stubs.js +5 -1
  103. package/support/commands.js +2 -1
  104. package/support/connector-commands.js +13 -0
  105. package/support/e2e.js +3 -0
  106. package/support/repository-commands.js +9 -0
  107. package/support/settings-commands.js +16 -0
  108. package/utils/html-util.js +24 -4
  109. package/stubs/repositories-stub.js +0 -73
  110. /package/e2e-legacy/graphql/{graphql-endpoint-management-with-selected-repository.spec.jsx → graphql-endpoint-management-with-selected-repository.spec.js} +0 -0
  111. /package/e2e-legacy/help/guides/{star-wars-interactive-guide.js → star-wars-interactive-guide.spec.js} +0 -0
  112. /package/e2e-legacy/setup/sparql-template/{sparql-template-create.js → sparql-template-create.spec.js} +0 -0
@@ -0,0 +1,74 @@
1
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
2
+ import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
3
+ import {MainMenuSteps} from '../../../steps/main-menu-steps.js';
4
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
5
+ import {SimilarityIndexCreateSteps} from '../../../steps/explore/similarity-index-create-steps.js';
6
+ import {SimilarityIndexesSteps} from '../../../steps/explore/similarity-indexes-steps.js';
7
+
8
+ describe('Create similarity index guide steps', () => {
9
+ const FILE_TO_IMPORT = 'wine.rdf'
10
+ let repositoryId;
11
+
12
+ beforeEach(() => {
13
+ repositoryId = 'create-similarity-index-guide-' + Date.now();
14
+ GuidesStubs.stubCreateSimilarityIndexGuide();
15
+ cy.createRepository({id: repositoryId});
16
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
17
+ cy.presetRepository(repositoryId);
18
+
19
+ GuideSteps.visit();
20
+ GuideSteps.verifyGuidesListExists();
21
+ cy.wait('@getGuides');
22
+ GuideSteps.runFirstGuide()
23
+ });
24
+
25
+ afterEach(() => {
26
+ cy.deleteRepository(repositoryId);
27
+ });
28
+
29
+ it('Should create similarity index', () => {
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 1/8');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to create a Similarity index for your dataset.');
32
+ GuideDialogSteps.clickOnNextButton();
33
+
34
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 2/8');
35
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
36
+ MainMenuSteps.clickOnExplore();
37
+
38
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 3/8');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Similarity menu.');
40
+ MainMenuSteps.clickOnSubmenuSimilarity();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 4/8');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click the link to start creating a new Similarity index');
44
+ SimilarityIndexesSteps.clickCreateButton();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 5/8');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('Type a name for the index. You will refer to it later.');
48
+ SimilarityIndexCreateSteps.typeSimilarityIndexName('new-similarity-index');
49
+ GuideDialogSteps.clickOnNextButton();
50
+
51
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 6/8');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click the button to create the Similarity index.')
53
+ SimilarityIndexCreateSteps.create();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 8/8');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('Wait for index to be created')
57
+ GuideDialogSteps.clickOnNextButton();
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select by index name');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('In the Existing Indexes table, you can now see the new-similarity-index which is the similarity index we created with the previous query.')
61
+ GuideDialogSteps.clickOnNextButton();
62
+
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select by row index 0 (first row)');
64
+ GuideDialogSteps.assertDialogWithContentIsVisible('In the Existing Indexes table, you can now see the created index.')
65
+ GuideDialogSteps.clickOnNextButton();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select default index 0 (first row)');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('In the Existing Indexes table, you can now see the created index.')
69
+ GuideDialogSteps.clickOnNextButton();
70
+
71
+ GuideDialogSteps.clickOnCloseButton();
72
+ GuideDialogSteps.assertDialogIsClosed();
73
+ });
74
+ });
@@ -0,0 +1,55 @@
1
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
2
+ import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
3
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
4
+
5
+ describe('Download guide resource guide steps', () => {
6
+ let repositoryId;
7
+ const resourcePath = 'file-path';
8
+ const resourceFile = 'file.ttl';
9
+ const guideRepositoryId = 'test-repo';
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'download-guide-resource-guide-' + Date.now();
13
+ GuidesStubs.stubDownloadGuideResourceGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+
17
+ GuidesStubs.stubDownloadResource(resourcePath, resourceFile);
18
+
19
+ GuideSteps.visit();
20
+ GuideSteps.verifyGuidesListExists();
21
+ cy.wait('@getGuides');
22
+ GuideSteps.runFirstGuide();
23
+ });
24
+
25
+ afterEach(() => {
26
+ cy.deleteRepository(repositoryId);
27
+ });
28
+
29
+ it('Should guide through download guide resource', () => {
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Download guide resources');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide requires a file to be downloaded.');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Please download ${resourceFile}.`);
33
+ GuideSteps.downloadResource();
34
+
35
+ cy.wait('@resource-download').then((interception) => {
36
+ expect(interception.response.statusCode).to.eq(200);
37
+ cy.readFile(`cypress/downloads/${resourceFile}`);
38
+ });
39
+
40
+ GuideDialogSteps.clickOnNextButton();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Download guide resource - with repositoryId');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide requires a file to be downloaded.');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Please download ${resourceFile}.`);
45
+ GuideSteps.downloadResource(guideRepositoryId);
46
+
47
+ cy.wait('@resource-download').then((interception) => {
48
+ expect(interception.response.statusCode).to.eq(200);
49
+ cy.readFile(`cypress/downloads/${resourceFile}`);
50
+ });
51
+
52
+ GuideDialogSteps.clickOnCloseButton();
53
+ GuideDialogSteps.assertDialogIsClosed();
54
+ });
55
+ });
@@ -0,0 +1,69 @@
1
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
2
+ import createRepoGuideArray from '../../../fixtures/guides/create-repository/create-repository-guide.json';
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
5
+ import {RepositorySteps} from "../../../steps/repository-steps.js";
6
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
7
+
8
+ describe('Create repository guide', () => {
9
+ const createRepoGuide = createRepoGuideArray[0];
10
+ const repositoryId = createRepoGuide.options.repositoryIdBase = 'create-repo-guide-' + Date.now();
11
+
12
+ beforeEach(() => {
13
+ GuidesStubs.stubCreateRepositoryGuide(createRepoGuideArray);
14
+ GuideSteps.visit();
15
+ GuideSteps.verifyGuidesListExists();
16
+ cy.wait('@getGuides');
17
+ GuideSteps.runGuide(createRepoGuide.guideName.en)
18
+ });
19
+
20
+ afterEach(() => {
21
+ cy.deleteRepository(repositoryId);
22
+ });
23
+
24
+ it('Should create and select a repository', () => {
25
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 1/7');
26
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Repositories view to create a repository.');
27
+ GuideDialogSteps.clickOnNextButton();
28
+
29
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 2/7');
30
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
31
+ MainMenuSteps.clickOnMenuSetup();
32
+
33
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 3/7');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Repositories menu.');
35
+ MainMenuSteps.clickOnRepositoriesSubmenu();
36
+
37
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 4/7');
38
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Create new repository button.');
39
+ RepositorySteps.createRepository();
40
+
41
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 5/7');
42
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the GraphDB Repository button.');
43
+ RepositorySteps.clickGDBRepositoryTypeButton();
44
+
45
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 6/7');
46
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Enter repository ID: ${repositoryId}`);
47
+ RepositorySteps.typeRepoId(repositoryId);
48
+ GuideDialogSteps.clickOnNextButton();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 7/7');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Create button.');
52
+ RepositorySteps.saveRepository();
53
+
54
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connect to repository — 1/2')
55
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the repository selection dropdown.');
56
+ RepositorySteps.clickRepositoriesDropdown();
57
+
58
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connect to repository — 2/2');
59
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Click on the ${repositoryId}`);
60
+ RepositorySteps.selectRepositoryFromDropdown(repositoryId);
61
+
62
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Repositories');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click the connect repository icon');
64
+ RepositorySteps.clickConnectRepositoryButton(repositoryId);
65
+
66
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
67
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
68
+ })
69
+ })
@@ -0,0 +1,150 @@
1
+ import {SimilarityIndexStubs} from "../../../../stubs/similarity-index-stubs.js";
2
+ import {AutocompleteStubs} from "../../../../stubs/autocomplete/autocomplete-stubs.js";
3
+ import {GuideDialogSteps} from "../../../../steps/guides/guide-dialog-steps.js";
4
+ import {MainMenuSteps} from "../../../../steps/main-menu-steps.js";
5
+ import {TTYGViewSteps} from "../../../../steps/ttyg/ttyg-view-steps.js";
6
+ import {TtygAgentSettingsModalSteps} from "../../../../steps/ttyg/ttyg-agent-settings-modal.steps.js";
7
+ import {GuideSteps} from "../../../../steps/guides/guide-steps.js";
8
+ import {GuidesStubs} from "../../../../stubs/guides/guides-stubs.js";
9
+ import {TTYGStubs} from "../../../../stubs/ttyg/ttyg-stubs.js";
10
+ import {RepositoriesStubs} from "../../../../stubs/repositories/repositories-stubs.js";
11
+
12
+ describe('ttyg configure agent guide', () => {
13
+ let repositoryId;
14
+
15
+ beforeEach(() => {
16
+ GuidesStubs.stubCreateAndConfigureAgentGuide();
17
+ SimilarityIndexStubs.stubTTYGSimilarityInstances();
18
+ AutocompleteStubs.stubAutocompleteEnabled(true);
19
+ TTYGStubs.stubAgentDefaultsGet();
20
+ TTYGStubs.stubAgentListGet();
21
+ repositoryId = 'configure-ttyg-agent-guide-' + Date.now();
22
+ RepositoriesStubs.stubBaseEndpoints(repositoryId);
23
+ cy.createRepository({id: repositoryId});
24
+ cy.presetRepository(repositoryId);
25
+ GuideSteps.visit();
26
+ GuideSteps.verifyGuidesListExists();
27
+ cy.wait('@getGuides');
28
+ GuideSteps.runFirstGuide()
29
+ });
30
+
31
+ afterEach(() => {
32
+ cy.deleteRepository(repositoryId);
33
+ })
34
+
35
+ it('should create and configure TTYG agent with actions', () => {
36
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/29');
37
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agent.');
38
+ GuideDialogSteps.clickOnNextButton();
39
+
40
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/29');
41
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
42
+ MainMenuSteps.clickOnMenuLab();
43
+
44
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/29');
45
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
46
+ MainMenuSteps.clickOnTTYGSubmenu();
47
+
48
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 5/29');
49
+ GuideDialogSteps.assertDialogWithContentIsVisible('An agent is a helpful assistant that can answer your queries. You need to configure an agent in order to ask anything of Talk to Your Graph.');
50
+ GuideDialogSteps.clickOnNextButton();
51
+
52
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 7/29');
53
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the create agent button to create a new agent.');
54
+ TTYGViewSteps.clickCreateAgentButton();
55
+
56
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 9/29');
57
+ GuideDialogSteps.assertDialogWithContentIsVisible('Type a name for the agent. You will refer to it later.');
58
+ TtygAgentSettingsModalSteps.typeAgentName('MyAgent');
59
+ GuideDialogSteps.clickOnNextButton();
60
+
61
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 10/29');
62
+ GuideDialogSteps.assertDialogWithContentIsVisible('Here you can type the name of the OpenAI model to be used.');
63
+ TtygAgentSettingsModalSteps.clearLLMModel();
64
+ TtygAgentSettingsModalSteps.typeLLMModel('gpt-3.5-turbo');
65
+ GuideDialogSteps.clickOnNextButton();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 11/29');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('Sets the sampling temperature of the agent. Lower values result in more consistent, repetitive responses generated by the agent and higher values result in a wider variety of responses');
69
+ TtygAgentSettingsModalSteps.setTemperature(0.8);
70
+ GuideDialogSteps.clickOnNextButton();
71
+
72
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 12/29');
73
+ GuideDialogSteps.assertDialogWithContentIsVisible('Sets the nucleus sampling of the agent');
74
+ TtygAgentSettingsModalSteps.setTopP(0.9);
75
+ GuideDialogSteps.clickOnNextButton();
76
+
77
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/29');
78
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enabling SPARQL search allows the agent to answers questions by performing a SPARQL query.');
79
+ GuideDialogSteps.clickOnNextButton();
80
+
81
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/29');
82
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable SPARQL search query method.');
83
+ TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
84
+
85
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/29');
86
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable providing an ontology in a named graph.');
87
+ TtygAgentSettingsModalSteps.selectSparqlMethodOntologyGraph();
88
+
89
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/29');
90
+ GuideDialogSteps.assertDialogWithContentIsVisible('Type http://example.org/some/test/ontology as the named graph which contains the ontology.');
91
+ TtygAgentSettingsModalSteps.clearSparqlMethodOntologyGraphField();
92
+ TtygAgentSettingsModalSteps.typeSparqlMethodOntologyGraphField('http://example.org/some/test/ontology');
93
+ GuideDialogSteps.clickOnNextButton();
94
+
95
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 17/29');
96
+ GuideDialogSteps.assertDialogWithContentIsVisible('Check to automatically add missing namespaces.');
97
+ TtygAgentSettingsModalSteps.toggleAddMissingNamespacesCheckbox();
98
+
99
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 18/29');
100
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enabling FTS search allows the agent to answer questions by using full-text search in literals and IRIs.');
101
+ GuideDialogSteps.clickOnNextButton();
102
+
103
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 19/29');
104
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable FTS search query method.');
105
+ TtygAgentSettingsModalSteps.enableFtsExtractionMethod();
106
+
107
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 20/29');
108
+ GuideDialogSteps.assertDialogWithContentIsVisible('Type 100 as the maximum number of triples to retrieve per call.');
109
+ TtygAgentSettingsModalSteps.setFtsSearchMaxTriples(100);
110
+ GuideDialogSteps.clickOnNextButton();
111
+
112
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 21/29');
113
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enabling Similarity search allows the agent to answer questions by using Similarity search.');
114
+ GuideDialogSteps.clickOnNextButton();
115
+
116
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 22/29');
117
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Similarity search query method.');
118
+ TtygAgentSettingsModalSteps.enableSimilaritySearchMethodPanel();
119
+
120
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 23/29');
121
+ GuideDialogSteps.assertDialogWithContentIsVisible('Select the index to use for Similarity search.');
122
+ TtygAgentSettingsModalSteps.selectSimilarityIndex(0);
123
+ GuideDialogSteps.clickOnNextButton();
124
+
125
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 24/29');
126
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Full-text search in labels for IRI discovery');
127
+ TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
128
+
129
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 25/29');
130
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Autocomplete for IRI discovery.');
131
+ TtygAgentSettingsModalSteps.checkAutocompleteSearchCheckbox();
132
+
133
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 26/29');
134
+ GuideDialogSteps.assertDialogWithContentIsVisible('Set the Max number of results (IRIs) per call to 15');
135
+ TtygAgentSettingsModalSteps.setAutocompleteMaxResults(15);
136
+ GuideDialogSteps.clickOnNextButton();
137
+
138
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 27/29');
139
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enter the following in the input:');
140
+ TtygAgentSettingsModalSteps.clearUserInstructions();
141
+ TtygAgentSettingsModalSteps.getCodeToCopy().then(code => {
142
+ TtygAgentSettingsModalSteps.typeUserInstructions(code);
143
+ GuideDialogSteps.clickOnNextButton();
144
+ });
145
+
146
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 28/29');
147
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click to save the agent settings');
148
+ TtygAgentSettingsModalSteps.saveAgent();
149
+ });
150
+ })
@@ -0,0 +1,88 @@
1
+ import {GuidesStubs} from "../../../../stubs/guides/guides-stubs.js";
2
+ import {TTYGStubs} from "../../../../stubs/ttyg/ttyg-stubs.js";
3
+ import {GuideSteps} from "../../../../steps/guides/guide-steps.js";
4
+ import {GuideDialogSteps} from "../../../../steps/guides/guide-dialog-steps.js";
5
+ import {TTYGViewSteps} from "../../../../steps/ttyg/ttyg-view-steps.js";
6
+ import {ChatPanelSteps} from "../../../../steps/ttyg/chat-panel-steps.js";
7
+ import {RepositoriesStubs} from "../../../../stubs/repositories/repositories-stubs.js";
8
+ import {TtygAgentSettingsModalSteps} from "../../../../steps/ttyg/ttyg-agent-settings-modal.steps.js";
9
+ import {BrowserStubs} from "../../../../stubs/browser-stubs.js";
10
+
11
+ describe('ttyg-conversation-guide', () => {
12
+ let repositoryId = 'starwars';
13
+
14
+ beforeEach(() => {
15
+ BrowserStubs.stubWindowOpen();
16
+ RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
17
+ RepositoriesStubs.stubBaseEndpoints(repositoryId);
18
+ cy.presetRepository(repositoryId);
19
+ GuidesStubs.stubTTYGConversationGuide();
20
+ TTYGStubs.stubAgentDefaultsGet();
21
+ TTYGStubs.stubChatsListGet();
22
+ TTYGStubs.stubAgentListGet();
23
+ TTYGStubs.stubChatGet();
24
+ TTYGStubs.stubCreateNewChat();
25
+ TTYGStubs.stubExplainResponse('/ttyg/chats/explain-response-3.json');
26
+
27
+ GuideSteps.visit();
28
+ GuideSteps.verifyGuidesListExists();
29
+
30
+ GuideSteps.runFirstGuide()
31
+ cy.wait('@getGuides');
32
+ cy.wait('@get-chat-list');
33
+ cy.wait('@get-agent-list');
34
+ cy.wait('@get-all-repositories');
35
+ cy.wait('@get-chat');
36
+ });
37
+
38
+ it('should select an agent and have a conversation', () => {
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select an agent — 1/5');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('To talk to your graph, you need to select an agent first');
41
+ GuideDialogSteps.clickOnNextButton();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select an agent — 2/5');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the agents dropdown to see available agents');
45
+ TTYGViewSteps.openAgentsMenu();
46
+
47
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Select an agent — 3/5');
48
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on you agent from the dropdown to select it');
49
+ TTYGViewSteps.selectAgent(0);
50
+
51
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Conversation with the agent — 2/12');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click the button to create a new chat');
53
+ TTYGViewSteps.createANewChat();
54
+
55
+ const codeToType = 'Count all the web pages published in 2020? Provide five sample names.'
56
+
57
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 3/12');
58
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Type "${codeToType}" in the input and press enter`);
59
+ ChatPanelSteps.typeQuestion(codeToType);
60
+ ChatPanelSteps.askQuestionWithEnter();
61
+
62
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 4/12');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Wait for the answer to be returned and explore it. When ready proceed by clicking next.`);
64
+ ChatPanelSteps.waitForLoaderToDisappear();
65
+ GuideDialogSteps.clickOnNextButton();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 6/12');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Explain the answer by clicking on the 'Explain response' button.`);
69
+ TTYGViewSteps.clickOnExplainResponse(0);
70
+
71
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 7/12');
72
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Wait for the answer to be returned and explore it. When ready proceed by clicking next.`);
73
+ ChatPanelSteps.waitForLoaderToDisappear();
74
+ GuideDialogSteps.clickOnNextButton();
75
+
76
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 9/12');
77
+ GuideDialogSteps.assertDialogWithContentIsVisible(`You can open the query in the SPARQL editor by clicking on 'Open in SPARQL editor' button. When you are ready, return to the page.`);
78
+ TtygAgentSettingsModalSteps.clickOpenQueryInSparqlEditor();
79
+
80
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 11/12');
81
+ GuideDialogSteps.assertDialogWithContentIsVisible(`You can ask the agent how it derived the answer by clicking on the button`);
82
+ TTYGViewSteps.clickOnHowDeliverAnswerButton();
83
+
84
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 12/12');
85
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Wait for the answer to be returned and explore it. When ready proceed by clicking next.`);
86
+ GuideDialogSteps.clickOnCloseButton();
87
+ });
88
+ })
@@ -1,20 +1,18 @@
1
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";
2
+ import {SecurityStubs} from '../../stubs/security-stubs';
3
+ import {SettingsSteps} from '../../steps/setup/settings-steps';
4
+ import {LicenseStubs} from '../../stubs/license-stubs';
6
5
 
7
6
  Cypress.env('set_default_user_data', false);
8
7
 
9
-
10
8
  describe('Cookie policy', () => {
11
9
  beforeEach(() => {
12
- cy.setDefaultUserData(false);
10
+ cy.setCookieConsent(undefined);
13
11
  cy.viewport(1280, 1000);
14
12
  LicenseStubs.stubFreeLicense();
15
13
  });
16
14
 
17
- afterEach(() => cy.setDefaultUserData());
15
+ afterEach(() => cy.setCookieConsent(true));
18
16
 
19
17
  context('should show', () => {
20
18
  it('Should show consent popup to user', () => {
@@ -71,13 +69,15 @@ describe('Cookie policy', () => {
71
69
  });
72
70
 
73
71
  it('Should set cookies for tracking when accepted', () => {
72
+ cy.intercept('PATCH', `/rest/security/users/admin`).as('updateUser');
74
73
  HomeSteps.visitInProdMode();
75
- SecurityStubs.stubUpdateUserData('admin');
76
74
 
77
75
  // When I click Agree button
78
76
  HomeSteps.clickAgreeButton();
79
77
 
80
78
  // I expect to save cookie consent in user settings
79
+ // There are two requests one from the new shared component and one in the legacy
80
+ cy.wait('@updateUser');
81
81
  cy.wait('@updateUser');
82
82
 
83
83
  // Check if the GA tracking script is set correctly in the head
@@ -74,7 +74,10 @@ describe('RDF resource search', () => {
74
74
  // Given: There is a repository selected and I visit a page other than home.
75
75
  cy.presetRepository(repositoryId);
76
76
  ImportSteps.visit();
77
+ ImportSteps.getView().should('be.visible');
77
78
  BrowserStubs.stubWindowOpen();
79
+ // Then: Search rdf button should be visible
80
+ RdfResourceSearchSteps.getOpenButton().should('be.visible');
78
81
  // When: I open the search resource component
79
82
  RdfResourceSearchSteps.openRdfSearchBox();
80
83
  //Then: I should be able to type some text in the input
@@ -109,6 +112,9 @@ describe('RDF resource search', () => {
109
112
  cy.importServerFile(repositoryId, FILE_TO_IMPORT);
110
113
  // And: I visit the home page
111
114
  HomeSteps.visitAndWaitLoader();
115
+ HomeSteps.getView().should('be.visible');
116
+ HomeSteps.getRdfResourceSearchInput().should('be.visible');
117
+ RdfResourceSearchSteps.getShowViewResourceMessageButton().should('be.visible');
112
118
 
113
119
  // When: I click on the RDF resource search button
114
120
  RdfResourceSearchSteps.clickOnShowViewResourceMessageButton();
@@ -119,6 +125,12 @@ describe('RDF resource search', () => {
119
125
  //Navigate away from the Homepage, to be able to test the new resource search box
120
126
  HomeSteps.visitAndWaitLoader();
121
127
  BrowserStubs.stubWindowOpen();
128
+ HomeSteps.getView().should('be.visible');
129
+ HomeSteps.getRdfResourceSearchInput().should('be.visible');
130
+ RdfResourceSearchSteps.getShowViewResourceMessageButton().should('be.visible');
131
+
132
+ // Then: The input for RDF resource search should not be visible (This is the legacy component used prior to the migration)
133
+ HomeSteps.getRdfResourceSearchInput().should('be.visible');
122
134
  // When: I click on the RDF resource search button
123
135
  RdfResourceSearchSteps.clickOnShowViewResourceMessageButton();
124
136
  // Then: The input for RDF resource search should be visible (This is the legacy component used prior to the migration)
@@ -28,7 +28,7 @@ describe('Import server files', () => {
28
28
  // When I switch to the server files tab
29
29
  ImportUserDataSteps.openServerFilesTab();
30
30
  // Then Server files tab should be active
31
- cy.url().should('include', '/import#server');
31
+ cy.url().should('include', '/import').and('include', '#server');
32
32
  ImportServerFilesSteps.getActiveTab().should('have.text', 'Server files');
33
33
  ImportServerFilesSteps.getResourcesTable().should('be.visible');
34
34
  });
@@ -37,7 +37,7 @@ describe('Import server files', () => {
37
37
  // When I visit the import page through a direct link to the server files tab
38
38
  cy.visit('/import#server');
39
39
  // Then Server files tab should be active
40
- cy.url().should('include', '/import#server');
40
+ cy.url().should('include', '/import').and('include', '#server');
41
41
  ImportServerFilesSteps.getActiveTab().should('have.text', 'Server files');
42
42
  ImportServerFilesSteps.getResourcesTable().should('be.visible');
43
43
  });
@@ -1,7 +1,7 @@
1
1
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
2
- import {MainMenuSteps} from "../../steps/main-menu-steps";
3
2
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
4
3
  import {FileOverwriteDialogSteps} from "../../steps/import/file-overwrite-dialog-steps";
4
+ import {HeaderSteps} from '../../steps/header-steps.js';
5
5
 
6
6
  const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
7
7
  \t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
@@ -148,7 +148,7 @@ describe('Import user data: File upload', () => {
148
148
  ImportUserDataSteps.getResources().should('have.length', 1);
149
149
  ImportUserDataSteps.checkUserDataUploadedResource(0, 'bnodes.ttl');
150
150
  // And the file should really be there
151
- MainMenuSteps.openHomePage();
151
+ HeaderSteps.openHomePage();
152
152
  ImportUserDataSteps.visit();
153
153
  ImportUserDataSteps.getResources().should('have.length', 1);
154
154
  });
@@ -168,7 +168,7 @@ describe('Import user data: File upload', () => {
168
168
  ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
169
169
  ImportUserDataSteps.checkImportedResource(1, 'bnodes.ttl');
170
170
  // And the files should really be there
171
- MainMenuSteps.openHomePage();
171
+ HeaderSteps.openHomePage();
172
172
  ImportUserDataSteps.visit();
173
173
  ImportUserDataSteps.getResources().should('have.length', 2);
174
174
  });
@@ -25,7 +25,7 @@ describe('Import user data', () => {
25
25
  // Given I have visited the import page
26
26
  ImportUserDataSteps.visit();
27
27
  // When the page is loaded
28
- cy.url().should('include', '/import#user');
28
+ cy.url().should('include', '/import').and('include', '#user');
29
29
  // Then I should see the user help icons
30
30
  ImportUserDataSteps.showPageInfoPopover();
31
31
  ImportUserDataSteps.getPageInfoPopoverTitle()
@@ -59,7 +59,7 @@ describe('Import user data', () => {
59
59
  ImportUserDataSteps.openServerFilesTabFromWarning();
60
60
  // Then I should see the server files tab
61
61
  ImportUserDataSteps.getActiveTab().should('have.text', 'Server files');
62
- cy.url().should('include', '/import#server');
62
+ cy.url().should('include', '/import').and('include', '#server');
63
63
  ImportUserDataSteps.getServerFilesTab().should('be.visible');
64
64
  // When I click on the API link in the warning
65
65
  ImportUserDataSteps.openUserDataTab();
@@ -187,7 +187,7 @@ describe('Ontop repositories', () => {
187
187
  // The Ontop repository should be created
188
188
  RepositorySteps.visit();
189
189
  // The repository list should contain the new repository, which can be activated
190
- RepositorySteps.clickRepositoryConnectionOffBtn(repositoryId);
190
+ RepositorySteps.activateRepository(repositoryId);
191
191
  // When the repository is restarted
192
192
  RepositorySteps.restartRepository(repositoryId);
193
193
  ModalDialogSteps.getDialogBody().should('contain', repositoryId);
@@ -102,7 +102,7 @@ describe('Repositories', () => {
102
102
  // Check the repo is present in the list of repos and we are not yet connected to it
103
103
  RepositorySteps.getRepositoryFromList(repositoryId)
104
104
  .should('be.visible')
105
- .find('.icon-connection-off')
105
+ .find('.ri-link-unlink')
106
106
  .should('be.visible');
107
107
 
108
108
  // Verify it's configuration can be downloaded