graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR20
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.
- package/e2e-flaky/import/import-server-files-operations.spec.js +8 -30
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-flaky/sparql-editor/lucene-connector.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +27 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +31 -2
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
- package/e2e-legacy/graph-navigator/graph-navigator-restrictions.spec.js +216 -0
- package/e2e-legacy/graph-navigator/graph-navigator.spec.js +447 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/home/home-page-without-repositories.spec.js +3 -1
- package/e2e-legacy/home/home-page-without-selected-repository.spec.js +2 -1
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +38 -5
- package/e2e-legacy/import/import-server-files.spec.js +39 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +47 -22
- package/e2e-legacy/import/import-user-data-settings-dialog.spec.js +81 -10
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
- package/e2e-legacy/import/import-user-data-url.spec.js +9 -5
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
- package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
- package/e2e-legacy/repository/ontop-repository.spec.js +25 -34
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +5 -1
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/repository/repository-picker-tooltip.spec.js +72 -0
- package/e2e-legacy/repository/repository-selector-tooltip.spec.js +55 -0
- package/e2e-legacy/resource/resource.spec.js +177 -40
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
- package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
- package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
- package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
- package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +1 -1
- package/e2e-legacy/setup/settings/my-settings.spec.js +25 -15
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +34 -25
- package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
- package/e2e-legacy/sparql-editor/sparql-editor-navigation.spec.js +219 -0
- package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +1 -1
- package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
- package/e2e-legacy/ttyg/create-agent.spec.js +6 -4
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
- package/e2e-security/setup/home/cookie-policy.spec.js +4 -0
- package/e2e-security/setup/license/license-loading.spec.js +57 -0
- package/e2e-security/setup/license/license-logout.spec.js +36 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +1 -1
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -1
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/fixtures/cluster/cluster-config-with-tag.json +17 -0
- package/fixtures/connectors/get-connectors.json +0 -1
- package/fixtures/graph-navigator/graph-navigator-settings-invalid.ttl +149 -0
- package/fixtures/graph-navigator/graph-navigator-settings.ttl +148 -0
- package/fixtures/graphdb-import/wine.rdf +279 -285
- package/npm-shrinkwrap.json +1283 -1643
- package/package.json +10 -1
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/cookie-policy/cookie-consent-banner-steps.js +2 -2
- package/steps/error-steps.js +2 -2
- package/steps/explore/graphs-overview-steps.js +44 -0
- package/steps/graph-navigator-steps.js +145 -0
- package/steps/header-steps.js +5 -1
- package/steps/home-steps.js +3 -6
- package/steps/import/import-server-files-steps.js +8 -0
- package/steps/import/import-settings-dialog-steps.js +16 -0
- package/steps/import/import-steps.js +88 -17
- package/steps/import/import-test-constants.js +1 -1
- package/steps/import/import-user-data-steps.js +24 -24
- package/steps/language-selector-steps.js +4 -0
- package/steps/layout-steps.js +6 -0
- package/steps/login-steps.js +7 -3
- package/steps/main-menu-steps.js +14 -14
- package/steps/ontop-repository-steps.js +4 -0
- package/steps/page-restrictions-steps.js +24 -0
- package/steps/repository-picker-list-steps.js +54 -0
- package/steps/repository-selector-steps.js +16 -0
- package/steps/repository-steps.js +13 -9
- package/steps/resource/resource-steps.js +76 -9
- package/steps/setup/acl-management-steps.js +4 -24
- package/steps/setup/settings-steps.js +42 -0
- package/steps/setup/user-and-access-steps.js +18 -14
- package/steps/toaster-steps.js +4 -0
- package/steps/ttyg/ttyg-view-steps.js +1 -14
- package/steps/visual-graph-steps.js +8 -0
- package/steps/widgets/repository-errors-widget-steps.js +6 -2
- package/steps/yasgui/yasqe-steps.js +3 -1
- package/steps/yasgui/yasr-steps.js +8 -0
- package/stubs/browser-stubs.js +40 -0
- package/stubs/cluster/cluster-stubs.js +15 -1
- package/stubs/graph-navigator-stubs.js +27 -0
- package/stubs/license-stubs.js +4 -3
- package/stubs/repositories/repositories-stubs.js +44 -0
- package/stubs/yasgui/query-stubs.js +5 -0
- package/support/visual-graph-commands.js +19 -0
- package/e2e-legacy/home/solr-banner/solr-banner.spec.js +0 -137
- package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
- package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
- package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
- package/steps/deprecation-banner/deprecation-banner-steps.js +0 -13
- package/steps/deprecation-steps.js +0 -13
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import {GraphNavigatorSteps} from '../../steps/graph-navigator-steps.js';
|
|
2
|
+
import {LanguageSelectorSteps} from '../../steps/language-selector-steps.js';
|
|
3
|
+
import {RepositorySelectorSteps} from '../../steps/repository-selector-steps.js';
|
|
4
|
+
import {MainMenuSteps} from '../../steps/main-menu-steps.js';
|
|
5
|
+
import {YasqeSteps} from '../../steps/yasgui/yasqe-steps.js';
|
|
6
|
+
import {YasrSteps} from '../../steps/yasgui/yasr-steps.js';
|
|
7
|
+
import {ToasterSteps} from '../../steps/toaster-steps.js';
|
|
8
|
+
import {GraphNavigatorStubs} from '../../stubs/graph-navigator-stubs.js';
|
|
9
|
+
|
|
10
|
+
const FILE_TO_IMPORT = 'resource-test-data.ttl';
|
|
11
|
+
const SEED_RESOURCE_ENCODED = 'http:%2F%2Fexample.com%2Fontology%23CustomerLoyalty';
|
|
12
|
+
const SEED_RESOURCE_LABEL = 'CustomerLoyalty';
|
|
13
|
+
const SETTINGS_FILE_NAME = 'graph-navigator-settings.ttl';
|
|
14
|
+
const SETTINGS_FILE = `fixtures/graph-navigator/${SETTINGS_FILE_NAME}`;
|
|
15
|
+
const INVALID_SETTINGS_FILE_NAME = 'graph-navigator-settings-invalid.ttl';
|
|
16
|
+
const INVALID_SETTINGS_FILE = `fixtures/graph-navigator/${INVALID_SETTINGS_FILE_NAME}`;
|
|
17
|
+
|
|
18
|
+
const CONSTRUCT_QUERY = 'CONSTRUCT { <http://example.com/ontology#CustomerLoyalty> ?p ?o } WHERE { <http://example.com/ontology#CustomerLoyalty> ?p ?o }';
|
|
19
|
+
const CONSTRUCT_TARGET_LABEL = 'Metric';
|
|
20
|
+
// TODO: Remove once GraphDB creates the system repository itself.
|
|
21
|
+
// The graph-navigator settings endpoint requires this repository.
|
|
22
|
+
const SYSTEM_REPOSITORY_ID = 'SystemRepository';
|
|
23
|
+
|
|
24
|
+
describe('Graph Navigator', () => {
|
|
25
|
+
let repositoryId;
|
|
26
|
+
|
|
27
|
+
// TODO: Remove once GraphDB creates the system repository itself.
|
|
28
|
+
before(() => {
|
|
29
|
+
cy.deleteRepository(SYSTEM_REPOSITORY_ID);
|
|
30
|
+
cy.createRepository({id: SYSTEM_REPOSITORY_ID});
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// TODO: Remove once GraphDB creates the system repository itself.
|
|
34
|
+
after(() => {
|
|
35
|
+
cy.deleteRepository(SYSTEM_REPOSITORY_ID);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
beforeEach(() => {
|
|
39
|
+
repositoryId = 'repository-' + Date.now();
|
|
40
|
+
cy.createRepository({id: repositoryId});
|
|
41
|
+
cy.presetRepository(repositoryId);
|
|
42
|
+
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
afterEach(() => {
|
|
46
|
+
cy.deleteRepository(repositoryId);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('should mount the Graph Navigator workspace when a repository is active', () => {
|
|
50
|
+
// Given I open the Graph Navigator view without a start resource.
|
|
51
|
+
GraphNavigatorSteps.visit();
|
|
52
|
+
|
|
53
|
+
// Then I expect the Graph Navigator workspace and its canvas to be rendered.
|
|
54
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
55
|
+
GraphNavigatorSteps.getCanvas().should('exist');
|
|
56
|
+
|
|
57
|
+
// And I expect the canvas to start empty because no start resource was provided.
|
|
58
|
+
GraphNavigatorSteps.getElements().should('not.exist');
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('should place the start resource on the canvas as a seed', () => {
|
|
62
|
+
// Given I open the Graph Navigator view with a start resource.
|
|
63
|
+
GraphNavigatorSteps.visit(SEED_RESOURCE_ENCODED);
|
|
64
|
+
|
|
65
|
+
// Then I expect the start resource to be placed on the canvas as a seed element.
|
|
66
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
67
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should show an error toast, when a graph request fails', () => {
|
|
71
|
+
// Given the repository's SPARQL requests fail.
|
|
72
|
+
cy.intercept('POST', `/repositories/${repositoryId}`, {statusCode: 500}).as('graphRequest');
|
|
73
|
+
|
|
74
|
+
// When I open the Graph Navigator view with a start resource.
|
|
75
|
+
GraphNavigatorSteps.visit(SEED_RESOURCE_ENCODED);
|
|
76
|
+
cy.wait('@graphRequest');
|
|
77
|
+
|
|
78
|
+
// Then I expect an error toast about the graph data.
|
|
79
|
+
ToasterSteps.getToasterMessage().should('contain', 'Failed to load graph data.');
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
it('should seed the canvas with the graph computed from a CONSTRUCT query', () => {
|
|
83
|
+
// Given I open the Graph Navigator view with a CONSTRUCT query, as sent from the SPARQL editor.
|
|
84
|
+
GraphNavigatorSteps.visitWithQuery(CONSTRUCT_QUERY);
|
|
85
|
+
|
|
86
|
+
// Then I expect the computed graph to be seeded on the canvas: the subject and its related resource.
|
|
87
|
+
GraphNavigatorSteps.getElements().should('have.length', 2);
|
|
88
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
89
|
+
GraphNavigatorSteps.getElement(CONSTRUCT_TARGET_LABEL).should('exist');
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
it('should unmount and mount the diagram component without errors', () => {
|
|
93
|
+
// Given I have opened the Graph Navigator view, so its diagram component is already loaded.
|
|
94
|
+
GraphNavigatorSteps.visit();
|
|
95
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
96
|
+
// And I have navigated to the SPARQL editor and executed a CONSTRUCT query.
|
|
97
|
+
MainMenuSteps.clickOnSparqlMenu();
|
|
98
|
+
YasqeSteps.getEditor().should('be.visible');
|
|
99
|
+
YasqeSteps.pasteQuery(CONSTRUCT_QUERY);
|
|
100
|
+
YasqeSteps.executeQuery();
|
|
101
|
+
|
|
102
|
+
// When I click on the "Graph Navigator" button.
|
|
103
|
+
YasrSteps.visualizeInGraphNavigator();
|
|
104
|
+
|
|
105
|
+
// Then I expect to be navigated to the Graph Navigator view, so it renders a second time
|
|
106
|
+
GraphNavigatorSteps.getComponent().should('exist');
|
|
107
|
+
// And I expect the computed graph to be seeded on the canvas: the subject and its related resource.
|
|
108
|
+
GraphNavigatorSteps.getElements().should('have.length', 2);
|
|
109
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
110
|
+
GraphNavigatorSteps.getElement(CONSTRUCT_TARGET_LABEL).should('exist');
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
it('should keep the displayed resources when the language is switched', () => {
|
|
114
|
+
// Given the Graph Navigator view is opened with a start resource that gets seeded on the canvas.
|
|
115
|
+
GraphNavigatorSteps.visit(SEED_RESOURCE_ENCODED);
|
|
116
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
117
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
118
|
+
|
|
119
|
+
// When I switch the language.
|
|
120
|
+
LanguageSelectorSteps.switchToFr();
|
|
121
|
+
|
|
122
|
+
// Then I expect the same resources to remain visible because the layout is carried across the remount.
|
|
123
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
124
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
it('should keep the diagram on refresh but clear it when navigating away and back', () => {
|
|
128
|
+
// Given the Graph Navigator view is opened with a start resource that gets seeded on the canvas.
|
|
129
|
+
GraphNavigatorSteps.visit(SEED_RESOURCE_ENCODED);
|
|
130
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
131
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
132
|
+
|
|
133
|
+
// When I refresh the page.
|
|
134
|
+
cy.reload();
|
|
135
|
+
|
|
136
|
+
// Then I expect the diagram state to be preserved across the refresh.
|
|
137
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
138
|
+
GraphNavigatorSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
|
|
139
|
+
|
|
140
|
+
// When I navigate to another view via the navigation bar.
|
|
141
|
+
MainMenuSteps.clickOnSparqlMenu();
|
|
142
|
+
GraphNavigatorSteps.getComponent().should('not.exist');
|
|
143
|
+
|
|
144
|
+
// Wait for the SPARQL Query & Update view to be loaded before continuing.
|
|
145
|
+
// Without this wait, Cypress may try to click the Graph Navigator menu item before the page is fully loaded,
|
|
146
|
+
// causing the test to fail intermittently with the error:
|
|
147
|
+
// "This element `<li.sub-menu-item>` is not visible because it has CSS property: `display: none`"
|
|
148
|
+
// when trying to click the Graph Navigator submenu.
|
|
149
|
+
YasqeSteps.getEditor().should('be.visible');
|
|
150
|
+
// And I return to the Graph Navigator view via the navigation bar.
|
|
151
|
+
MainMenuSteps.clickOnGraphNavigator();
|
|
152
|
+
|
|
153
|
+
// Then I expect the canvas to be cleared, because leaving the view drops the persisted diagram state.
|
|
154
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
155
|
+
GraphNavigatorSteps.getElements().should('not.exist');
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
describe('Settings', () => {
|
|
159
|
+
it('should open the settings sidebar', () => {
|
|
160
|
+
// Given I open the Graph Navigator view.
|
|
161
|
+
GraphNavigatorSteps.visit();
|
|
162
|
+
|
|
163
|
+
// When I click the Settings button.
|
|
164
|
+
GraphNavigatorSteps.openSettings();
|
|
165
|
+
|
|
166
|
+
// Then I expect the settings sidebar to be open.
|
|
167
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
168
|
+
GraphNavigatorSteps.getBrowseButton().should('contain', 'Browse');
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it('should keep the settings sidebar open when clicking on the page', () => {
|
|
172
|
+
// Given I have opened the settings.
|
|
173
|
+
GraphNavigatorSteps.visit();
|
|
174
|
+
GraphNavigatorSteps.openSettings();
|
|
175
|
+
|
|
176
|
+
// When I click on the canvas.
|
|
177
|
+
GraphNavigatorSteps.clickOnCanvas();
|
|
178
|
+
|
|
179
|
+
// Then I expect the sidebar to stay open.
|
|
180
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it('should disable reset when the default settings are in use', () => {
|
|
184
|
+
// Given I open the settings of a repository without uploaded settings.
|
|
185
|
+
GraphNavigatorSteps.visit();
|
|
186
|
+
GraphNavigatorSteps.openSettings();
|
|
187
|
+
|
|
188
|
+
// Then I expect the reset action to be disabled, because there is nothing to reset to.
|
|
189
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
190
|
+
GraphNavigatorSteps.getResetButton().should('be.disabled');
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
it('should cancel a selected file', () => {
|
|
194
|
+
// Given I have selected a settings file.
|
|
195
|
+
GraphNavigatorSteps.visit();
|
|
196
|
+
GraphNavigatorSteps.openSettings();
|
|
197
|
+
GraphNavigatorSteps.selectSettingsFile(SETTINGS_FILE);
|
|
198
|
+
GraphNavigatorSteps.getSelectedSettingsFile(SETTINGS_FILE_NAME).should('exist');
|
|
199
|
+
|
|
200
|
+
// When I cancel it.
|
|
201
|
+
GraphNavigatorSteps.clickCancelFile();
|
|
202
|
+
|
|
203
|
+
// Then I expect the file to be removed.
|
|
204
|
+
GraphNavigatorSteps.getSettingsSidebar().should('not.contain', SETTINGS_FILE_NAME);
|
|
205
|
+
GraphNavigatorSteps.getUploadButton().should('be.disabled');
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('should ask for confirmation before uploading', () => {
|
|
209
|
+
// Given I have selected a settings file.
|
|
210
|
+
GraphNavigatorSteps.visit();
|
|
211
|
+
GraphNavigatorSteps.openSettings();
|
|
212
|
+
GraphNavigatorSteps.selectSettingsFile(SETTINGS_FILE);
|
|
213
|
+
|
|
214
|
+
// When I upload it.
|
|
215
|
+
GraphNavigatorSteps.clickUpload();
|
|
216
|
+
|
|
217
|
+
// Then I expect a confirmation that warns the diagram may behave unexpectedly.
|
|
218
|
+
GraphNavigatorSteps.getConfirmDialog().should('be.visible')
|
|
219
|
+
.and('contain', 'The diagram might behave unexpectedly with the new settings.');
|
|
220
|
+
|
|
221
|
+
// When I cancel.
|
|
222
|
+
GraphNavigatorSteps.cancelDialog();
|
|
223
|
+
|
|
224
|
+
// Then I expect the sidebar to stay open with the file still selected.
|
|
225
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
226
|
+
GraphNavigatorSteps.getSelectedSettingsFile(SETTINGS_FILE_NAME).should('exist');
|
|
227
|
+
|
|
228
|
+
// When I upload and confirm.
|
|
229
|
+
GraphNavigatorSteps.clickUpload();
|
|
230
|
+
GraphNavigatorSteps.confirmDialog();
|
|
231
|
+
|
|
232
|
+
// Then I expect a success message and the diagram to be rendered.
|
|
233
|
+
ToasterSteps.verifySuccess('The settings were uploaded');
|
|
234
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('should show the validation errors of a rejected file', () => {
|
|
238
|
+
// Given I have selected a settings file with invalid values and an unknown property.
|
|
239
|
+
GraphNavigatorSteps.visit();
|
|
240
|
+
GraphNavigatorSteps.openSettings();
|
|
241
|
+
GraphNavigatorSteps.selectSettingsFile(INVALID_SETTINGS_FILE);
|
|
242
|
+
|
|
243
|
+
// When I upload it.
|
|
244
|
+
GraphNavigatorSteps.clickUpload();
|
|
245
|
+
GraphNavigatorSteps.confirmDialog();
|
|
246
|
+
|
|
247
|
+
// Then I expect the errors under the file.
|
|
248
|
+
ToasterSteps.verifyNewToasterError('Could not upload the settings');
|
|
249
|
+
GraphNavigatorSteps.getSelectedSettingsFile(INVALID_SETTINGS_FILE_NAME).should('exist');
|
|
250
|
+
GraphNavigatorSteps.getUploadErrors().should('be.visible')
|
|
251
|
+
.and('contain', '3 validation errors')
|
|
252
|
+
.and('contain', 'Fix the errors and upload again.');
|
|
253
|
+
GraphNavigatorSteps.getUploadError('gn:acceptBlankNodes').should('contain', 'Must be of type boolean');
|
|
254
|
+
GraphNavigatorSteps.getUploadError('gn:openWorldProperties').should('contain', 'Must be of type boolean');
|
|
255
|
+
GraphNavigatorSteps.getUploadError('gn:unknownSetting')
|
|
256
|
+
.should('contain', 'Not a known property');
|
|
257
|
+
|
|
258
|
+
// When I close and reopen the settings.
|
|
259
|
+
GraphNavigatorSteps.closeSettings();
|
|
260
|
+
GraphNavigatorSteps.openSettings();
|
|
261
|
+
|
|
262
|
+
// Then I expect the file and its errors to be kept.
|
|
263
|
+
GraphNavigatorSteps.getSelectedSettingsFile(INVALID_SETTINGS_FILE_NAME).should('exist');
|
|
264
|
+
GraphNavigatorSteps.getUploadErrors().should('be.visible')
|
|
265
|
+
.and('contain', '3 validation errors');
|
|
266
|
+
|
|
267
|
+
// When I remove the file.
|
|
268
|
+
GraphNavigatorSteps.clickCancelFile();
|
|
269
|
+
|
|
270
|
+
// Then I expect the errors to be cleared.
|
|
271
|
+
GraphNavigatorSteps.getUploadErrors().should('not.exist');
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
it('should ask for confirmation before resetting', () => {
|
|
275
|
+
// Given the repository has uploaded settings.
|
|
276
|
+
GraphNavigatorSteps.visit();
|
|
277
|
+
GraphNavigatorSteps.openSettings();
|
|
278
|
+
GraphNavigatorSteps.selectSettingsFile(SETTINGS_FILE);
|
|
279
|
+
GraphNavigatorSteps.clickUpload();
|
|
280
|
+
GraphNavigatorSteps.confirmDialog();
|
|
281
|
+
ToasterSteps.verifySuccess('The settings were uploaded');
|
|
282
|
+
// Wait for the toast to go, so it does not detach while the reset toast is verified.
|
|
283
|
+
ToasterSteps.getToast().should('not.exist');
|
|
284
|
+
|
|
285
|
+
// When I close the settings.
|
|
286
|
+
GraphNavigatorSteps.closeSettings();
|
|
287
|
+
|
|
288
|
+
// Then I expect the sidebar to close.
|
|
289
|
+
GraphNavigatorSteps.getSettingsSidebar().should('not.exist');
|
|
290
|
+
|
|
291
|
+
// When I reset them.
|
|
292
|
+
GraphNavigatorSteps.openSettings();
|
|
293
|
+
GraphNavigatorSteps.getResetButton().should('be.enabled');
|
|
294
|
+
GraphNavigatorSteps.clickReset();
|
|
295
|
+
|
|
296
|
+
// Then I expect a confirmation that warns the diagram may behave unexpectedly.
|
|
297
|
+
GraphNavigatorSteps.getConfirmDialog().should('be.visible')
|
|
298
|
+
.and('contain', 'The diagram might behave unexpectedly with the default settings.');
|
|
299
|
+
|
|
300
|
+
// When I confirm.
|
|
301
|
+
GraphNavigatorSteps.confirmDialog();
|
|
302
|
+
|
|
303
|
+
// Then I expect a success message and the diagram to be rendered.
|
|
304
|
+
ToasterSteps.verifySuccess('The settings were reset to the defaults');
|
|
305
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
it('should export the current settings as a .ttl file', () => {
|
|
309
|
+
// Given I open the settings.
|
|
310
|
+
GraphNavigatorSteps.visit();
|
|
311
|
+
GraphNavigatorSteps.openSettings();
|
|
312
|
+
|
|
313
|
+
// When I export them.
|
|
314
|
+
GraphNavigatorSteps.clickExport();
|
|
315
|
+
|
|
316
|
+
// Then I expect a .ttl file named after the repository to be downloaded.
|
|
317
|
+
GraphNavigatorSteps.verifyFileDownloaded(`graph-navigator-settings-${repositoryId}.ttl`);
|
|
318
|
+
});
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
describe('Autocomplete warning', () => {
|
|
322
|
+
beforeEach(() => {
|
|
323
|
+
GraphNavigatorStubs.stubSettingsWithAutocomplete();
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
it('should warn once that autocomplete is off', () => {
|
|
327
|
+
// Given the settings use autocomplete, but autocomplete is off.
|
|
328
|
+
GraphNavigatorStubs.spyEntityLookup(SEED_RESOURCE_LABEL);
|
|
329
|
+
GraphNavigatorSteps.visit();
|
|
330
|
+
cy.wait('@graph-navigator-settings');
|
|
331
|
+
|
|
332
|
+
// When I search for entities.
|
|
333
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
334
|
+
cy.wait('@entity-lookup');
|
|
335
|
+
|
|
336
|
+
// Then I expect a warning that autocomplete is off.
|
|
337
|
+
ToasterSteps.getWarningToast().should('be.visible').and('contain', 'Autocomplete is OFF');
|
|
338
|
+
|
|
339
|
+
// When the warning is gone and I search for entities again.
|
|
340
|
+
ToasterSteps.getToast().should('not.exist');
|
|
341
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
342
|
+
cy.wait('@entity-lookup');
|
|
343
|
+
|
|
344
|
+
// Then I expect no new warning.
|
|
345
|
+
ToasterSteps.getToast().should('not.exist');
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
it('should redirect to the autocomplete view when the warning is clicked', () => {
|
|
349
|
+
// Given the settings use autocomplete, but autocomplete is off.
|
|
350
|
+
GraphNavigatorSteps.visit();
|
|
351
|
+
cy.wait('@graph-navigator-settings');
|
|
352
|
+
|
|
353
|
+
// When I search for entities and click the warning.
|
|
354
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
355
|
+
ToasterSteps.getWarningToast().should('be.visible').and('contain', 'Autocomplete is OFF');
|
|
356
|
+
ToasterSteps.getWarningToast().click();
|
|
357
|
+
|
|
358
|
+
// Then I expect to be redirected to the autocomplete view.
|
|
359
|
+
cy.url().should('include', '/autocomplete');
|
|
360
|
+
});
|
|
361
|
+
});
|
|
362
|
+
|
|
363
|
+
describe('Repository switch', () => {
|
|
364
|
+
let secondRepositoryId;
|
|
365
|
+
|
|
366
|
+
beforeEach(() => {
|
|
367
|
+
secondRepositoryId = 'repository-second-' + Date.now();
|
|
368
|
+
cy.createRepository({id: secondRepositoryId});
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
afterEach(() => {
|
|
372
|
+
cy.deleteRepository(secondRepositoryId);
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
it('should clear the canvas when the repository is switched', () => {
|
|
376
|
+
// Given the Graph Navigator view is opened with a start resource that gets seeded on the canvas.
|
|
377
|
+
GraphNavigatorSteps.visit(SEED_RESOURCE_ENCODED);
|
|
378
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
379
|
+
|
|
380
|
+
// When I switch to another repository.
|
|
381
|
+
RepositorySelectorSteps.selectRepository(secondRepositoryId);
|
|
382
|
+
|
|
383
|
+
// Then I expect a confirmation that warns the diagram will be cleared.
|
|
384
|
+
GraphNavigatorSteps.getConfirmDialog().should('be.visible')
|
|
385
|
+
.and('contain', 'The diagram will be cleared.');
|
|
386
|
+
|
|
387
|
+
// When I cancel.
|
|
388
|
+
GraphNavigatorSteps.cancelDialog();
|
|
389
|
+
|
|
390
|
+
// Then I expect the repository, the canvas and the start resource in the URL to be kept.
|
|
391
|
+
GraphNavigatorSteps.getElements().should('have.length', 1);
|
|
392
|
+
GraphNavigatorSteps.verifyStartResourceUri(decodeURIComponent(SEED_RESOURCE_ENCODED));
|
|
393
|
+
|
|
394
|
+
// When I switch to another repository and confirm.
|
|
395
|
+
RepositorySelectorSteps.selectRepository(secondRepositoryId);
|
|
396
|
+
GraphNavigatorSteps.confirmDialog();
|
|
397
|
+
|
|
398
|
+
// Then I expect the workspace to still be mounted, but the canvas to be cleared.
|
|
399
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
400
|
+
GraphNavigatorSteps.getElements().should('not.exist');
|
|
401
|
+
|
|
402
|
+
// And I expect the URL to hold only the new repository.
|
|
403
|
+
GraphNavigatorSteps.verifyOnlyRepositoryParam(secondRepositoryId);
|
|
404
|
+
|
|
405
|
+
// When I refresh the page.
|
|
406
|
+
cy.reload();
|
|
407
|
+
|
|
408
|
+
// Then I expect the canvas to stay empty, because the start resource is no longer in the URL.
|
|
409
|
+
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
410
|
+
GraphNavigatorSteps.getElements().should('not.exist');
|
|
411
|
+
GraphNavigatorSteps.verifyOnlyRepositoryParam(secondRepositoryId);
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
it('should warn that autocomplete is off once per repository selection', () => {
|
|
415
|
+
// Given the settings use autocomplete, but autocomplete is off.
|
|
416
|
+
GraphNavigatorStubs.stubSettingsWithAutocomplete();
|
|
417
|
+
GraphNavigatorSteps.visit();
|
|
418
|
+
cy.wait('@graph-navigator-settings');
|
|
419
|
+
|
|
420
|
+
// When I search for entities.
|
|
421
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
422
|
+
|
|
423
|
+
// Then I expect a warning that autocomplete is off.
|
|
424
|
+
ToasterSteps.getWarningToast().should('be.visible').and('contain', 'Autocomplete is OFF');
|
|
425
|
+
|
|
426
|
+
// When the warning is gone and I switch to another repository and search for entities.
|
|
427
|
+
ToasterSteps.getToast().should('not.exist');
|
|
428
|
+
RepositorySelectorSteps.selectRepository(secondRepositoryId);
|
|
429
|
+
GraphNavigatorSteps.confirmDialog();
|
|
430
|
+
cy.wait('@graph-navigator-settings');
|
|
431
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
432
|
+
|
|
433
|
+
// Then I expect a new warning, for the new repository.
|
|
434
|
+
ToasterSteps.getWarningToast().should('be.visible').and('contain', 'Autocomplete is OFF');
|
|
435
|
+
|
|
436
|
+
// When the warning is gone and I switch back to the first repository and search for entities.
|
|
437
|
+
ToasterSteps.getToast().should('not.exist');
|
|
438
|
+
RepositorySelectorSteps.selectRepository(repositoryId);
|
|
439
|
+
GraphNavigatorSteps.confirmDialog();
|
|
440
|
+
cy.wait('@graph-navigator-settings');
|
|
441
|
+
GraphNavigatorSteps.searchEntities(SEED_RESOURCE_LABEL);
|
|
442
|
+
|
|
443
|
+
// Then I expect a new warning, because the repository was selected again.
|
|
444
|
+
ToasterSteps.getWarningToast().should('be.visible').and('contain', 'Autocomplete is OFF');
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
});
|
|
@@ -33,7 +33,7 @@ describe('Confirm duplicate RDF file', () => {
|
|
|
33
33
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file');
|
|
34
34
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import button.');
|
|
35
35
|
ImportSettingsDialogSteps.import();
|
|
36
|
-
ImportUserDataSteps.
|
|
36
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, GUIDE_RESOURCE_FILE);
|
|
37
37
|
|
|
38
38
|
// WHEN: I run a guide that includes the Import RDF File step.
|
|
39
39
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/6');
|
|
@@ -106,17 +106,13 @@ describe('Main Menu Guide steps', () => {
|
|
|
106
106
|
BaseSteps.validateUrl('/sparql');
|
|
107
107
|
|
|
108
108
|
// TTYG
|
|
109
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/
|
|
110
|
-
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an
|
|
109
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/2');
|
|
110
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agent.');
|
|
111
111
|
GuideDialogSteps.clickOnNextButton();
|
|
112
112
|
|
|
113
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/
|
|
114
|
-
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
115
|
-
MainMenuSteps.clickOnMenuLab();
|
|
116
|
-
|
|
117
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
|
|
113
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/2');
|
|
118
114
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
119
|
-
MainMenuSteps.
|
|
115
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
120
116
|
BaseSteps.validateUrl('/ttyg');
|
|
121
117
|
|
|
122
118
|
// Autocomplete
|
|
@@ -249,15 +245,11 @@ describe('Main Menu Guide steps', () => {
|
|
|
249
245
|
BaseSteps.validateUrl('/sparql');
|
|
250
246
|
|
|
251
247
|
// TTYG
|
|
252
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/
|
|
248
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/2');
|
|
253
249
|
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agen');
|
|
254
250
|
GuideDialogSteps.clickOnNextButton();
|
|
255
251
|
|
|
256
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/
|
|
257
|
-
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
258
|
-
GuideDialogSteps.clickOnNextButton();
|
|
259
|
-
|
|
260
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
|
|
252
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/2');
|
|
261
253
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
262
254
|
GuideDialogSteps.clickOnNextButton();
|
|
263
255
|
BaseSteps.validateUrl('/ttyg');
|
|
@@ -33,116 +33,112 @@ describe('ttyg configure agent guide', () => {
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
it('should create and configure TTYG agent with actions', () => {
|
|
36
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/
|
|
36
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/29');
|
|
37
37
|
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agent.');
|
|
38
38
|
GuideDialogSteps.clickOnNextButton();
|
|
39
39
|
|
|
40
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/
|
|
41
|
-
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
42
|
-
MainMenuSteps.clickOnMenuLab();
|
|
43
|
-
|
|
44
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/30');
|
|
40
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/29');
|
|
45
41
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
46
|
-
MainMenuSteps.
|
|
42
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
47
43
|
|
|
48
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
44
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 4/29');
|
|
49
45
|
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
46
|
GuideDialogSteps.clickOnNextButton();
|
|
51
47
|
|
|
52
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
48
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 6/29');
|
|
53
49
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the create agent button to create a new agent.');
|
|
54
50
|
TTYGViewSteps.clickCreateAgentButton();
|
|
55
51
|
|
|
56
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
52
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 8/29');
|
|
57
53
|
GuideDialogSteps.assertDialogWithContentIsVisible('Type a name for the agent. You will refer to it later.');
|
|
58
54
|
TtygAgentSettingsModalSteps.typeAgentName('MyAgent');
|
|
59
55
|
GuideDialogSteps.clickOnNextButton();
|
|
60
56
|
|
|
61
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
57
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 9/29');
|
|
62
58
|
GuideDialogSteps.assertDialogWithContentIsVisible('Here you can type the name of the OpenAI model to be used.');
|
|
63
59
|
TtygAgentSettingsModalSteps.clearLLMModel();
|
|
64
60
|
TtygAgentSettingsModalSteps.typeLLMModel('gpt-3.5-turbo');
|
|
65
61
|
GuideDialogSteps.clickOnNextButton();
|
|
66
62
|
|
|
67
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
63
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 10/29');
|
|
68
64
|
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
65
|
TtygAgentSettingsModalSteps.setTemperature(0.8);
|
|
70
66
|
GuideDialogSteps.clickOnNextButton();
|
|
71
67
|
|
|
72
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
68
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 11/29');
|
|
73
69
|
GuideDialogSteps.assertDialogWithContentIsVisible('Sets the nucleus sampling of the agent');
|
|
74
70
|
TtygAgentSettingsModalSteps.setTopP(0.9);
|
|
75
71
|
GuideDialogSteps.clickOnNextButton();
|
|
76
72
|
|
|
77
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method —
|
|
73
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 12/29');
|
|
78
74
|
GuideDialogSteps.assertDialogWithContentIsVisible('Enabling SPARQL search allows the agent to answers questions by performing a SPARQL query.');
|
|
79
75
|
GuideDialogSteps.clickOnNextButton();
|
|
80
76
|
|
|
81
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method —
|
|
77
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/29');
|
|
82
78
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable SPARQL search query method.');
|
|
83
79
|
TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
|
|
84
80
|
|
|
85
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method —
|
|
81
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/29');
|
|
86
82
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable providing an ontology in a named graph.');
|
|
87
83
|
TtygAgentSettingsModalSteps.selectSparqlMethodOntologyGraph();
|
|
88
84
|
|
|
89
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method —
|
|
85
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/29');
|
|
90
86
|
GuideDialogSteps.assertDialogWithContentIsVisible('Type http://example.org/some/test/ontology as the named graph which contains the ontology.');
|
|
91
87
|
TtygAgentSettingsModalSteps.clearSparqlMethodOntologyGraphField();
|
|
92
88
|
TtygAgentSettingsModalSteps.typeSparqlMethodOntologyGraphField('http://example.org/some/test/ontology');
|
|
93
89
|
GuideDialogSteps.clickOnNextButton();
|
|
94
90
|
|
|
95
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method —
|
|
91
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/29');
|
|
96
92
|
GuideDialogSteps.assertDialogWithContentIsVisible('Check to automatically add missing namespaces.');
|
|
97
93
|
TtygAgentSettingsModalSteps.toggleAddMissingNamespacesCheckbox();
|
|
98
94
|
|
|
99
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method —
|
|
95
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 17/29');
|
|
100
96
|
GuideDialogSteps.assertDialogWithContentIsVisible('Enabling FTS search allows the agent to answer questions by using full-text search in literals and IRIs.');
|
|
101
97
|
GuideDialogSteps.clickOnNextButton();
|
|
102
98
|
|
|
103
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method —
|
|
99
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 18/29');
|
|
104
100
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable FTS search query method.');
|
|
105
101
|
TtygAgentSettingsModalSteps.enableFtsExtractionMethod();
|
|
106
102
|
|
|
107
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method —
|
|
103
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 19/29');
|
|
108
104
|
GuideDialogSteps.assertDialogWithContentIsVisible('Type 100 as the maximum number of triples to retrieve per call.');
|
|
109
105
|
TtygAgentSettingsModalSteps.setFtsSearchMaxTriples(100);
|
|
110
106
|
GuideDialogSteps.clickOnNextButton();
|
|
111
107
|
|
|
112
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method —
|
|
108
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 20/29');
|
|
113
109
|
GuideDialogSteps.assertDialogWithContentIsVisible('Enabling Similarity search allows the agent to answer questions by using Similarity search.');
|
|
114
110
|
GuideDialogSteps.clickOnNextButton();
|
|
115
111
|
|
|
116
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method —
|
|
112
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 21/29');
|
|
117
113
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Similarity search query method.');
|
|
118
114
|
TtygAgentSettingsModalSteps.enableSimilaritySearchMethodPanel();
|
|
119
115
|
|
|
120
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method —
|
|
116
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 22/29');
|
|
121
117
|
GuideDialogSteps.assertDialogWithContentIsVisible('Select the index to use for Similarity search.');
|
|
122
118
|
TtygAgentSettingsModalSteps.selectSimilarityIndex(0);
|
|
123
119
|
GuideDialogSteps.clickOnNextButton();
|
|
124
120
|
|
|
125
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
121
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 23/29');
|
|
126
122
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Full-text search in labels for IRI discovery');
|
|
127
123
|
TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
|
|
128
124
|
|
|
129
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
125
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 24/29');
|
|
130
126
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Autocomplete for IRI discovery.');
|
|
131
127
|
TtygAgentSettingsModalSteps.checkAutocompleteSearchCheckbox();
|
|
132
128
|
|
|
133
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
129
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 25/29');
|
|
134
130
|
GuideDialogSteps.assertDialogWithContentIsVisible('Set the Max number of results (IRIs) per call to 15');
|
|
135
131
|
TtygAgentSettingsModalSteps.setAutocompleteMaxResults(15);
|
|
136
132
|
GuideDialogSteps.clickOnNextButton();
|
|
137
133
|
|
|
138
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph —
|
|
134
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 26/29');
|
|
139
135
|
GuideDialogSteps.assertDialogWithContentIsVisible('Set Context Size to 4096 so the model can use the ontology and conversation history to answer correctly');
|
|
140
136
|
TtygAgentSettingsModalSteps.getContextSizeField().focus();
|
|
141
137
|
TtygAgentSettingsModalSteps.clearContextSize();
|
|
142
138
|
TtygAgentSettingsModalSteps.enterContextSize(4096);
|
|
143
139
|
GuideDialogSteps.clickOnNextButton();
|
|
144
140
|
|
|
145
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
141
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 27/29');
|
|
146
142
|
GuideDialogSteps.assertDialogWithContentIsVisible('Enter the following in the input:');
|
|
147
143
|
TtygAgentSettingsModalSteps.clearUserInstructions();
|
|
148
144
|
TtygAgentSettingsModalSteps.getCodeToCopy().then(code => {
|
|
@@ -150,7 +146,7 @@ describe('ttyg configure agent guide', () => {
|
|
|
150
146
|
GuideDialogSteps.clickOnNextButton();
|
|
151
147
|
});
|
|
152
148
|
|
|
153
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 29
|
|
149
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 28/29');
|
|
154
150
|
GuideDialogSteps.assertDialogWithContentIsVisible('Click to save the agent settings');
|
|
155
151
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
156
152
|
});
|