graphdb-workbench-tests 3.3.0-TR4 → 3.3.0-TR5

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 (35) hide show
  1. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +2 -2
  2. package/e2e-legacy/explore/class-relationships/class-relationships.spec.js +3 -1
  3. package/e2e-legacy/guides/autocomplete/enable-autocomplete-guide.spec.js +49 -0
  4. package/e2e-legacy/guides/class-hierarcy/class-hierarchy-guide.spec.js +89 -0
  5. package/e2e-legacy/guides/class-relations/class-relations-guide.spec.js +76 -0
  6. package/e2e-legacy/guides/connectors/connectors-guide.spec.js +152 -0
  7. package/e2e-legacy/guides/repositories/create-repository-guide.spec.js +16 -14
  8. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +150 -0
  9. package/e2e-legacy/import/import-user-data-file-upload.spec.js +3 -3
  10. package/e2e-legacy/setup/autocomplete/autocomplete.spec.js +1 -1
  11. package/fixtures/guides/autocomplete/enable-autocomplete-guide.json +12 -0
  12. package/fixtures/guides/class-hierarchy/class-hierarchy-guide.json +35 -0
  13. package/fixtures/guides/class-relations/class-relations-guide.json +33 -0
  14. package/fixtures/guides/connectors/connectors-guide.json +66 -0
  15. package/fixtures/guides/connectors/lucene-connector-guide.json +106 -0
  16. package/fixtures/guides/create-repository/create-repository-guide.json +1 -3
  17. package/fixtures/guides/ttyg/configure-agent/configure-ttyg-agent-guide.json +69 -0
  18. package/fixtures/similarity/get-ttyg-similarity-instances.json +10 -0
  19. package/npm-shrinkwrap.json +2 -2
  20. package/package.json +2 -1
  21. package/steps/class-views-steps.js +15 -2
  22. package/steps/guides/guide-dialog-steps.js +16 -0
  23. package/steps/guides/guide-steps.js +12 -0
  24. package/steps/header-steps.js +9 -0
  25. package/steps/main-menu-steps.js +16 -4
  26. package/steps/modal-dialog-steps.js +3 -1
  27. package/steps/operations-statuses-component-steps.js +1 -1
  28. package/steps/setup/autocomplete-steps.js +4 -0
  29. package/steps/setup/connectors-steps.js +13 -0
  30. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +34 -8
  31. package/steps/ttyg/ttyg-view-steps.js +5 -1
  32. package/stubs/guides/guides-stubs.js +37 -0
  33. package/stubs/similarity-index-stubs.js +4 -0
  34. package/support/commands.js +2 -1
  35. package/support/connector-commands.js +13 -0
@@ -1,7 +1,7 @@
1
1
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
- import {MainMenuSteps} from "../../steps/main-menu-steps";
4
3
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-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" .`;
@@ -146,7 +146,7 @@ describe('Import user data: Batch operations', {retries: {runMode: 2}}, () => {
146
146
  ModalDialogSteps.clickOnConfirmButton();
147
147
  // Then the files should be deleted
148
148
  ImportUserDataSteps.getResources().should('have.length', 0);
149
- MainMenuSteps.openHomePage();
149
+ HeaderSteps.openHomePage();
150
150
  ImportUserDataSteps.visit();
151
151
  ImportUserDataSteps.getResources().should('have.length', 0);
152
152
  });
@@ -43,7 +43,9 @@ describe('Class relations screen validation', () => {
43
43
  });
44
44
  // Diagram should be visible and showing 10 classes
45
45
  ClassRelationshipsSteps.getDependenciesDiagram().should('be.visible').within(() => {
46
- cy.get('.group').should('have.length', 10);
46
+ cy.get('.group').should('have.length', 10);
47
+ // Ensure only one SVG/viewBox is rendered
48
+ cy.get('svg').should('have.length', 1);
47
49
  });
48
50
  });
49
51
 
@@ -0,0 +1,49 @@
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 {AutocompleteSteps} from '../../../steps/setup/autocomplete-steps.js';
5
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
6
+
7
+ describe('Enable autocomplete guide steps', () => {
8
+ let repositoryId;
9
+
10
+ beforeEach(() => {
11
+ repositoryId = 'enable-autocomplete-guide-' + Date.now();
12
+ GuidesStubs.stubEnableAutocompleteGuide();
13
+ cy.createRepository({id: repositoryId});
14
+ cy.presetRepository(repositoryId);
15
+
16
+ GuideSteps.visit();
17
+ GuideSteps.verifyGuidesListExists();
18
+ cy.wait('@getGuides');
19
+ GuideSteps.runFirstGuide()
20
+ });
21
+
22
+ afterEach(() => {
23
+ cy.deleteRepository(repositoryId);
24
+ });
25
+
26
+ it('Should enable autocomplete', () => {
27
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 1/5');
28
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Autocomplete index view to enable the autocomplete index.');
29
+ GuideDialogSteps.clickOnNextButton();
30
+
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 2/5');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
33
+ MainMenuSteps.clickOnMenuSetup();
34
+
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 3/5');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Autocomplete menu.');
37
+ MainMenuSteps.clickOnSubmenuAutocomplete();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 4/5');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the checkbox to enable the index.');
41
+ AutocompleteSteps.enableToggleAutocomplete();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 5/5');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('Wait until indexing finished.');
45
+
46
+ GuideDialogSteps.clickOnCloseButton();
47
+ GuideDialogSteps.assertDialogIsClosed();
48
+ });
49
+ });
@@ -0,0 +1,89 @@
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 ClassViewsSteps from '../../../steps/class-views-steps.js';
6
+
7
+ describe('Class hierarchy guide steps', () => {
8
+ let repositoryId;
9
+ const FILE_TO_IMPORT = 'swapi-dataset.ttl';
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'class-hierarchy-guide-' + Date.now();
13
+ GuidesStubs.stubClassHierarchyGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
17
+
18
+ GuideSteps.visit();
19
+ GuideSteps.verifyGuidesListExists();
20
+ cy.wait('@getGuides');
21
+ GuideSteps.runFirstGuide();
22
+ });
23
+
24
+ afterEach(() => {
25
+ cy.deleteRepository(repositoryId);
26
+ });
27
+
28
+ it('Should test class hierarchy', () => {
29
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 1/7');
30
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on voc:Sentient to show its instances.');
31
+ ClassViewsSteps.selectClassElement('voc:Sentient');
32
+
33
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 2/7');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('The side panel shows the first 1,000 instances of the clicked class, voc:Sentient.');
35
+ GuideDialogSteps.clickOnNextButton();
36
+
37
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 3/7');
38
+ GuideDialogSteps.assertDialogWithContentIsVisible('https://swapi.co/resource/aleena/47 is an instance of the class voc:Sentient.');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is planet');
40
+ GuideDialogSteps.clickOnNextButton();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 4/7');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This link shows the number of instances for the selected class, voc:Sentient. Click on the link to open the SPARQL editor with a preloaded query that selects all instances.');
44
+ ClassViewsSteps.clickInstanceCountLink();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 5/7');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('This SPARQL query selects all instances of the class voc:Sentient. The query was entered automatically when you clicked on the view instances link.');
48
+ GuideDialogSteps.clickOnNextButton();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 6/7');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('The table shows the results. Note that in this particular case, the query was executed automatically.');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('Do not worry — there will be a dedicated section on the SPARQL editor later in the guide.');
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class hierarchy instances — 7/7');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('You can close the panel by clicking on the X icon.');
57
+ ClassViewsSteps.closeInfoSidePanel();
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 1/7');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Class hierarchy view to inspect the class hierarchy and gain an insight on what the dataset contains.');
61
+ GuideDialogSteps.clickOnNextButton();
62
+
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 2/7');
64
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
65
+ MainMenuSteps.clickOnExplore();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 3/7');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class hierarchy menu.');
69
+ MainMenuSteps.clickOnSubmenuClassHierarchy();
70
+
71
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 4/7');
72
+ GuideDialogSteps.assertDialogWithContentIsVisible('The biggest circle shows all top-level classes. Every class may have subclasses shown as smaller circles within their parent class. The size of each circle indicates the proportion of RDF resources that belong to that class. Thus, bigger circles are classes that have more instances.');
73
+ GuideDialogSteps.clickOnNextButton();
74
+
75
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 5/7');
76
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is some extra content here');
77
+ GuideDialogSteps.clickOnNextButton();
78
+
79
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 6/7');
80
+ GuideDialogSteps.assertDialogWithContentIsVisible('The class voc:Sentient is a parent class that has subclasses. Zoom inside to have a better view by scrolling up with the mouse inside the circle.');
81
+ GuideDialogSteps.clickOnNextButton();
82
+
83
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 7/7');
84
+ GuideDialogSteps.assertDialogWithContentIsVisible('Within voc:Sentient are subclasses like voc:Human (humanoids), voc:Droid (mechanical intelligences), voc:Gungan (the Gungan species), and voc:Yodasspecies (Yoda’s lineage), highlighting the diverse forms of sentient life.');
85
+
86
+ GuideDialogSteps.clickOnCloseButton();
87
+ GuideDialogSteps.assertDialogIsClosed();
88
+ });
89
+ });
@@ -0,0 +1,76 @@
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
+
6
+ describe('Class relations guide steps', () => {
7
+ let repositoryId;
8
+ const FILE_TO_IMPORT = 'swapi-dataset.ttl';
9
+ const SECOND_FILE_TO_IMPORT = 'wine.rdf';
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'class-relations-guide-' + Date.now();
13
+ GuidesStubs.stubClassRelationsGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
17
+ cy.importServerFile(repositoryId, SECOND_FILE_TO_IMPORT, {context: 'http://wine.org/'});
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 test class relations guide steps', () => {
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 1/5');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Class relationships view to explore how classes are connected and understand the relationships between different types of data in your dataset.');
32
+ GuideDialogSteps.clickOnNextButton();
33
+
34
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 2/5');
35
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
36
+ MainMenuSteps.clickOnExplore();
37
+
38
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 3/5');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class relationships menu.');
40
+ MainMenuSteps.clickOnSubmenuClassRelationships();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 4/5');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('This view shows how data instances from different classes are connected based on real RDF statements.');
44
+ GuideDialogSteps.clickOnNextButton();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 5/5');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('Some extra info');
48
+ GuideDialogSteps.clickOnNextButton();
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('Each connection line varies in thickness based on the number of links, color based on the class with more incoming links, and direction as links may go both ways (from class A to class B and vice versa).');
52
+ GuideDialogSteps.clickOnNextButton();
53
+
54
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
55
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on any connection line in the diagram to see the top predicates used between those two classes. This helps to understand what kind of relationships link them.');
56
+ GuideDialogSteps.clickOnNextButton();
57
+
58
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
59
+ GuideDialogSteps.assertDialogWithContentIsVisible('If the repository contains more than one named graph, you can filter the view by opening the All graphs dropdown (next to the toolbar) and selecting the graph to explore.');
60
+ GuideDialogSteps.clickOnNextButton();
61
+
62
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible('The left panel shows all classes, sorted by number of links, displaying both incoming and outgoing connections.');
64
+ GuideDialogSteps.clickOnNextButton();
65
+
66
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
67
+ GuideDialogSteps.assertDialogWithContentIsVisible('A green background behind a class name in the list indicates that it is currently shown in the diagram.');
68
+ GuideDialogSteps.clickOnNextButton();
69
+
70
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Class relationships');
71
+ GuideDialogSteps.assertDialogWithContentIsVisible('Use the + / – icons next to each class name to add or remove it from the diagram display.');
72
+
73
+ GuideDialogSteps.clickOnCloseButton();
74
+ GuideDialogSteps.assertDialogIsClosed();
75
+ });
76
+ });
@@ -0,0 +1,152 @@
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
+ import {ConnectorsSteps} from '../../../steps/setup/connectors-steps.js';
5
+
6
+ describe('Connectors guide', () => {
7
+ let repositoryId;
8
+
9
+ beforeEach(() => {
10
+ repositoryId = 'connectors-guide-' + Date.now();
11
+ cy.createRepository({id: repositoryId});
12
+ cy.presetRepository(repositoryId);
13
+ });
14
+
15
+ afterEach(() => {
16
+ cy.deleteRepository(repositoryId);
17
+ });
18
+
19
+ describe('General connectors guide steps', () => {
20
+ const instanceName = 'LuceneConnector';
21
+ beforeEach(() => {
22
+ GuidesStubs.stubConnectorsGuide();
23
+ cy.createConnector(repositoryId, 'lucene', instanceName);
24
+
25
+ GuideSteps.visit();
26
+ GuideSteps.verifyGuidesListExists();
27
+ cy.wait('@getGuides');
28
+ GuideSteps.runFirstGuide();
29
+ });
30
+ it('Should test connectors steps', () => {
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
32
+ GuideDialogSteps.assertDialogWithContentIsVisible('GraphDB Connectors let you integrate external components and services with your repository data. They extend what your applications can do and stay automatically in sync with repository updates.');
33
+ GuideDialogSteps.clickOnNextButton();
34
+
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
36
+ GuideDialogSteps.assertDialogWithContentIsVisible('Specific GraphDB Connectors provide different connection possibilities.');
37
+ GuideDialogSteps.clickOnNextButton();
38
+
39
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
40
+ GuideDialogSteps.assertDialogWithContentIsVisible('Each section represents a single connector instance. For every instance, you can use the buttons on the right to copy, repair, or delete it.');
41
+ GuideDialogSteps.clickOnNextButton();
42
+
43
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
44
+ GuideDialogSteps.assertDialogWithContentIsVisible('To view the configuration of a connector, click on its name. This will expand the connector details.');
45
+ ConnectorsSteps.expandConnector('Lucene', instanceName);
46
+
47
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
48
+ GuideDialogSteps.assertDialogWithContentIsVisible('The creation parameters for luc:createConnector define how a connector instance is created. They are provided in a JSON object with parameter names as keys. Some parameters are required, others optional, and values can be simple types, lists, or objects');
49
+ GuideDialogSteps.clickOnNextButton();
50
+
51
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
52
+ GuideDialogSteps.assertDialogWithContentIsVisible('A parameter can define how an instance is created. Its value may be a simple type, a list, or an object, and it can be required or optional.');
53
+ GuideDialogSteps.clickOnNextButton();
54
+
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
56
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on View SPARQL Query to view the connector creation query.');
57
+ ConnectorsSteps.viewSPARQLQuery('Lucene', instanceName);
58
+
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
60
+ GuideDialogSteps.assertDialogWithContentIsVisible('The dialog displays the SPARQL query used to create the connector. You can copy it to execute manually or integrate it into automation scripts.');
61
+ GuideDialogSteps.clickOnNextButton();
62
+
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
64
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on close button to close the dialog');
65
+ ConnectorsSteps.closeSPARQLQueryDialog();
66
+
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
68
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
69
+ });
70
+ });
71
+
72
+ describe('Lucene connector guide steps', () => {
73
+ const instanceName = 'NamedIndividuals';
74
+ beforeEach(() => {
75
+ GuidesStubs.stubLuceneConnectorsGuide();
76
+ cy.createConnector(repositoryId, 'lucene', instanceName);
77
+
78
+ GuideSteps.visit();
79
+ GuideSteps.verifyGuidesListExists();
80
+ cy.wait('@getGuides');
81
+ GuideSteps.runFirstGuide();
82
+ });
83
+ it.only('Should test Lucene connector steps', () => {
84
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
85
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Lucene Connector in GraphDB enables extremely fast keyword and faceted (aggregation) searches. Unlike traditional setups where indexing is handled externally, this connector stays automatically synchronized with your repository data, ensuring accurate and up-to-date search results at all times.');
86
+ GuideDialogSteps.clickOnNextButton();
87
+
88
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
89
+ GuideDialogSteps.assertDialogWithContentIsVisible('This is the Lucene connector named NamedIndividuals. You can copy, restart, or delete it using the icons on the right.');
90
+ GuideDialogSteps.clickOnNextButton();
91
+
92
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
93
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on NamedIndividuals to view its configuration.');
94
+ ConnectorsSteps.expandConnector('Lucene', instanceName);
95
+
96
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
97
+ GuideDialogSteps.assertDialogWithContentIsVisible('The fields define exactly what parts of each entity will be synchronized as well as the specific details on the connector side. The field is the smallest synchronization unit, and it maps a property chain from GraphDB to a field in Lucene. The fields are specified as a list of field objects. At least one field object is required.');
98
+ GuideDialogSteps.clickOnNextButton();
99
+
100
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
101
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Field name defines the mapping on the connector side and is specified as a string. It is also used at query time to reference the field.');
102
+ GuideDialogSteps.clickOnNextButton();
103
+
104
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
105
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Property chain defines the mapping on the GraphDB side. A property chain is a sequence of triples where the entity IRI is the subject of the first triple, its object is the subject of the next triple, and so on. A single-element property chain corresponds to a direct property. Property chains are specified as a list of IRIs, with at least one required.');
106
+ GuideDialogSteps.clickOnNextButton();
107
+
108
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
109
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Indexed option determines whether the field is searchable with Lucene queries. By default, indexing is enabled.');
110
+ GuideDialogSteps.clickOnNextButton();
111
+
112
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
113
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Stored option determines whether the field’s values are stored in Lucene. By default, fields are stored (true).');
114
+ GuideDialogSteps.clickOnNextButton();
115
+
116
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
117
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Analyzed option determines whether literal fields are processed by the analyzer when indexed. IRIs are never analyzed. By default, fields are analyzed (true).');
118
+ GuideDialogSteps.clickOnNextButton();
119
+
120
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
121
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Multivalued option specifies whether multiple values for RDF properties are synchronized to Lucene. True by default; if false, only a single value is synchronized.');
122
+ GuideDialogSteps.clickOnNextButton();
123
+
124
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
125
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Facet option specifies whether the field is available for faceted searches in Lucene. Managed by the facet option (boolean, true by default).');
126
+ GuideDialogSteps.clickOnNextButton();
127
+
128
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
129
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Languages option defines which RDF literal languages are mapped to the connector. You can provide a list of language ranges to include specific languages, or an empty range to include literals without a language tag.');
130
+ GuideDialogSteps.clickOnNextButton();
131
+
132
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
133
+ GuideDialogSteps.assertDialogWithContentIsVisible('The Types option specifies RDF types of entities to synchronize, given as a list of IRIs (at least one required).Special values: $any: sync entities with at least one RDF type.$untyped: sync entities even if they have no RDF type.');
134
+ GuideDialogSteps.clickOnNextButton();
135
+
136
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
137
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on View SPARQL Query to view the Lucene connector creation query.');
138
+ ConnectorsSteps.viewSPARQLQuery('Lucene', instanceName);
139
+
140
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Lucene connector');
141
+ GuideDialogSteps.assertDialogWithContentIsVisible('The dialog displays the SPARQL query used to create the Lucene connector. You can copy it to execute manually or integrate it into automation scripts.');
142
+ GuideDialogSteps.clickOnNextButton();
143
+
144
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors');
145
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on close button to close the dialog');
146
+ ConnectorsSteps.closeSPARQLQueryDialog();
147
+
148
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
149
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
150
+ });
151
+ });
152
+ });
@@ -3,16 +3,18 @@ import createRepoGuideArray from '../../../fixtures/guides/create-repository/cre
3
3
  import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
4
  import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
5
5
  import {RepositorySteps} from "../../../steps/repository-steps.js";
6
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
6
7
 
7
8
  describe('Create repository guide', () => {
8
9
  const createRepoGuide = createRepoGuideArray[0];
9
- const repositoryId = createRepoGuide.options.repositoryIdBase;
10
+ const repositoryId = createRepoGuide.options.repositoryIdBase = 'create-repo-guide-' + Date.now();
10
11
 
11
12
  beforeEach(() => {
12
- cy.intercept('/rest/guides', {fixture: '../fixtures/guides/create-repository/create-repository-guide.json'}).as('getGuides');
13
+ GuidesStubs.stubCreateRepositoryGuide(createRepoGuideArray);
13
14
  GuideSteps.visit();
14
- GuideSteps.runGuide(createRepoGuide.guideName.en)
15
+ GuideSteps.verifyGuidesListExists();
15
16
  cy.wait('@getGuides');
17
+ GuideSteps.runGuide(createRepoGuide.guideName.en)
16
18
  });
17
19
 
18
20
  afterEach(() => {
@@ -21,47 +23,47 @@ describe('Create repository guide', () => {
21
23
 
22
24
  it('Should create and select a repository', () => {
23
25
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 1/7');
24
- GuideDialogSteps.getContent().should('contain.text', 'The following steps show how to use the Repositories view to create a repository.');
26
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Repositories view to create a repository.');
25
27
  GuideDialogSteps.clickOnNextButton();
26
28
 
27
29
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 2/7');
28
- GuideDialogSteps.getContent().should('contain.text', 'Click on the Setup menu.');
30
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
29
31
  MainMenuSteps.clickOnMenuSetup();
30
32
 
31
33
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 3/7');
32
- GuideDialogSteps.getContent().should('contain.text', 'Click on the Repositories menu.');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Repositories menu.');
33
35
  MainMenuSteps.clickOnRepositoriesSubmenu();
34
36
 
35
37
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 4/7');
36
- GuideDialogSteps.getContent().should('contain.text', 'Click on the Create new repository button.');
38
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Create new repository button.');
37
39
  RepositorySteps.createRepository();
38
40
 
39
41
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 5/7');
40
- GuideDialogSteps.getContent().should('contain.text', 'Click on the GraphDB Repository button.');
42
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the GraphDB Repository button.');
41
43
  RepositorySteps.clickGDBRepositoryTypeButton();
42
44
 
43
45
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 6/7');
44
- GuideDialogSteps.getContent().should('contain.text', `Enter repository ID: ${repositoryId}`);
46
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Enter repository ID: ${repositoryId}`);
45
47
  RepositorySteps.typeRepoId(repositoryId);
46
48
  GuideDialogSteps.clickOnNextButton();
47
49
 
48
50
  GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 7/7');
49
- GuideDialogSteps.getContent().should('contain.text', 'Click on the Create button.');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Create button.');
50
52
  RepositorySteps.saveRepository();
51
53
 
52
54
  GuideDialogSteps.assertDialogWithTitleIsVisible('Connect to repository — 1/2')
53
- GuideDialogSteps.getContent().should('contain.text', 'Click on the repository selection dropdown.');
55
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the repository selection dropdown.');
54
56
  RepositorySteps.clickRepositoriesDropdown();
55
57
 
56
58
  GuideDialogSteps.assertDialogWithTitleIsVisible('Connect to repository — 2/2');
57
- GuideDialogSteps.getContent().should('contain.text', `Click on the ${repositoryId}`);
59
+ GuideDialogSteps.assertDialogWithContentIsVisible(`Click on the ${repositoryId}`);
58
60
  RepositorySteps.selectRepositoryFromDropdown(repositoryId);
59
61
 
60
62
  GuideDialogSteps.assertDialogWithTitleIsVisible('Repositories');
61
- GuideDialogSteps.getContent().should('contain.text', 'Click the connect repository icon');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click the connect repository icon');
62
64
  RepositorySteps.clickConnectRepositoryButton(repositoryId);
63
65
 
64
66
  GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
65
- GuideDialogSteps.getContent().should('contain.text', 'This guide has ended.');
67
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
66
68
  })
67
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
+ })