graphdb-workbench-tests 4.0.0-TR15 → 4.0.0-TR17
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/explore/graphs-overview/graphs.overview.spec.js +1 -1
- package/e2e-legacy/graph-navigator/graph-navigator.spec.js +31 -17
- package/e2e-legacy/repository/ontop-repository.spec.js +22 -31
- package/e2e-legacy/resource/resource.spec.js +3 -3
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +4 -0
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
- package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
- package/npm-shrinkwrap.json +17 -17
- package/package.json +1 -1
- package/steps/graph-navigator-steps.js +10 -6
- package/steps/home-steps.js +3 -6
- package/steps/layout-steps.js +6 -0
- package/steps/ontop-repository-steps.js +4 -0
- package/steps/resource/resource-steps.js +4 -4
- package/steps/visual-graph-steps.js +8 -0
- package/support/visual-graph-commands.js +19 -0
|
@@ -115,7 +115,7 @@ describe('Graphs overview screen validation', () => {
|
|
|
115
115
|
it('Should give the controls on the page accessible names', () => {
|
|
116
116
|
// Then the search field should have a screen reader label and a placeholder
|
|
117
117
|
GraphsOverviewSteps.getGraphsSearchLabel()
|
|
118
|
-
.should('have.class', '
|
|
118
|
+
.should('have.class', 'screen-reader-only')
|
|
119
119
|
.and('contain.text', 'Search Graphs');
|
|
120
120
|
GraphsOverviewSteps.getGraphsSearchInput()
|
|
121
121
|
.should('have.attr', 'id', 'search-graphs')
|
|
@@ -156,26 +156,38 @@ describe('Graph Navigator', () => {
|
|
|
156
156
|
});
|
|
157
157
|
|
|
158
158
|
describe('Settings', () => {
|
|
159
|
-
it('should open the settings
|
|
159
|
+
it('should open the settings sidebar', () => {
|
|
160
160
|
// Given I open the Graph Navigator view.
|
|
161
161
|
GraphNavigatorSteps.visit();
|
|
162
162
|
|
|
163
163
|
// When I click the Settings button.
|
|
164
164
|
GraphNavigatorSteps.openSettings();
|
|
165
165
|
|
|
166
|
-
// Then I expect the settings
|
|
167
|
-
GraphNavigatorSteps.
|
|
166
|
+
// Then I expect the settings sidebar to be open.
|
|
167
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
168
168
|
GraphNavigatorSteps.getBrowseButton().should('contain', 'Browse');
|
|
169
169
|
});
|
|
170
170
|
|
|
171
|
-
it('should
|
|
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', () => {
|
|
172
184
|
// Given I open the settings of a repository without uploaded settings.
|
|
173
185
|
GraphNavigatorSteps.visit();
|
|
174
186
|
GraphNavigatorSteps.openSettings();
|
|
175
187
|
|
|
176
|
-
// Then I expect
|
|
177
|
-
GraphNavigatorSteps.
|
|
178
|
-
GraphNavigatorSteps.getResetButton().should('
|
|
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');
|
|
179
191
|
});
|
|
180
192
|
|
|
181
193
|
it('should cancel a selected file', () => {
|
|
@@ -189,7 +201,7 @@ describe('Graph Navigator', () => {
|
|
|
189
201
|
GraphNavigatorSteps.clickCancelFile();
|
|
190
202
|
|
|
191
203
|
// Then I expect the file to be removed.
|
|
192
|
-
GraphNavigatorSteps.
|
|
204
|
+
GraphNavigatorSteps.getSettingsSidebar().should('not.contain', SETTINGS_FILE_NAME);
|
|
193
205
|
GraphNavigatorSteps.getUploadButton().should('be.disabled');
|
|
194
206
|
});
|
|
195
207
|
|
|
@@ -209,8 +221,8 @@ describe('Graph Navigator', () => {
|
|
|
209
221
|
// When I cancel.
|
|
210
222
|
GraphNavigatorSteps.cancelDialog();
|
|
211
223
|
|
|
212
|
-
// Then I expect the
|
|
213
|
-
GraphNavigatorSteps.
|
|
224
|
+
// Then I expect the sidebar to stay open with the file still selected.
|
|
225
|
+
GraphNavigatorSteps.getSettingsSidebar().should('be.visible');
|
|
214
226
|
GraphNavigatorSteps.getSelectedSettingsFile(SETTINGS_FILE_NAME).should('exist');
|
|
215
227
|
|
|
216
228
|
// When I upload and confirm.
|
|
@@ -222,7 +234,7 @@ describe('Graph Navigator', () => {
|
|
|
222
234
|
GraphNavigatorSteps.getWorkspace().should('exist');
|
|
223
235
|
});
|
|
224
236
|
|
|
225
|
-
it('should show the validation errors of a rejected file
|
|
237
|
+
it('should show the validation errors of a rejected file', () => {
|
|
226
238
|
// Given I have selected a settings file with invalid values and an unknown property.
|
|
227
239
|
GraphNavigatorSteps.visit();
|
|
228
240
|
GraphNavigatorSteps.openSettings();
|
|
@@ -232,12 +244,12 @@ describe('Graph Navigator', () => {
|
|
|
232
244
|
GraphNavigatorSteps.clickUpload();
|
|
233
245
|
GraphNavigatorSteps.confirmDialog();
|
|
234
246
|
|
|
235
|
-
// Then I expect the errors
|
|
247
|
+
// Then I expect the errors under the file.
|
|
236
248
|
ToasterSteps.verifyNewToasterError('Could not upload the settings');
|
|
237
249
|
GraphNavigatorSteps.getSelectedSettingsFile(INVALID_SETTINGS_FILE_NAME).should('exist');
|
|
238
250
|
GraphNavigatorSteps.getUploadErrors().should('be.visible')
|
|
239
251
|
.and('contain', '3 validation errors')
|
|
240
|
-
.and('contain', 'Fix
|
|
252
|
+
.and('contain', 'Fix the errors and upload again.');
|
|
241
253
|
GraphNavigatorSteps.getUploadError('gn:acceptBlankNodes').should('contain', 'Must be of type boolean');
|
|
242
254
|
GraphNavigatorSteps.getUploadError('gn:openWorldProperties').should('contain', 'Must be of type boolean');
|
|
243
255
|
GraphNavigatorSteps.getUploadError('gn:unknownSetting')
|
|
@@ -267,16 +279,18 @@ describe('Graph Navigator', () => {
|
|
|
267
279
|
GraphNavigatorSteps.clickUpload();
|
|
268
280
|
GraphNavigatorSteps.confirmDialog();
|
|
269
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');
|
|
270
284
|
|
|
271
|
-
// When I
|
|
285
|
+
// When I close the settings.
|
|
272
286
|
GraphNavigatorSteps.closeSettings();
|
|
273
287
|
|
|
274
|
-
// Then I expect the
|
|
275
|
-
GraphNavigatorSteps.
|
|
288
|
+
// Then I expect the sidebar to close.
|
|
289
|
+
GraphNavigatorSteps.getSettingsSidebar().should('not.exist');
|
|
276
290
|
|
|
277
291
|
// When I reset them.
|
|
278
292
|
GraphNavigatorSteps.openSettings();
|
|
279
|
-
GraphNavigatorSteps.getResetButton().should('be.
|
|
293
|
+
GraphNavigatorSteps.getResetButton().should('be.enabled');
|
|
280
294
|
GraphNavigatorSteps.clickReset();
|
|
281
295
|
|
|
282
296
|
// Then I expect a confirmation that warns the diagram may behave unexpectedly.
|
|
@@ -245,48 +245,42 @@ describe('Ontop repositories', () => {
|
|
|
245
245
|
context('Repository maintenance permission', () => {
|
|
246
246
|
|
|
247
247
|
const PASSWORD = 'root';
|
|
248
|
-
|
|
249
|
-
const REPOSITORY_MANAGER_USERNAME = 'repoManager';
|
|
248
|
+
let repositoryMaintainerUsername;
|
|
250
249
|
|
|
251
250
|
beforeEach(() => {
|
|
252
|
-
|
|
253
|
-
username: REPOSITORY_MAINTAINER_USERNAME,
|
|
254
|
-
password: PASSWORD,
|
|
255
|
-
grantedAuthorities: [
|
|
256
|
-
`READ_REPO_${repositoryId}`,
|
|
257
|
-
`MAINTAIN_REPO_${repositoryId}`,
|
|
258
|
-
`WRITE_REPO_${repositoryId}`
|
|
259
|
-
]
|
|
260
|
-
});
|
|
261
|
-
cy.createUser({
|
|
262
|
-
username: REPOSITORY_MANAGER_USERNAME,
|
|
263
|
-
password: PASSWORD,
|
|
264
|
-
grantedAuthorities: [
|
|
265
|
-
'ROLE_USER',
|
|
266
|
-
'ROLE_MONITORING',
|
|
267
|
-
'ROLE_REPO_MANAGER'
|
|
268
|
-
]
|
|
269
|
-
});
|
|
270
|
-
cy.switchOnSecurity();
|
|
251
|
+
repositoryMaintainerUsername = 'repo-maintainer-' + Date.now();
|
|
271
252
|
});
|
|
272
253
|
|
|
273
254
|
afterEach(() => {
|
|
274
255
|
cy.loginAsAdmin()
|
|
275
256
|
.then(() => {
|
|
276
|
-
cy.deleteUser(
|
|
277
|
-
cy.deleteUser(REPOSITORY_MANAGER_USERNAME, true);
|
|
257
|
+
cy.deleteUser(repositoryMaintainerUsername, true);
|
|
278
258
|
cy.switchOffSecurity(true);
|
|
279
259
|
});
|
|
280
260
|
});
|
|
281
261
|
it('should allow a repository maintainer to edit an Ontop repository', () => {
|
|
282
262
|
RepositoryStubs.spyGetJDBCProperties();
|
|
283
263
|
// GIVEN: An Ontop repository exists
|
|
284
|
-
cy.loginAs(REPOSITORY_MANAGER_USERNAME, PASSWORD);
|
|
285
264
|
OntopRepositorySteps.visitCreate();
|
|
286
265
|
createOntopRepository(repositoryId);
|
|
266
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
267
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('exist');
|
|
268
|
+
|
|
269
|
+
// AND: A user with maintenance permission for it is created after the repository,
|
|
270
|
+
// because creating a repository removes the permissions already granted for its ID.
|
|
271
|
+
cy.createUser({
|
|
272
|
+
username: repositoryMaintainerUsername,
|
|
273
|
+
password: PASSWORD,
|
|
274
|
+
grantedAuthorities: [
|
|
275
|
+
`READ_REPO_${repositoryId}`,
|
|
276
|
+
`MAINTAIN_REPO_${repositoryId}`,
|
|
277
|
+
`WRITE_REPO_${repositoryId}`
|
|
278
|
+
]
|
|
279
|
+
});
|
|
280
|
+
cy.switchOnSecurity();
|
|
287
281
|
|
|
288
282
|
// WHEN: I log in as a user with maintenance permission
|
|
289
|
-
cy.loginAs(
|
|
283
|
+
cy.loginAs(repositoryMaintainerUsername, PASSWORD);
|
|
290
284
|
RepositorySteps.visit();
|
|
291
285
|
|
|
292
286
|
// THEN: The repository is visible because the user can maintain it
|
|
@@ -326,8 +320,7 @@ describe('Ontop repositories', () => {
|
|
|
326
320
|
.should('contain.value', 'ontop.cardinalityMode=LOOSE');
|
|
327
321
|
// Saving of the OBDA file verifies that the repository maintainer can access rest/repositories/file/upload
|
|
328
322
|
OntopRepositorySteps.editOBDAFile();
|
|
329
|
-
|
|
330
|
-
.find('textarea')
|
|
323
|
+
OntopRepositorySteps.getFileContentEditor()
|
|
331
324
|
.invoke('val')
|
|
332
325
|
.should('include', 'edited ODBA file');
|
|
333
326
|
ModalDialogSteps.close();
|
|
@@ -339,8 +332,7 @@ describe('Ontop repositories', () => {
|
|
|
339
332
|
ModalDialogSteps.getDialogHeader()
|
|
340
333
|
.should('contain', 'Edit "OBDA or R2RML file" contents');
|
|
341
334
|
|
|
342
|
-
|
|
343
|
-
.find('textarea')
|
|
335
|
+
OntopRepositorySteps.getFileContentEditor()
|
|
344
336
|
.type('{moveToStart}Add commentary for testing purpose');
|
|
345
337
|
|
|
346
338
|
ModalDialogSteps.clickOKButton();
|
|
@@ -354,8 +346,7 @@ describe('Ontop repositories', () => {
|
|
|
354
346
|
cy.wait('@getJDBCProperties');
|
|
355
347
|
OntopRepositorySteps.editOBDAFile();
|
|
356
348
|
|
|
357
|
-
|
|
358
|
-
.find('textarea')
|
|
349
|
+
OntopRepositorySteps.getFileContentEditor()
|
|
359
350
|
.invoke('val')
|
|
360
351
|
.should('include', 'Add commentary for testing purpose');
|
|
361
352
|
});
|
|
@@ -88,7 +88,7 @@ describe('Resource view', () => {
|
|
|
88
88
|
YasrSteps.getResults().should('have.length', 6);
|
|
89
89
|
|
|
90
90
|
// When I turn off showing of blank nodes.
|
|
91
|
-
ResourceSteps.
|
|
91
|
+
ResourceSteps.clickOnShowBlankNodesCheckbox();
|
|
92
92
|
|
|
93
93
|
// Then I expect to see all triples including this with blank node.
|
|
94
94
|
YasrSteps.getResults().should('have.length', 5);
|
|
@@ -105,11 +105,11 @@ describe('Resource view', () => {
|
|
|
105
105
|
VisualGraphSteps.verifyUrl();
|
|
106
106
|
});
|
|
107
107
|
|
|
108
|
-
it('should open the Graph Navigator view when click on the "
|
|
108
|
+
it('should open the Graph Navigator view when click on the "Graph Navigator" button', () => {
|
|
109
109
|
// When I am on resource view and page loaded a resource.
|
|
110
110
|
ResourceSteps.visit(`uri=${SUBJECT_RESOURCE_ENCODED}`);
|
|
111
111
|
|
|
112
|
-
// When I click on "
|
|
112
|
+
// When I click on "Graph Navigator" button.
|
|
113
113
|
ResourceSteps.clickOnVisualizeGraphNavigatorButton();
|
|
114
114
|
|
|
115
115
|
// Then I expect to be redirected to the Graph Navigator view with the resource as the start uri.
|
|
@@ -8,6 +8,7 @@ import {LoginSteps} from '../../../steps/login-steps';
|
|
|
8
8
|
import {MainMenuSteps} from '../../../steps/main-menu-steps';
|
|
9
9
|
import {SecurityStubs} from '../../../stubs/security-stubs.js';
|
|
10
10
|
import {RepositorySteps} from '../../../steps/repository-steps.js';
|
|
11
|
+
import {LayoutSteps} from '../../../steps/layout-steps';
|
|
11
12
|
|
|
12
13
|
describe('User and Access', () => {
|
|
13
14
|
|
|
@@ -918,6 +919,9 @@ describe('User and Access', () => {
|
|
|
918
919
|
}
|
|
919
920
|
|
|
920
921
|
function navigateMenuPath(pathArray, expectedUrl, expectedTitle) {
|
|
922
|
+
// The layout rebuilds the navbar model when the previous navigation finishes loading, which closes any opened
|
|
923
|
+
// submenu, so wait for it before opening a menu group.
|
|
924
|
+
LayoutSteps.getLayout().should('not.have.class', 'loading');
|
|
921
925
|
pathArray.forEach((label, index) => {
|
|
922
926
|
if (index === 0) {
|
|
923
927
|
MainMenuSteps.clickOnMenu(label);
|
|
@@ -5,7 +5,7 @@ import {GraphConfigStubs} from '../../../../stubs/graph-config-stubs.js';
|
|
|
5
5
|
import {BrowserStubs} from '../../../../stubs/browser-stubs.js';
|
|
6
6
|
import {VisualGraphSplitButtonSteps} from '../../../../steps/visual-graph-split-button-steps.js';
|
|
7
7
|
|
|
8
|
-
describe('"
|
|
8
|
+
describe('"VizGraph" split button', () => {
|
|
9
9
|
let repositoryId;
|
|
10
10
|
|
|
11
11
|
beforeEach(() => {
|
|
@@ -21,27 +21,27 @@ describe('"Visualize" split button', () => {
|
|
|
21
21
|
cy.deleteRepository(repositoryId);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
it('should display "
|
|
24
|
+
it('should display "VizGraph" split button when user execute a CONSTRUCT query', () => {
|
|
25
25
|
// WHEN: I visit a page with 'ontotext-yasgui-web-component' on it, and execute select query.
|
|
26
26
|
executeSelectQuery();
|
|
27
|
-
// THEN: I expect the '
|
|
27
|
+
// THEN: I expect the 'VizGraph' button to not be visible.
|
|
28
28
|
VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
|
|
29
29
|
|
|
30
30
|
// WHEN: I execute a CONSTRUCT query.
|
|
31
31
|
executeConstructQuery();
|
|
32
|
-
// THEN: I expect the '
|
|
32
|
+
// THEN: I expect the 'VizGraph' button to be visible.
|
|
33
33
|
VisualGraphSplitButtonSteps.getVisualizeMainButton().should('be.visible');
|
|
34
34
|
|
|
35
35
|
// WHEN: I execute SELECT query again.
|
|
36
36
|
executeSelectQuery();
|
|
37
|
-
// THEN: I expect the '
|
|
37
|
+
// THEN: I expect the 'VizGraph' button to not be visible.
|
|
38
38
|
VisualGraphSplitButtonSteps.getVisualizeMainButton().should('not.be.visible');
|
|
39
39
|
});
|
|
40
40
|
|
|
41
41
|
it('should inform user that there no created graph configurations', () => {
|
|
42
42
|
// GIVEN: There are no graph configurations.
|
|
43
43
|
GraphConfigStubs.stubGetEmptyGraphConfigs();
|
|
44
|
-
// AND: I visit a page with 'ontotext-yasgui-web-component' on it, and the '
|
|
44
|
+
// AND: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
|
|
45
45
|
executeConstructQuery();
|
|
46
46
|
|
|
47
47
|
// WHEN: I open the dropdown.
|
|
@@ -57,7 +57,7 @@ describe('"Visualize" split button', () => {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
it('should open graphs-visualizations view when click on main button', () => {
|
|
60
|
-
// GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the '
|
|
60
|
+
// GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
|
|
61
61
|
executeConstructQuery();
|
|
62
62
|
|
|
63
63
|
// WHEN: I click on main button
|
|
@@ -69,7 +69,7 @@ describe('"Visualize" split button', () => {
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
it('should open graphs-visualizations view when select a graph configuration', () => {
|
|
72
|
-
// GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the '
|
|
72
|
+
// GIVEN: I visit a page with 'ontotext-yasgui-web-component' on it, and the 'VizGraph' button is visible.
|
|
73
73
|
executeConstructQuery();
|
|
74
74
|
GraphConfigStubs.stubGetGraphConfigs();
|
|
75
75
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import {LoginSteps} from "../../../steps/login-steps";
|
|
2
|
+
import {HeaderSteps} from "../../../steps/header-steps";
|
|
3
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
4
|
+
import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
|
|
5
|
+
import {ActiveRepositoryWidgetSteps} from "../../../steps/widgets/active-repository-widget-steps";
|
|
6
|
+
|
|
7
|
+
describe('Graph config owner actions', () => {
|
|
8
|
+
const password = 'Admin123!';
|
|
9
|
+
let repositoryId;
|
|
10
|
+
let username;
|
|
11
|
+
let graphConfigName;
|
|
12
|
+
|
|
13
|
+
beforeEach(() => {
|
|
14
|
+
repositoryId = 'graph-config-owner-' + Date.now();
|
|
15
|
+
username = 'graph-config-user-' + Date.now();
|
|
16
|
+
graphConfigName = 'graph-config-owner-' + Date.now();
|
|
17
|
+
cy.createRepository({id: repositoryId});
|
|
18
|
+
cy.presetRepository(repositoryId);
|
|
19
|
+
cy.createUser({username, password}, true);
|
|
20
|
+
cy.switchOnSecurity();
|
|
21
|
+
cy.loginAsAdmin();
|
|
22
|
+
cy.createGraphConfig(graphConfigName, repositoryId, true);
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
afterEach(() => {
|
|
26
|
+
cy.loginAsAdmin();
|
|
27
|
+
cy.switchOffSecurity(true);
|
|
28
|
+
cy.deleteGraphConfig(graphConfigName);
|
|
29
|
+
cy.deleteUser(username);
|
|
30
|
+
cy.deleteRepository(repositoryId);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('should show edit and delete for own graph configs after switching users', () => {
|
|
34
|
+
// Given I am logged in as a basic user
|
|
35
|
+
LoginSteps.visitLoginPage();
|
|
36
|
+
LoginSteps.loginWithUser(username, password);
|
|
37
|
+
// Wait for the home page to load for the basic user. Cypress is fast and would log out before the page has
|
|
38
|
+
// loaded, so the page would never have the basic user and the test would not reproduce the problem.
|
|
39
|
+
ActiveRepositoryWidgetSteps.getActiveRepository().should('contain.text', repositoryId);
|
|
40
|
+
// And I log out
|
|
41
|
+
HeaderSteps.logout();
|
|
42
|
+
|
|
43
|
+
// When I log in as admin, without reloading the page
|
|
44
|
+
LoginSteps.loginWithUser('admin', 'root');
|
|
45
|
+
// And I open the Visual Graph page from the main menu
|
|
46
|
+
MainMenuSteps.clickOnVisualGraph();
|
|
47
|
+
|
|
48
|
+
// Then I expect to see the edit and delete buttons of the graph config I own
|
|
49
|
+
VisualGraphSteps.getEditConfigButton(graphConfigName).should('be.visible');
|
|
50
|
+
VisualGraphSteps.getDeleteConfigButton(graphConfigName).should('be.visible');
|
|
51
|
+
});
|
|
52
|
+
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-TR17",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "4.0.0-
|
|
9
|
+
"version": "4.0.0-TR17",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
@@ -5341,9 +5341,9 @@
|
|
|
5341
5341
|
"license": "MIT"
|
|
5342
5342
|
},
|
|
5343
5343
|
"node_modules/fast-uri": {
|
|
5344
|
-
"version": "3.1.
|
|
5345
|
-
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.
|
|
5346
|
-
"integrity": "sha512-
|
|
5344
|
+
"version": "3.1.9",
|
|
5345
|
+
"resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
|
|
5346
|
+
"integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
|
|
5347
5347
|
"dev": true,
|
|
5348
5348
|
"funding": [
|
|
5349
5349
|
{
|
|
@@ -8433,9 +8433,9 @@
|
|
|
8433
8433
|
"license": "MIT"
|
|
8434
8434
|
},
|
|
8435
8435
|
"node_modules/qs": {
|
|
8436
|
-
"version": "6.
|
|
8437
|
-
"resolved": "https://registry.npmjs.org/qs/-/qs-6.
|
|
8438
|
-
"integrity": "sha512-
|
|
8436
|
+
"version": "6.17.1",
|
|
8437
|
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.17.1.tgz",
|
|
8438
|
+
"integrity": "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==",
|
|
8439
8439
|
"dev": true,
|
|
8440
8440
|
"license": "BSD-3-Clause",
|
|
8441
8441
|
"dependencies": {
|
|
@@ -9019,9 +9019,9 @@
|
|
|
9019
9019
|
}
|
|
9020
9020
|
},
|
|
9021
9021
|
"node_modules/serialize-javascript": {
|
|
9022
|
-
"version": "7.1.
|
|
9023
|
-
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.
|
|
9024
|
-
"integrity": "sha512-
|
|
9022
|
+
"version": "7.1.4",
|
|
9023
|
+
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.4.tgz",
|
|
9024
|
+
"integrity": "sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==",
|
|
9025
9025
|
"dev": true,
|
|
9026
9026
|
"license": "BSD-3-Clause",
|
|
9027
9027
|
"peer": true,
|
|
@@ -9633,9 +9633,9 @@
|
|
|
9633
9633
|
}
|
|
9634
9634
|
},
|
|
9635
9635
|
"node_modules/systeminformation": {
|
|
9636
|
-
"version": "5.33.
|
|
9637
|
-
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.
|
|
9638
|
-
"integrity": "sha512-
|
|
9636
|
+
"version": "5.33.19",
|
|
9637
|
+
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-5.33.19.tgz",
|
|
9638
|
+
"integrity": "sha512-Zm7wGeCG7PqfvzegMJIzrxICopWqYCeLATVmvxOOci1isLcNVKgY4Fr0hhYQzvc7cgtK3377jQVChTFAnznOiA==",
|
|
9639
9639
|
"dev": true,
|
|
9640
9640
|
"license": "MIT",
|
|
9641
9641
|
"os": [
|
|
@@ -9975,9 +9975,9 @@
|
|
|
9975
9975
|
}
|
|
9976
9976
|
},
|
|
9977
9977
|
"node_modules/undici": {
|
|
9978
|
-
"version": "6.29.
|
|
9979
|
-
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.
|
|
9980
|
-
"integrity": "sha512-
|
|
9978
|
+
"version": "6.29.1",
|
|
9979
|
+
"resolved": "https://registry.npmjs.org/undici/-/undici-6.29.1.tgz",
|
|
9980
|
+
"integrity": "sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==",
|
|
9981
9981
|
"dev": true,
|
|
9982
9982
|
"license": "MIT",
|
|
9983
9983
|
"engines": {
|
package/package.json
CHANGED
|
@@ -67,11 +67,15 @@ export class GraphNavigatorSteps extends BaseSteps {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
static closeSettings() {
|
|
70
|
+
cy.get('.graph-navigator-settings-drawer .p-drawer-close-button').click();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static clickOnCanvas() {
|
|
70
74
|
GraphNavigatorSteps.getCanvas().click('bottomLeft');
|
|
71
75
|
}
|
|
72
76
|
|
|
73
|
-
static
|
|
74
|
-
return cy.get('[data-test="graph-navigator-settings-
|
|
77
|
+
static getSettingsSidebar() {
|
|
78
|
+
return cy.get('[data-test="graph-navigator-settings-sidebar"]');
|
|
75
79
|
}
|
|
76
80
|
|
|
77
81
|
static getSettingsFileInput() {
|
|
@@ -84,7 +88,7 @@ export class GraphNavigatorSteps extends BaseSteps {
|
|
|
84
88
|
}
|
|
85
89
|
|
|
86
90
|
static getSelectedSettingsFile(fileName) {
|
|
87
|
-
return GraphNavigatorSteps.
|
|
91
|
+
return GraphNavigatorSteps.getSettingsSidebar().contains(fileName);
|
|
88
92
|
}
|
|
89
93
|
|
|
90
94
|
static getUploadErrors() {
|
|
@@ -96,7 +100,7 @@ export class GraphNavigatorSteps extends BaseSteps {
|
|
|
96
100
|
}
|
|
97
101
|
|
|
98
102
|
static getUploadButton() {
|
|
99
|
-
return GraphNavigatorSteps.
|
|
103
|
+
return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-upload-button');
|
|
100
104
|
}
|
|
101
105
|
|
|
102
106
|
static clickUpload() {
|
|
@@ -104,11 +108,11 @@ export class GraphNavigatorSteps extends BaseSteps {
|
|
|
104
108
|
}
|
|
105
109
|
|
|
106
110
|
static clickCancelFile() {
|
|
107
|
-
GraphNavigatorSteps.
|
|
111
|
+
GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-cancel-button').click();
|
|
108
112
|
}
|
|
109
113
|
|
|
110
114
|
static getBrowseButton() {
|
|
111
|
-
return GraphNavigatorSteps.
|
|
115
|
+
return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-choose-button');
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
static clickExport() {
|
package/steps/home-steps.js
CHANGED
|
@@ -5,6 +5,7 @@ import {SavedSparqlQueriesWidgetSteps} from './widgets/saved-sparql-queries-widg
|
|
|
5
5
|
import {RepositorySteps} from './repository-steps';
|
|
6
6
|
import {BaseSteps} from './base-steps';
|
|
7
7
|
import {EnvironmentStubs} from '../stubs/environment-stubs';
|
|
8
|
+
import {LayoutSteps} from './layout-steps';
|
|
8
9
|
|
|
9
10
|
class HomeSteps extends BaseSteps {
|
|
10
11
|
|
|
@@ -38,10 +39,6 @@ class HomeSteps extends BaseSteps {
|
|
|
38
39
|
cy.visit(`/?repositoryId=${repositoryId}`);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
static getLayout() {
|
|
42
|
-
return cy.get('.wb-layout');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
42
|
static getView() {
|
|
46
43
|
return cy.get('#wb-home');
|
|
47
44
|
}
|
|
@@ -59,11 +56,11 @@ class HomeSteps extends BaseSteps {
|
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
static getNavigationMenu() {
|
|
62
|
-
return
|
|
59
|
+
return LayoutSteps.getLayout().find('.wb-navbar');
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
static getPageHeader() {
|
|
66
|
-
return
|
|
63
|
+
return LayoutSteps.getLayout().find('.wb-header');
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
// ===========================
|
|
@@ -25,6 +25,10 @@ export class OntopRepositorySteps {
|
|
|
25
25
|
OntopRepositorySteps.getOBDAFileFieldEditButton().click();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
static getFileContentEditor() {
|
|
29
|
+
return cy.getByTestId('repository-file-content');
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
static getOntologyFileField() {
|
|
29
33
|
return cy.get('div').contains("Ontology file");
|
|
30
34
|
}
|
|
@@ -50,12 +50,12 @@ export class ResourceSteps {
|
|
|
50
50
|
ResourceSteps.getSameAsButton().find('.icon-same-as-off').should('have.length', 1);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
static
|
|
54
|
-
return cy.
|
|
53
|
+
static getShowBlankNodesCheckbox() {
|
|
54
|
+
return cy.getByTestId('show-blank-nodes-checkbox');
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
static
|
|
58
|
-
ResourceSteps.
|
|
57
|
+
static clickOnShowBlankNodesCheckbox() {
|
|
58
|
+
ResourceSteps.getShowBlankNodesCheckbox().click();
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
static getDownloadAsDropdown() {
|
|
@@ -369,6 +369,14 @@ export class VisualGraphSteps extends BaseSteps {
|
|
|
369
369
|
this.getGraphConfig(name).closest('tr').find('.delete-config').click();
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
+
static getEditConfigButton(name) {
|
|
373
|
+
return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-edit-btn');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
static getDeleteConfigButton(name) {
|
|
377
|
+
return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-delete-btn');
|
|
378
|
+
}
|
|
379
|
+
|
|
372
380
|
static getGraphConfigSearchPanel() {
|
|
373
381
|
return cy.get('.search-bar');
|
|
374
382
|
}
|
|
@@ -19,6 +19,25 @@ Cypress.Commands.add('searchEasyVisualGraph', (searchGraph) => {
|
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
+
Cypress.Commands.add('createGraphConfig', (name, repositoryId, secured = false) => {
|
|
23
|
+
let headers = {'Content-Type': 'application/json', 'X-GraphDB-Repository': repositoryId};
|
|
24
|
+
if (secured) {
|
|
25
|
+
headers = {...headers, 'Authorization': Cypress.env('adminToken')};
|
|
26
|
+
}
|
|
27
|
+
return cy.request({
|
|
28
|
+
method: 'POST',
|
|
29
|
+
url: GRAPH_CONFIG_URL,
|
|
30
|
+
headers,
|
|
31
|
+
body: {
|
|
32
|
+
name,
|
|
33
|
+
startMode: 'search',
|
|
34
|
+
startQueryIncludeInferred: true,
|
|
35
|
+
startQuerySameAs: true,
|
|
36
|
+
shared: false
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
22
41
|
Cypress.Commands.add('deleteGraphConfig', (name) => {
|
|
23
42
|
cy.request({
|
|
24
43
|
method: 'GET',
|