graphdb-workbench-tests 3.3.1 → 3.3.2-TR1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/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/graphql/playground-editor-steps.js +46 -0
- package/steps/import/import-resource-message-dialog.js +1 -1
- package/steps/main-menu-steps.js +12 -0
- package/steps/repository-steps.js +2 -2
- package/steps/setup/user-and-access-steps.js +4 -0
- package/steps/visual-graph-steps.js +1 -1
- package/stubs/guides/guides-stubs.js +8 -0
- package/stubs/security-stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +2 -4
|
@@ -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
|
+
});
|
|
@@ -127,7 +127,9 @@ describe('Import server files', () => {
|
|
|
127
127
|
ImportResourceMessageDialog.getDialog().should('be.visible');
|
|
128
128
|
|
|
129
129
|
// with full error message
|
|
130
|
-
ImportResourceMessageDialog
|
|
130
|
+
ImportResourceMessageDialog
|
|
131
|
+
.getMessage()
|
|
132
|
+
.should('contain.text', 'RDF Parse Error: The element type "ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame" must be terminated by the matching end-tag');
|
|
131
133
|
|
|
132
134
|
// When I click on corner close button.
|
|
133
135
|
ImportResourceMessageDialog.close();
|
|
@@ -102,7 +102,7 @@ describe('Repositories', () => {
|
|
|
102
102
|
// Check the repo is present in the list of repos and we are not yet connected to it
|
|
103
103
|
RepositorySteps.getRepositoryFromList(repositoryId)
|
|
104
104
|
.should('be.visible')
|
|
105
|
-
.find('.
|
|
105
|
+
.find('.icon-connection-off')
|
|
106
106
|
.should('be.visible');
|
|
107
107
|
|
|
108
108
|
// Verify it's configuration can be downloaded
|
|
@@ -121,7 +121,10 @@ describe('Repositories', () => {
|
|
|
121
121
|
cy.get('.onto-dropdown-menu-item')
|
|
122
122
|
.contains(repositoryId)
|
|
123
123
|
.first()
|
|
124
|
-
.scrollIntoView()
|
|
124
|
+
.scrollIntoView();
|
|
125
|
+
cy.get('.onto-dropdown-menu-item')
|
|
126
|
+
.contains(repositoryId)
|
|
127
|
+
.first()
|
|
125
128
|
.click();
|
|
126
129
|
|
|
127
130
|
// Should visualize the selected repo
|
|
@@ -6,6 +6,7 @@ import {ToasterSteps} from '../../../steps/toaster-steps';
|
|
|
6
6
|
import HomeSteps from '../../../steps/home-steps';
|
|
7
7
|
import {LoginSteps} from '../../../steps/login-steps';
|
|
8
8
|
import {MainMenuSteps} from '../../../steps/main-menu-steps';
|
|
9
|
+
import {SecurityStubs} from '../../../stubs/security-stubs.js';
|
|
9
10
|
|
|
10
11
|
describe('User and Access', () => {
|
|
11
12
|
|
|
@@ -102,6 +103,41 @@ describe('User and Access', () => {
|
|
|
102
103
|
UserAndAccessSteps.addTextToCustomRoleField('{backspace}');
|
|
103
104
|
// Then the error should not be visible
|
|
104
105
|
UserAndAccessSteps.getCustomRoleFieldError().should('not.be.visible');
|
|
106
|
+
|
|
107
|
+
// When I create the user with a valid custom role
|
|
108
|
+
UserAndAccessSteps.clickWriteAccessAny();
|
|
109
|
+
SecurityStubs.spyOnUserCreate()
|
|
110
|
+
UserAndAccessSteps.confirmUserCreate();
|
|
111
|
+
// Then the user should be created with that custom role
|
|
112
|
+
cy.wait('@create-user').its('request.body').then((body) => {
|
|
113
|
+
expect(body).to.deep.eq({
|
|
114
|
+
"password": "password",
|
|
115
|
+
"grantedAuthorities": [
|
|
116
|
+
"ROLE_USER",
|
|
117
|
+
"CUSTOM_AA",
|
|
118
|
+
"WRITE_REPO_*",
|
|
119
|
+
"READ_REPO_*"
|
|
120
|
+
],
|
|
121
|
+
"appSettings": {
|
|
122
|
+
"DEFAULT_VIS_GRAPH_SCHEMA": true,
|
|
123
|
+
"DEFAULT_INFERENCE": true,
|
|
124
|
+
"DEFAULT_SAMEAS": true,
|
|
125
|
+
"IGNORE_SHARED_QUERIES": false,
|
|
126
|
+
"EXECUTE_COUNT": true
|
|
127
|
+
}
|
|
128
|
+
})
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
cy.url().should('include', '/users');
|
|
132
|
+
UserAndAccessSteps.findUserInTable(user).should('be.visible');
|
|
133
|
+
UserAndAccessSteps.getUserCustomRoles('@user')
|
|
134
|
+
.should('have.length', 1)
|
|
135
|
+
.eq(0).and('have.text', 'AA');
|
|
136
|
+
// And when I open the edit page for that user, the custom role should be visible in the field without the prefix
|
|
137
|
+
UserAndAccessSteps.openEditUserPage(user);
|
|
138
|
+
UserAndAccessSteps.getCustomRoleField().find('.tag-item span')
|
|
139
|
+
.should('have.length', 1)
|
|
140
|
+
.eq(0).and('have.text', 'AA');
|
|
105
141
|
});
|
|
106
142
|
|
|
107
143
|
it('Adding a role with a CUSTOM_ prefix shows a warning message', () => {
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"guideName": {
|
|
4
|
+
"en": "Main menu guide test"
|
|
5
|
+
},
|
|
6
|
+
"steps": [
|
|
7
|
+
{
|
|
8
|
+
"guideBlockName": "click-main-menu",
|
|
9
|
+
"options": {
|
|
10
|
+
"menu": "import",
|
|
11
|
+
"mainAction": "import-file",
|
|
12
|
+
"showIntro": true
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"guideBlockName": "click-main-menu",
|
|
17
|
+
"options": {
|
|
18
|
+
"menu": "repositories",
|
|
19
|
+
"mainAction": "create-repository",
|
|
20
|
+
"showIntro": true
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"guideBlockName": "click-main-menu",
|
|
25
|
+
"options": {
|
|
26
|
+
"menu": "class-hierarchy",
|
|
27
|
+
"mainAction": "class-hierarchy",
|
|
28
|
+
"showIntro": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"guideBlockName": "click-main-menu",
|
|
33
|
+
"options": {
|
|
34
|
+
"menu": "class-relationships",
|
|
35
|
+
"mainAction": "class-relationships",
|
|
36
|
+
"showIntro": true
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"guideBlockName": "click-main-menu",
|
|
41
|
+
"options": {
|
|
42
|
+
"menu": "visual-graph",
|
|
43
|
+
"mainAction": "visual-graph",
|
|
44
|
+
"showIntro": true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"guideBlockName": "click-main-menu",
|
|
49
|
+
"options": {
|
|
50
|
+
"menu": "similarity",
|
|
51
|
+
"mainAction": "create-similarity-index",
|
|
52
|
+
"showIntro": true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"guideBlockName": "click-main-menu",
|
|
57
|
+
"options": {
|
|
58
|
+
"menu": "sparql",
|
|
59
|
+
"mainAction": "execute-sparql-query",
|
|
60
|
+
"showIntro": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"guideBlockName": "click-main-menu",
|
|
65
|
+
"options": {
|
|
66
|
+
"menu": "ttyg",
|
|
67
|
+
"mainAction": "create-ttyg-agent",
|
|
68
|
+
"showIntro": true
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"guideBlockName": "click-main-menu",
|
|
73
|
+
"options": {
|
|
74
|
+
"menu": "autocomplete",
|
|
75
|
+
"mainAction": "enable-autocomplete",
|
|
76
|
+
"showIntro": true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"guideBlockName": "click-main-menu",
|
|
81
|
+
"options": {
|
|
82
|
+
"menu": "connectors",
|
|
83
|
+
"title": "Connectors"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"guideBlockName": "click-main-menu",
|
|
88
|
+
"options": {
|
|
89
|
+
"menu": "rdf-rank",
|
|
90
|
+
"title": "RDF Rank"
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"guideBlockName": "guide-end"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"guideName": {
|
|
4
|
+
"en": "edit-ttyg-test-guide"
|
|
5
|
+
},
|
|
6
|
+
"steps": [
|
|
7
|
+
{
|
|
8
|
+
"guideBlockName": "edit-ttyg-agent",
|
|
9
|
+
"options": {
|
|
10
|
+
"methods": [
|
|
11
|
+
{
|
|
12
|
+
"guideBlockName": "sparql-search-method",
|
|
13
|
+
"options": {
|
|
14
|
+
"ontologyGraph": "http://example.com"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2-TR1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.3.
|
|
9
|
+
"version": "3.3.2-TR1",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
package/package.json
CHANGED
package/steps/base-steps.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class PlaygroundEditorSteps {
|
|
2
|
+
|
|
3
|
+
static getResponse() {
|
|
4
|
+
return cy.get('.graphiql-response');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static getResponseCodeMirror() {
|
|
8
|
+
return PlaygroundEditorSteps.getResponse().find('.CodeMirror');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static getGraphiqlEditors() {
|
|
12
|
+
return cy.get('.graphiql-editors');
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static getGraphiqlEditorsCodeMirror() {
|
|
16
|
+
return PlaygroundEditorSteps.getGraphiqlEditors().find('.CodeMirror');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static getGraphiqlEditorTools() {
|
|
20
|
+
return cy.get('.graphiql-editor-tools');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getGraphiqlEditorTool() {
|
|
24
|
+
return cy.get('.graphiql-editor-tool');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getVariablesBtn() {
|
|
28
|
+
return PlaygroundEditorSteps.getGraphiqlEditorTools().find('button[data-name="variables"]');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static openVariables() {
|
|
32
|
+
PlaygroundEditorSteps.getVariablesBtn().click();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getHeadersBtn() {
|
|
36
|
+
return PlaygroundEditorSteps.getGraphiqlEditorTools().find('button[data-name="headers"]');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static openHeaders() {
|
|
40
|
+
PlaygroundEditorSteps.getHeadersBtn().click();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getActiveGraphiqlEditorToolCodeMirror() {
|
|
44
|
+
return PlaygroundEditorSteps.getGraphiqlEditorTool().find('.graphiql-editor:not(.hidden) .CodeMirror');
|
|
45
|
+
}
|
|
46
|
+
}
|
package/steps/main-menu-steps.js
CHANGED
|
@@ -95,6 +95,10 @@ export class MainMenuSteps {
|
|
|
95
95
|
|
|
96
96
|
static clickOnVisualGraph() {
|
|
97
97
|
this.clickOnExplore();
|
|
98
|
+
this.clickOnSubmenuVisualGraph();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
static clickOnSubmenuVisualGraph() {
|
|
98
102
|
this.getSubMenuButton('sub-menu-visual-graph').click();
|
|
99
103
|
}
|
|
100
104
|
|
|
@@ -190,11 +194,19 @@ export class MainMenuSteps {
|
|
|
190
194
|
|
|
191
195
|
static clickOnRDFRank() {
|
|
192
196
|
this.clickOnMenuSetup();
|
|
197
|
+
this.clickOnSubmenuRDFRank();
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
static clickOnSubmenuRDFRank() {
|
|
193
201
|
this.getSubMenuButton('sub-menu-rdf-rank').click();
|
|
194
202
|
}
|
|
195
203
|
|
|
196
204
|
static clickOnConnectors() {
|
|
197
205
|
this.clickOnMenuSetup();
|
|
206
|
+
this.clickOnSubmenuConnectors();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
static clickOnSubmenuConnectors() {
|
|
198
210
|
this.getSubMenuButton('sub-menu-connectors').click();
|
|
199
211
|
}
|
|
200
212
|
|
|
@@ -76,7 +76,7 @@ export class RepositorySteps extends BaseSteps {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
static getRepositoryConnectionOffBtn(id) {
|
|
79
|
-
return RepositorySteps.getRepositoryFromList(id).find('.
|
|
79
|
+
return RepositorySteps.getRepositoryFromList(id).find('.icon-connection-off');
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
static activateRepository(id) {
|
|
@@ -84,7 +84,7 @@ export class RepositorySteps extends BaseSteps {
|
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
static getRepositoryConnectionOnBtn(id) {
|
|
87
|
-
return RepositorySteps.getRepositoryFromList(id).find('.
|
|
87
|
+
return RepositorySteps.getRepositoryFromList(id).find('.icon-connection-on');
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
static clickRepositoryIcon(repositoryId, selector) {
|
|
@@ -105,6 +105,10 @@ export class UserAndAccessSteps {
|
|
|
105
105
|
.closest('tr').as('user');
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
static getUserCustomRoles(userRow) {
|
|
109
|
+
return cy.get(userRow).getByTestId('custom-roles').getByTestId('custom-role');
|
|
110
|
+
}
|
|
111
|
+
|
|
108
112
|
static getUsernameField() {
|
|
109
113
|
return cy.get('#wb-user-username');
|
|
110
114
|
}
|
|
@@ -133,7 +133,7 @@ export class VisualGraphSteps extends BaseSteps {
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
static getNodeLabel(nodeId) {
|
|
136
|
-
return this.getNode(nodeId).find('.node-label-body');
|
|
136
|
+
return this.getNode(nodeId).find('.node-label-body div');
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
static getPredicates() {
|
|
@@ -15,6 +15,10 @@ export class GuidesStubs {
|
|
|
15
15
|
GuidesStubs.stubWithFixture('../fixtures/guides/ttyg/conversation/ttyg-conversation-guide.json');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
static stubTTYGEditAgentGuide() {
|
|
19
|
+
GuidesStubs.stubWithFixture('../fixtures/guides/ttyg/edit-ttyg-agent/edit-ttyg-agent-guide.json');
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
static stubClassHierarchyGuide() {
|
|
19
23
|
GuidesStubs.stubWithFixture('../fixtures/guides/class-hierarchy/class-hierarchy-guide.json');
|
|
20
24
|
}
|
|
@@ -39,6 +43,10 @@ export class GuidesStubs {
|
|
|
39
43
|
GuidesStubs.stubWithFixture('../fixtures/guides/download-guide-resource/download-guide-resource-guide.json');
|
|
40
44
|
}
|
|
41
45
|
|
|
46
|
+
static stubMainMenuGuide() {
|
|
47
|
+
GuidesStubs.stubWithFixture('../fixtures/guides/main-menu/main-menu-guide.json');
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
static stubDownloadResource(resourcePath, resourceFile) {
|
|
43
51
|
cy.intercept('GET', `/rest/guides/download/${resourcePath}/${resourceFile}`, {
|
|
44
52
|
fixture: `guides/download-resource.ttl`,
|
package/stubs/security-stubs.js
CHANGED
|
@@ -10,6 +10,10 @@ export class SecurityStubs {
|
|
|
10
10
|
}).as('security-get-admin');
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
static spyOnUserCreate() {
|
|
14
|
+
cy.intercept('POST', 'rest/security/users/*').as('create-user');
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
static stubInferAndSameAsDefaults() {
|
|
14
18
|
cy.intercept('rest/security/all', (req) => {
|
|
15
19
|
req.reply(SecurityStubs.getResponseSecurityEnabled());
|
package/stubs/ttyg/ttyg-stubs.js
CHANGED
|
@@ -106,12 +106,10 @@ export class TTYGStubs extends Stubs {
|
|
|
106
106
|
}).as('get-agent');
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
static stubAgentListGetError() {
|
|
109
|
+
static stubAgentListGetError(error = 'Internal Server Error') {
|
|
110
110
|
cy.intercept('GET', '/rest/chat/agents', {
|
|
111
111
|
statusCode: 500,
|
|
112
|
-
|
|
113
|
-
error: 'Internal Server Error'
|
|
114
|
-
}
|
|
112
|
+
body: error
|
|
115
113
|
}).as('get-agent-list-error');
|
|
116
114
|
}
|
|
117
115
|
|