graphdb-workbench-tests 3.3.1 → 3.3.2-RC1
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-legacy/graphql/graphql-theme.spec.js +73 -0
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +302 -0
- package/e2e-legacy/guides/ttyg/conversation/ttyg-conversation-guide.spec.js +6 -2
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +87 -0
- package/e2e-legacy/home/cookie-policy/cookie-policy.spec.js +182 -0
- package/e2e-legacy/import/import-server-files.spec.js +3 -1
- package/e2e-legacy/repository/repositories.spec.js +5 -2
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +36 -0
- package/e2e-security/setup/home/cookie-policy.spec.js +232 -6
- package/fixtures/guides/main-menu/main-menu-guide.json +98 -0
- package/fixtures/guides/ttyg/edit-ttyg-agent/edit-ttyg-agent-guide.json +22 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/base-steps.js +4 -0
- package/steps/cookie-policy/cookie-consent-banner-steps.js +21 -0
- package/steps/cookie-policy/cookie-policy-modal.steps.js +56 -0
- package/steps/graphql/playground-editor-steps.js +46 -0
- package/steps/header-steps.js +13 -0
- package/steps/home-steps.js +0 -20
- package/steps/import/import-resource-message-dialog.js +1 -1
- package/steps/login-steps.js +1 -0
- package/steps/main-menu-steps.js +12 -0
- package/steps/repository-steps.js +2 -2
- package/steps/setup/settings-steps.js +1 -1
- package/steps/setup/user-and-access-steps.js +4 -0
- package/steps/shared-modal-dialog-steps.js +45 -0
- package/steps/visual-graph-steps.js +1 -1
- package/stubs/guides/guides-stubs.js +8 -0
- package/stubs/security-stubs.js +8 -0
- package/stubs/ttyg/ttyg-stubs.js +2 -4
- package/support/e2e-security.js +9 -0
- package/support/settings-commands.js +18 -2
- package/e2e-legacy/home/cookie-policy.spec.js +0 -108
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import {PlaygroundEditorSteps} from "../../steps/graphql/playground-editor-steps.js";
|
|
2
|
+
import {GraphqlPlaygroundSteps} from "../../steps/graphql/graphql-playground-steps.js";
|
|
3
|
+
|
|
4
|
+
describe('Graphiql Editor Themes', () => {
|
|
5
|
+
let repositoryId;
|
|
6
|
+
const THEME_PERSISTENCE_KEY = 'ls.workbench-settings';
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
repositoryId = 'graphiql-editor-themes-' + Date.now();
|
|
10
|
+
cy.createRepository({id: repositoryId});
|
|
11
|
+
cy.presetRepository(repositoryId);
|
|
12
|
+
cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
|
|
13
|
+
cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
|
|
14
|
+
cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema-planets.yaml', 'swapi-planets');
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
cy.deleteRepository(repositoryId);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should apply the default theme if theme is not persisted in local store', () => {
|
|
22
|
+
// GIVEN: I have opened the workbench and no theme is persisted in local storage.
|
|
23
|
+
|
|
24
|
+
// WHEN: I visit the GraphQL Playground page
|
|
25
|
+
GraphqlPlaygroundSteps.visit();
|
|
26
|
+
// THEN: the default "graphiql" theme class should be applied to the CodeMirror instances.
|
|
27
|
+
verifyTheme('graphiql');
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should apply the light theme if the light theme is persisted in local store', () => {
|
|
31
|
+
// GIVEN: I have opened the workbench and the light theme is persisted in local storage.
|
|
32
|
+
cy.setLocalStorage(THEME_PERSISTENCE_KEY, JSON.stringify({"theme":"default-theme","mode":"light"}));
|
|
33
|
+
|
|
34
|
+
// WHEN: I visit the GraphQL Playground page
|
|
35
|
+
GraphqlPlaygroundSteps.visit();
|
|
36
|
+
// THEN: the default "graphiql" theme class should be applied to the CodeMirror instances.
|
|
37
|
+
verifyTheme('graphiql');
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('should apply the moxer theme if the dark theme is persisted in local store', () => {
|
|
41
|
+
// GIVEN: I have opened the workbench and the dark theme is persisted in local storage.
|
|
42
|
+
cy.setLocalStorage(THEME_PERSISTENCE_KEY, JSON.stringify({"theme":"default-theme","mode":"dark"}));
|
|
43
|
+
|
|
44
|
+
/// WHEN: I visit the GraphQL Playground page
|
|
45
|
+
GraphqlPlaygroundSteps.visit();
|
|
46
|
+
// THEN: the "moxer" theme class should be applied to the CodeMirror instances.
|
|
47
|
+
verifyTheme('moxer');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('should not change the theme if the active endpoint is changed', () => {
|
|
51
|
+
// GIVEN: I have opened the workbench and the dark theme is persisted in local storage.
|
|
52
|
+
cy.setLocalStorage(THEME_PERSISTENCE_KEY, JSON.stringify({"theme":"default-theme","mode":"dark"}));
|
|
53
|
+
/// AND: I visit the GraphQL Playground page
|
|
54
|
+
GraphqlPlaygroundSteps.visit();
|
|
55
|
+
//the "moxer" theme class should be applied to the CodeMirror instances.
|
|
56
|
+
verifyTheme('moxer');
|
|
57
|
+
|
|
58
|
+
// WHEN: I change the active endpoint
|
|
59
|
+
GraphqlPlaygroundSteps.selectEndpoint('swapi-planets');
|
|
60
|
+
|
|
61
|
+
// THEN: the theme should not change, and the "moxer" theme class should still be applied to the CodeMirror instances.
|
|
62
|
+
verifyTheme('moxer');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
const verifyTheme = (theme) => {
|
|
66
|
+
PlaygroundEditorSteps.getResponseCodeMirror().should('have.class', `cm-s-${theme}`);
|
|
67
|
+
PlaygroundEditorSteps.getGraphiqlEditorsCodeMirror().should('have.class', `cm-s-${theme}`);
|
|
68
|
+
PlaygroundEditorSteps.openVariables();
|
|
69
|
+
PlaygroundEditorSteps.getActiveGraphiqlEditorToolCodeMirror().should('have.class', `cm-s-${theme}`);
|
|
70
|
+
PlaygroundEditorSteps.openHeaders();
|
|
71
|
+
PlaygroundEditorSteps.getActiveGraphiqlEditorToolCodeMirror().should('have.class', `cm-s-${theme}`);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
|
|
2
|
+
import {GuideSteps} from "../../../steps/guides/guide-steps.js";
|
|
3
|
+
import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
|
|
4
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
|
|
5
|
+
import {BaseSteps} from "../../../steps/base-steps.js";
|
|
6
|
+
|
|
7
|
+
describe('Main Menu Guide steps', () => {
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
GuidesStubs.stubMainMenuGuide();
|
|
11
|
+
GuideSteps.visit();
|
|
12
|
+
GuideSteps.verifyGuidesListExists();
|
|
13
|
+
cy.wait('@getGuides');
|
|
14
|
+
GuideSteps.runFirstGuide();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
it('Should visit all menus with action', () => {
|
|
18
|
+
// Import
|
|
19
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/2');
|
|
20
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Import view to import data from a file.');
|
|
21
|
+
GuideDialogSteps.clickOnNextButton();
|
|
22
|
+
|
|
23
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 2/2');
|
|
24
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import menu.');
|
|
25
|
+
MainMenuSteps.clickOnMenuImport();
|
|
26
|
+
BaseSteps.validateUrl('/import');
|
|
27
|
+
|
|
28
|
+
// Create repository
|
|
29
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 1/3');
|
|
30
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Repositories view to create a repository.');
|
|
31
|
+
GuideDialogSteps.clickOnNextButton();
|
|
32
|
+
|
|
33
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 2/3');
|
|
34
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
35
|
+
MainMenuSteps.clickOnMenuSetup();
|
|
36
|
+
|
|
37
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 3/3');
|
|
38
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Repositories menu.');
|
|
39
|
+
MainMenuSteps.clickOnRepositoriesSubmenu();
|
|
40
|
+
BaseSteps.validateUrl('/repository');
|
|
41
|
+
|
|
42
|
+
// Class hierarchy
|
|
43
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 1/3');
|
|
44
|
+
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.');
|
|
45
|
+
GuideDialogSteps.clickOnNextButton();
|
|
46
|
+
|
|
47
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 2/3');
|
|
48
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
49
|
+
MainMenuSteps.clickOnExplore();
|
|
50
|
+
|
|
51
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 3/3');
|
|
52
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class hierarchy menu.');
|
|
53
|
+
MainMenuSteps.clickOnSubmenuClassHierarchy();
|
|
54
|
+
BaseSteps.validateUrl('/hierarchy');
|
|
55
|
+
|
|
56
|
+
// Class relationships
|
|
57
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 1/3');
|
|
58
|
+
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.');
|
|
59
|
+
GuideDialogSteps.clickOnNextButton();
|
|
60
|
+
|
|
61
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 2/3');
|
|
62
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
63
|
+
MainMenuSteps.clickOnExplore();
|
|
64
|
+
|
|
65
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 3/3');
|
|
66
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class relationships menu.');
|
|
67
|
+
MainMenuSteps.clickOnSubmenuClassRelationships();
|
|
68
|
+
BaseSteps.validateUrl('/relationships');
|
|
69
|
+
|
|
70
|
+
// Visual graph
|
|
71
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 1/3');
|
|
72
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Visual graph view to explore data in a visual manner.');
|
|
73
|
+
GuideDialogSteps.clickOnNextButton();
|
|
74
|
+
|
|
75
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 2/3');
|
|
76
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
77
|
+
MainMenuSteps.clickOnExplore();
|
|
78
|
+
|
|
79
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 3/3');
|
|
80
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Visual graph menu.');
|
|
81
|
+
MainMenuSteps.clickOnSubmenuVisualGraph();
|
|
82
|
+
BaseSteps.validateUrl('/graphs-visualizations');
|
|
83
|
+
|
|
84
|
+
// Similarity
|
|
85
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 1/3');
|
|
86
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to create a Similarity index for your dataset.');
|
|
87
|
+
GuideDialogSteps.clickOnNextButton();
|
|
88
|
+
|
|
89
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 2/3');
|
|
90
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
91
|
+
MainMenuSteps.clickOnExplore();
|
|
92
|
+
|
|
93
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 3/3');
|
|
94
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Similarity menu.');
|
|
95
|
+
MainMenuSteps.clickOnSubmenuSimilarity();
|
|
96
|
+
BaseSteps.validateUrl('/similarity');
|
|
97
|
+
|
|
98
|
+
// SPARQL
|
|
99
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 1/2');
|
|
100
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the SPARQL Query & Update view to execute queries.');
|
|
101
|
+
GuideDialogSteps.clickOnNextButton();
|
|
102
|
+
|
|
103
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 2/2');
|
|
104
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the SPARQL menu.');
|
|
105
|
+
MainMenuSteps.clickOnSparqlMenu();
|
|
106
|
+
BaseSteps.validateUrl('/sparql');
|
|
107
|
+
|
|
108
|
+
// TTYG
|
|
109
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/3');
|
|
110
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agen');
|
|
111
|
+
GuideDialogSteps.clickOnNextButton();
|
|
112
|
+
|
|
113
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/3');
|
|
114
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
115
|
+
MainMenuSteps.clickOnMenuLab();
|
|
116
|
+
|
|
117
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
|
|
118
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
119
|
+
MainMenuSteps.clickOnTTYGSubmenu();
|
|
120
|
+
BaseSteps.validateUrl('/ttyg');
|
|
121
|
+
|
|
122
|
+
// Autocomplete
|
|
123
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 1/3');
|
|
124
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Autocomplete index view to enable the autocomplete index.');
|
|
125
|
+
GuideDialogSteps.clickOnNextButton();
|
|
126
|
+
|
|
127
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 2/3');
|
|
128
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
129
|
+
MainMenuSteps.clickOnMenuSetup();
|
|
130
|
+
|
|
131
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 3/3');
|
|
132
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Autocomplete menu.');
|
|
133
|
+
MainMenuSteps.clickOnSubmenuAutocomplete();
|
|
134
|
+
BaseSteps.validateUrl('/autocomplete');
|
|
135
|
+
|
|
136
|
+
// Connectors
|
|
137
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors — 1/2');
|
|
138
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
139
|
+
MainMenuSteps.clickOnMenuSetup();
|
|
140
|
+
|
|
141
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors — 2/2');
|
|
142
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Connectors menu.');
|
|
143
|
+
MainMenuSteps.clickOnSubmenuConnectors();
|
|
144
|
+
BaseSteps.validateUrl('/connectors');
|
|
145
|
+
|
|
146
|
+
// RDF Rank
|
|
147
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank — 1/2');
|
|
148
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
149
|
+
MainMenuSteps.clickOnMenuSetup();
|
|
150
|
+
|
|
151
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank — 2/2');
|
|
152
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the RDF Rank menu.');
|
|
153
|
+
MainMenuSteps.clickOnSubmenuRDFRank();
|
|
154
|
+
BaseSteps.validateUrl('/rdfrank');
|
|
155
|
+
|
|
156
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
|
|
157
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('Should visit all menus with next click', () => {
|
|
161
|
+
// Import
|
|
162
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 1/2');
|
|
163
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Import view to import data from a file.');
|
|
164
|
+
GuideDialogSteps.clickOnNextButton();
|
|
165
|
+
|
|
166
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Import file — 2/2');
|
|
167
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Import menu.');
|
|
168
|
+
GuideDialogSteps.clickOnNextButton();
|
|
169
|
+
BaseSteps.validateUrl('/import');
|
|
170
|
+
|
|
171
|
+
// Create repository
|
|
172
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 1/3');
|
|
173
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Repositories view to create a repository.');
|
|
174
|
+
GuideDialogSteps.clickOnNextButton();
|
|
175
|
+
|
|
176
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 2/3');
|
|
177
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
178
|
+
GuideDialogSteps.clickOnNextButton();
|
|
179
|
+
|
|
180
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create repository — 3/3');
|
|
181
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Repositories menu.');
|
|
182
|
+
GuideDialogSteps.clickOnNextButton();
|
|
183
|
+
BaseSteps.validateUrl('/repository');
|
|
184
|
+
|
|
185
|
+
// Class hierarchy
|
|
186
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 1/3');
|
|
187
|
+
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.');
|
|
188
|
+
GuideDialogSteps.clickOnNextButton();
|
|
189
|
+
|
|
190
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 2/3');
|
|
191
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
192
|
+
GuideDialogSteps.clickOnNextButton();
|
|
193
|
+
|
|
194
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class hierarchy — 3/3');
|
|
195
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class hierarchy menu.');
|
|
196
|
+
GuideDialogSteps.clickOnNextButton();
|
|
197
|
+
BaseSteps.validateUrl('/hierarchy');
|
|
198
|
+
|
|
199
|
+
// Class relationships
|
|
200
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 1/3');
|
|
201
|
+
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.');
|
|
202
|
+
GuideDialogSteps.clickOnNextButton();
|
|
203
|
+
|
|
204
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 2/3');
|
|
205
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
206
|
+
GuideDialogSteps.clickOnNextButton();
|
|
207
|
+
|
|
208
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Explore the class relationships — 3/3');
|
|
209
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Class relationships menu.');
|
|
210
|
+
GuideDialogSteps.clickOnNextButton();
|
|
211
|
+
BaseSteps.validateUrl('/relationships');
|
|
212
|
+
|
|
213
|
+
// Visual graph
|
|
214
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 1/3');
|
|
215
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Visual graph view to explore data in a visual manner.');
|
|
216
|
+
GuideDialogSteps.clickOnNextButton();
|
|
217
|
+
|
|
218
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 2/3');
|
|
219
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
220
|
+
GuideDialogSteps.clickOnNextButton();
|
|
221
|
+
|
|
222
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 3/3');
|
|
223
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Visual graph menu.');
|
|
224
|
+
GuideDialogSteps.clickOnNextButton();
|
|
225
|
+
BaseSteps.validateUrl('/graphs-visualizations');
|
|
226
|
+
|
|
227
|
+
// Similarity
|
|
228
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 1/3');
|
|
229
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to create a Similarity index for your dataset.');
|
|
230
|
+
GuideDialogSteps.clickOnNextButton();
|
|
231
|
+
|
|
232
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 2/3');
|
|
233
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
|
|
234
|
+
GuideDialogSteps.clickOnNextButton();
|
|
235
|
+
|
|
236
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create Similarity index — 3/3');
|
|
237
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Similarity menu.');
|
|
238
|
+
GuideDialogSteps.clickOnNextButton();
|
|
239
|
+
BaseSteps.validateUrl('/similarity');
|
|
240
|
+
|
|
241
|
+
// SPARQL
|
|
242
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 1/2');
|
|
243
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the SPARQL Query & Update view to execute queries.');
|
|
244
|
+
GuideDialogSteps.clickOnNextButton();
|
|
245
|
+
|
|
246
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Execute SPARQL query — 2/2');
|
|
247
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the SPARQL menu.');
|
|
248
|
+
GuideDialogSteps.clickOnNextButton();
|
|
249
|
+
BaseSteps.validateUrl('/sparql');
|
|
250
|
+
|
|
251
|
+
// TTYG
|
|
252
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/3');
|
|
253
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agen');
|
|
254
|
+
GuideDialogSteps.clickOnNextButton();
|
|
255
|
+
|
|
256
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/3');
|
|
257
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
258
|
+
GuideDialogSteps.clickOnNextButton();
|
|
259
|
+
|
|
260
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
|
|
261
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
262
|
+
GuideDialogSteps.clickOnNextButton();
|
|
263
|
+
BaseSteps.validateUrl('/ttyg');
|
|
264
|
+
|
|
265
|
+
// Autocomplete
|
|
266
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 1/3');
|
|
267
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Autocomplete index view to enable the autocomplete index.');
|
|
268
|
+
GuideDialogSteps.clickOnNextButton();
|
|
269
|
+
|
|
270
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 2/3');
|
|
271
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
272
|
+
GuideDialogSteps.clickOnNextButton();
|
|
273
|
+
|
|
274
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Enable autocomplete — 3/3');
|
|
275
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Autocomplete menu.');
|
|
276
|
+
GuideDialogSteps.clickOnNextButton();
|
|
277
|
+
BaseSteps.validateUrl('/autocomplete');
|
|
278
|
+
|
|
279
|
+
// Connectors
|
|
280
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors — 1/2');
|
|
281
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
282
|
+
GuideDialogSteps.clickOnNextButton();
|
|
283
|
+
|
|
284
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Connectors — 2/2');
|
|
285
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Connectors menu.');
|
|
286
|
+
GuideDialogSteps.clickOnNextButton();
|
|
287
|
+
BaseSteps.validateUrl('/connectors');
|
|
288
|
+
|
|
289
|
+
// RDF Rank
|
|
290
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank — 1/2');
|
|
291
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Setup menu.');
|
|
292
|
+
GuideDialogSteps.clickOnNextButton();
|
|
293
|
+
|
|
294
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('RDF Rank — 2/2');
|
|
295
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the RDF Rank menu.');
|
|
296
|
+
GuideDialogSteps.clickOnNextButton();
|
|
297
|
+
BaseSteps.validateUrl('/rdfrank');
|
|
298
|
+
|
|
299
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
|
|
300
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
|
|
301
|
+
});
|
|
302
|
+
});
|
|
@@ -6,13 +6,12 @@ import {TTYGViewSteps} from "../../../../steps/ttyg/ttyg-view-steps.js";
|
|
|
6
6
|
import {ChatPanelSteps} from "../../../../steps/ttyg/chat-panel-steps.js";
|
|
7
7
|
import {RepositoriesStubs} from "../../../../stubs/repositories/repositories-stubs.js";
|
|
8
8
|
import {TtygAgentSettingsModalSteps} from "../../../../steps/ttyg/ttyg-agent-settings-modal.steps.js";
|
|
9
|
-
import {BrowserStubs} from
|
|
9
|
+
import {BrowserStubs} from '../../../../stubs/browser-stubs.js';
|
|
10
10
|
|
|
11
11
|
describe('ttyg-conversation-guide', () => {
|
|
12
12
|
let repositoryId = 'starwars';
|
|
13
13
|
|
|
14
14
|
beforeEach(() => {
|
|
15
|
-
BrowserStubs.stubWindowOpen();
|
|
16
15
|
RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
|
|
17
16
|
RepositoriesStubs.stubBaseEndpoints(repositoryId);
|
|
18
17
|
cy.presetRepository(repositoryId);
|
|
@@ -25,6 +24,8 @@ describe('ttyg-conversation-guide', () => {
|
|
|
25
24
|
TTYGStubs.stubExplainResponse('/ttyg/chats/explain-response-3.json');
|
|
26
25
|
|
|
27
26
|
GuideSteps.visit();
|
|
27
|
+
BrowserStubs.stubWindowOpen();
|
|
28
|
+
|
|
28
29
|
GuideSteps.verifyGuidesListExists();
|
|
29
30
|
|
|
30
31
|
GuideSteps.runFirstGuide()
|
|
@@ -67,6 +68,7 @@ describe('ttyg-conversation-guide', () => {
|
|
|
67
68
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 6/12');
|
|
68
69
|
GuideDialogSteps.assertDialogWithContentIsVisible(`Explain the answer by clicking on the 'Explain response' button.`);
|
|
69
70
|
TTYGViewSteps.clickOnExplainResponse(0);
|
|
71
|
+
cy.wait('@explain-response');
|
|
70
72
|
|
|
71
73
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 7/12');
|
|
72
74
|
GuideDialogSteps.assertDialogWithContentIsVisible(`Wait for the answer to be returned and explore it. When ready proceed by clicking next.`);
|
|
@@ -80,6 +82,8 @@ describe('ttyg-conversation-guide', () => {
|
|
|
80
82
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 11/12');
|
|
81
83
|
GuideDialogSteps.assertDialogWithContentIsVisible(`You can ask the agent how it derived the answer by clicking on the button`);
|
|
82
84
|
TTYGViewSteps.clickOnHowDeliverAnswerButton();
|
|
85
|
+
cy.wait('@create-chat')
|
|
86
|
+
cy.wait('@create-chat')
|
|
83
87
|
|
|
84
88
|
GuideDialogSteps.assertDialogWithTitleIsVisible('Ask the agent — 12/12');
|
|
85
89
|
GuideDialogSteps.assertDialogWithContentIsVisible(`Wait for the answer to be returned and explore it. When ready proceed by clicking next.`);
|
|
@@ -0,0 +1,87 @@
|
|
|
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 {RepositoriesStubs} from "../../../../stubs/repositories/repositories-stubs.js";
|
|
5
|
+
import {GuideDialogSteps} from "../../../../steps/guides/guide-dialog-steps.js";
|
|
6
|
+
import {MainMenuSteps} from "../../../../steps/main-menu-steps.js";
|
|
7
|
+
import {TtygAgentSettingsModalSteps} from "../../../../steps/ttyg/ttyg-agent-settings-modal.steps.js";
|
|
8
|
+
import {TTYGViewSteps} from "../../../../steps/ttyg/ttyg-view-steps.js";
|
|
9
|
+
import {ModalDialogSteps} from "../../../../steps/modal-dialog-steps.js";
|
|
10
|
+
|
|
11
|
+
describe('Edit TTYG agent guide', () => {
|
|
12
|
+
let repositoryId = 'starwars';
|
|
13
|
+
|
|
14
|
+
beforeEach(() => {
|
|
15
|
+
RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
|
|
16
|
+
RepositoriesStubs.stubBaseEndpoints(repositoryId);
|
|
17
|
+
GuidesStubs.stubTTYGEditAgentGuide();
|
|
18
|
+
|
|
19
|
+
GuideSteps.visit();
|
|
20
|
+
GuideSteps.verifyGuidesListExists();
|
|
21
|
+
|
|
22
|
+
GuideSteps.runFirstGuide()
|
|
23
|
+
cy.wait('@getGuides');
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('should end guide when no api key is present', () => {
|
|
27
|
+
TTYGStubs.stubAgentListGetError('Set the config property \'graphdb.llm.api-key\' to your LLM API key');
|
|
28
|
+
cy.presetRepository(repositoryId);
|
|
29
|
+
|
|
30
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/18');
|
|
31
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
32
|
+
MainMenuSteps.clickOnMenuLab();
|
|
33
|
+
|
|
34
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 2/18');
|
|
35
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
36
|
+
MainMenuSteps.clickOnTTYGSubmenu();
|
|
37
|
+
|
|
38
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Missing OpenAI key — 3/18');
|
|
39
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('To use Talk to Your Graph, GraphDB must first be configured to work with LLM API.');
|
|
40
|
+
GuideDialogSteps.clickOnCloseButton();
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
it('should edit TTYG agent', () => {
|
|
44
|
+
cy.presetRepository(repositoryId);
|
|
45
|
+
TTYGStubs.stubAgentListGet();
|
|
46
|
+
TTYGStubs.stubAgentDefaultsGet();
|
|
47
|
+
TTYGStubs.stubChatGet();
|
|
48
|
+
TTYGStubs.stubAgentEdit();
|
|
49
|
+
|
|
50
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/18');
|
|
51
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
|
|
52
|
+
MainMenuSteps.clickOnMenuLab();
|
|
53
|
+
|
|
54
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 2/18');
|
|
55
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
|
|
56
|
+
MainMenuSteps.clickOnTTYGSubmenu();
|
|
57
|
+
|
|
58
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 4/18');
|
|
59
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('An agent\'s configuration such as the extraction methods can be reconfigured at any time');
|
|
60
|
+
GuideDialogSteps.clickOnNextButton();
|
|
61
|
+
|
|
62
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 11/18');
|
|
63
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the edit agent button to edit the configuration of the selected agent.');
|
|
64
|
+
TTYGViewSteps.editCurrentAgent();
|
|
65
|
+
|
|
66
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/18');
|
|
67
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Enabling SPARQL search allows the agent to answers questions by performing a SPARQL query');
|
|
68
|
+
GuideDialogSteps.clickOnNextButton();
|
|
69
|
+
|
|
70
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/18');
|
|
71
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable SPARQL search query method.');
|
|
72
|
+
TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
|
|
73
|
+
|
|
74
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/18');
|
|
75
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable providing an ontology in a named graph.');
|
|
76
|
+
TtygAgentSettingsModalSteps.selectSparqlMethodOntologyGraph();
|
|
77
|
+
|
|
78
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/18');
|
|
79
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Type http://example.com as the named graph which contains the ontology.');
|
|
80
|
+
GuideDialogSteps.clickOnNextButton();
|
|
81
|
+
|
|
82
|
+
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 17/18');
|
|
83
|
+
GuideDialogSteps.assertDialogWithContentIsVisible('Click to save the agent settings.');
|
|
84
|
+
TtygAgentSettingsModalSteps.saveAgent();
|
|
85
|
+
ModalDialogSteps.getDialog().should('not.exist');
|
|
86
|
+
});
|
|
87
|
+
});
|