graphdb-workbench-tests 3.5.0-TR10 → 3.5.0-TR11
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/repository/ontop-repository.spec.js +132 -0
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +95 -95
- package/fixtures/ontop/university-complete_edited.obda +106 -0
- package/npm-shrinkwrap.json +13 -13
- package/package.json +1 -1
- package/steps/ontop-repository-steps.js +20 -0
- package/steps/setup/user-and-access-steps.js +11 -11
- package/stubs/repositories/repositories-stubs.js +4 -0
|
@@ -241,4 +241,136 @@ describe('Ontop repositories', () => {
|
|
|
241
241
|
// Then I expect url to be calculated properly
|
|
242
242
|
OntopRepositorySteps.getUrlInput().should('have.value', 'jdbc:snowflake://someHostName.snowflakecomputing.com:1234/?warehouse=test_database');
|
|
243
243
|
});
|
|
244
|
+
|
|
245
|
+
context('Repository maintenance permission', () => {
|
|
246
|
+
|
|
247
|
+
const PASSWORD = 'root';
|
|
248
|
+
const REPOSITORY_MAINTAINER_USERNAME = 'repoMaintainer';
|
|
249
|
+
const REPOSITORY_MANAGER_USERNAME = 'repoManager';
|
|
250
|
+
|
|
251
|
+
beforeEach(() => {
|
|
252
|
+
cy.createUser({
|
|
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();
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
afterEach(() => {
|
|
274
|
+
cy.loginAsAdmin()
|
|
275
|
+
.then(() => {
|
|
276
|
+
cy.deleteUser(REPOSITORY_MAINTAINER_USERNAME, true);
|
|
277
|
+
cy.deleteUser(REPOSITORY_MANAGER_USERNAME, true);
|
|
278
|
+
cy.switchOffSecurity(true);
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
it('should allow a repository maintainer to edit an Ontop repository', () => {
|
|
282
|
+
RepositoryStubs.spyGetJDBCProperties();
|
|
283
|
+
// GIVEN: An Ontop repository exists
|
|
284
|
+
cy.loginAs(REPOSITORY_MANAGER_USERNAME, PASSWORD);
|
|
285
|
+
OntopRepositorySteps.visitCreate();
|
|
286
|
+
createOntopRepository(repositoryId);
|
|
287
|
+
|
|
288
|
+
// WHEN: I log in as a user with maintenance permission
|
|
289
|
+
cy.loginAs(REPOSITORY_MAINTAINER_USERNAME, PASSWORD);
|
|
290
|
+
RepositorySteps.visit(false);
|
|
291
|
+
|
|
292
|
+
// THEN: The repository is visible because the user can maintain it
|
|
293
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('exist');
|
|
294
|
+
|
|
295
|
+
// WHEN: I edit the repository
|
|
296
|
+
RepositorySteps.editRepository(repositoryId);
|
|
297
|
+
cy.wait('@getJDBCProperties');
|
|
298
|
+
RepositorySteps.getUsernameFieldEditRepo()
|
|
299
|
+
.should('have.value', '')
|
|
300
|
+
.type('username');
|
|
301
|
+
|
|
302
|
+
// Uploading an OBDA file verifies that the repository maintainer can access rest/repositories/file/upload
|
|
303
|
+
OntopRepositorySteps.clickObdaFileUploadButton();
|
|
304
|
+
OntopRepositorySteps.uploadObdaFile('fixtures/ontop/university-complete_edited.obda');
|
|
305
|
+
|
|
306
|
+
// Saving the form verifies that the repository maintainer can access rest/repositories/ontop/jdbc-properties
|
|
307
|
+
OntopRepositorySteps.getAdditionalJDBCProperties()
|
|
308
|
+
.should('have.value', '')
|
|
309
|
+
.type('ontop.cardinalityMode=LOOSE');
|
|
310
|
+
|
|
311
|
+
RepositorySteps.clickSaveEditedRepo();
|
|
312
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
313
|
+
|
|
314
|
+
// THEN: The changes are persisted
|
|
315
|
+
RepositorySteps.visit(false);
|
|
316
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('exist');
|
|
317
|
+
RepositorySteps.editRepository(repositoryId);
|
|
318
|
+
cy.wait('@getJDBCProperties');
|
|
319
|
+
|
|
320
|
+
OntopRepositorySteps.getOntopSaveButton().should('be.visible');
|
|
321
|
+
RepositorySteps.getUsernameFieldEditRepo()
|
|
322
|
+
.should('have.value', 'username');
|
|
323
|
+
|
|
324
|
+
// Loading the saved properties verifies GET access to rest/repositories/ontop/jdbc-properties
|
|
325
|
+
OntopRepositorySteps.getAdditionalJDBCProperties()
|
|
326
|
+
.should('contain.value', 'ontop.cardinalityMode=LOOSE');
|
|
327
|
+
// Saving of the OBDA file verifies that the repository maintainer can access rest/repositories/file/upload
|
|
328
|
+
OntopRepositorySteps.editOBDAFile();
|
|
329
|
+
ModalDialogSteps.getDialogBody()
|
|
330
|
+
.find('textarea')
|
|
331
|
+
.invoke('val')
|
|
332
|
+
.should('include', 'edited ODBA file');
|
|
333
|
+
ModalDialogSteps.close();
|
|
334
|
+
|
|
335
|
+
// WHEN: I edit and save the OBDA file
|
|
336
|
+
// Opening the editor verifies access to rest/repositories/file,
|
|
337
|
+
// while saving verifies access to rest/repositories/file/update.
|
|
338
|
+
OntopRepositorySteps.editOBDAFile();
|
|
339
|
+
ModalDialogSteps.getDialogHeader()
|
|
340
|
+
.should('contain', 'Edit "OBDA or R2RML file" contents');
|
|
341
|
+
|
|
342
|
+
ModalDialogSteps.getDialogBody()
|
|
343
|
+
.find('textarea')
|
|
344
|
+
.type('{moveToStart}Add commentary for testing purpose');
|
|
345
|
+
|
|
346
|
+
ModalDialogSteps.clickOKButton();
|
|
347
|
+
RepositorySteps.clickSaveEditedRepo();
|
|
348
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
349
|
+
|
|
350
|
+
// THEN: The OBDA file changes are persisted
|
|
351
|
+
RepositorySteps.visit(false);
|
|
352
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('exist');
|
|
353
|
+
RepositorySteps.editRepository(repositoryId);
|
|
354
|
+
cy.wait('@getJDBCProperties');
|
|
355
|
+
OntopRepositorySteps.editOBDAFile();
|
|
356
|
+
|
|
357
|
+
ModalDialogSteps.getDialogBody()
|
|
358
|
+
.find('textarea')
|
|
359
|
+
.invoke('val')
|
|
360
|
+
.should('include', 'Add commentary for testing purpose');
|
|
361
|
+
});
|
|
362
|
+
});
|
|
244
363
|
});
|
|
364
|
+
|
|
365
|
+
const createOntopRepository = (repositoryId) => {
|
|
366
|
+
RepositorySteps.typeRepositoryId(repositoryId);
|
|
367
|
+
OntopRepositorySteps.selectOracleDatabase();
|
|
368
|
+
OntopRepositorySteps.typeHostName('localhost');
|
|
369
|
+
OntopRepositorySteps.typePort(5423);
|
|
370
|
+
OntopRepositorySteps.typeDatabaseName('database-name');
|
|
371
|
+
OntopRepositorySteps.clickObdaFileUploadButton();
|
|
372
|
+
OntopRepositorySteps.uploadObdaFile('fixtures/ontop/university-complete.obda');
|
|
373
|
+
// Wait edit OBDA edit button be visible to ensure that file is uploaded.
|
|
374
|
+
OntopRepositorySteps.getOBDAFileFieldEditButton().should('be.visible');
|
|
375
|
+
OntopRepositorySteps.clickOnCreateRepositoryButton();
|
|
376
|
+
};
|
|
@@ -79,8 +79,8 @@ describe('User and Access', () => {
|
|
|
79
79
|
testForUser(user, false);
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
it('Create
|
|
83
|
-
createUser(user, PASSWORD, ROLE_USER, {
|
|
82
|
+
it('Create maintainer user', () => {
|
|
83
|
+
createUser(user, PASSWORD, ROLE_USER, {maintain: true, repoName});
|
|
84
84
|
testForUser(user, false);
|
|
85
85
|
});
|
|
86
86
|
|
|
@@ -181,17 +181,17 @@ describe('User and Access', () => {
|
|
|
181
181
|
});
|
|
182
182
|
|
|
183
183
|
// Skipped until image with GDB implementation is available
|
|
184
|
-
it.skip('should create user with
|
|
184
|
+
it.skip('should create user with maintain repo permission for specific repo', () => {
|
|
185
185
|
SecurityStubs.spyOnUserCreate();
|
|
186
186
|
UserAndAccessSteps.getUsersCatalogContainer().should('be.visible');
|
|
187
|
-
createUser(user, PASSWORD, ROLE_USER, {
|
|
187
|
+
createUser(user, PASSWORD, ROLE_USER, {maintain: true, repoName: repoName});
|
|
188
188
|
// Then the user should be created with that custom role
|
|
189
189
|
cy.wait('@create-user').its('request.body').then((body) => {
|
|
190
190
|
expect(body).to.deep.eq({
|
|
191
191
|
'password': 'password',
|
|
192
192
|
'grantedAuthorities': [
|
|
193
193
|
'ROLE_USER',
|
|
194
|
-
`
|
|
194
|
+
`MAINTAIN_REPO_${repoName}`,
|
|
195
195
|
`WRITE_REPO_${repoName}`,
|
|
196
196
|
`READ_REPO_${repoName}`,
|
|
197
197
|
],
|
|
@@ -205,13 +205,13 @@ describe('User and Access', () => {
|
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
UserAndAccessSteps.getUsersCatalogContainer().should('be.visible');
|
|
208
|
-
assertUserAuthsInCatalog(user, {repo: repoName, read: false,
|
|
208
|
+
assertUserAuthsInCatalog(user, {repo: repoName, read: false, maintain: true, graphql: false});
|
|
209
209
|
|
|
210
210
|
UserAndAccessSteps.openEditUserPage(user);
|
|
211
211
|
cy.wait('@get-user');
|
|
212
212
|
UserAndAccessSteps.getRepositoryRightsList().should('be.visible');
|
|
213
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
214
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
213
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: true, graphql: false});
|
|
214
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: false, graphql: true});
|
|
215
215
|
});
|
|
216
216
|
});
|
|
217
217
|
|
|
@@ -314,32 +314,32 @@ describe('User and Access', () => {
|
|
|
314
314
|
|
|
315
315
|
it('initial state', () => {
|
|
316
316
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
317
|
-
verifyCheckedUserAuth('*', {read: false, write: false,
|
|
318
|
-
verifyDisabledUserAuth('*', {read: false, write: false,
|
|
319
|
-
verifyCheckedUserAuth(repoName, {read: false, write: false,
|
|
320
|
-
verifyDisabledUserAuth(repoName, {read: false, write: false,
|
|
317
|
+
verifyCheckedUserAuth('*', {read: false, write: false, maintain: false, graphql: false});
|
|
318
|
+
verifyDisabledUserAuth('*', {read: false, write: false, maintain: true, graphql: true});
|
|
319
|
+
verifyCheckedUserAuth(repoName, {read: false, write: false, maintain: false, graphql: false});
|
|
320
|
+
verifyDisabledUserAuth(repoName, {read: false, write: false, maintain: false, graphql: true});
|
|
321
321
|
});
|
|
322
322
|
|
|
323
323
|
context('for non user roles', () => {
|
|
324
324
|
it('admin', () => {
|
|
325
325
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
326
326
|
UserAndAccessSteps.selectRoleRadioButton(ROLE_CUSTOM_ADMIN);
|
|
327
|
-
verifyCheckedUserAuth('*', {read: true, write: true,
|
|
328
|
-
verifyDisabledUserAuth('*', {read: true, write: true,
|
|
327
|
+
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
328
|
+
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
329
329
|
|
|
330
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
331
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
330
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: true, graphql: false});
|
|
331
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
332
332
|
});
|
|
333
333
|
|
|
334
334
|
it('repository manager', () => {
|
|
335
335
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
336
336
|
UserAndAccessSteps.selectRoleRadioButton(ROLE_REPO_MANAGER);
|
|
337
337
|
|
|
338
|
-
verifyCheckedUserAuth('*', {read: true, write: true,
|
|
339
|
-
verifyDisabledUserAuth('*', {read: true, write: true,
|
|
338
|
+
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
339
|
+
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
340
340
|
|
|
341
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
342
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
341
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: true, graphql: false});
|
|
342
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
343
343
|
});
|
|
344
344
|
});
|
|
345
345
|
|
|
@@ -347,36 +347,36 @@ describe('User and Access', () => {
|
|
|
347
347
|
it('read', () => {
|
|
348
348
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
349
349
|
setRoles({read: true, repoName});
|
|
350
|
-
verifyCheckedUserAuth(repoName, {read: true, write: false,
|
|
351
|
-
verifyDisabledUserAuth(repoName, {read: false, write: false,
|
|
350
|
+
verifyCheckedUserAuth(repoName, {read: true, write: false, maintain: false, graphql: false});
|
|
351
|
+
verifyDisabledUserAuth(repoName, {read: false, write: false, maintain: false, graphql: false});
|
|
352
352
|
});
|
|
353
353
|
|
|
354
354
|
it('write', () => {
|
|
355
355
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
356
356
|
setRoles({readWrite: true, repoName});
|
|
357
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
358
|
-
verifyDisabledUserAuth(repoName, {read: true, write: false,
|
|
357
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: false, graphql: false});
|
|
358
|
+
verifyDisabledUserAuth(repoName, {read: true, write: false, maintain: false, graphql: false});
|
|
359
359
|
});
|
|
360
360
|
|
|
361
|
-
it('
|
|
361
|
+
it('maintain', () => {
|
|
362
362
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
363
|
-
setRoles({
|
|
364
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
365
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
363
|
+
setRoles({maintain: true, repoName});
|
|
364
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: true, graphql: false});
|
|
365
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: false, graphql: true});
|
|
366
366
|
});
|
|
367
367
|
|
|
368
368
|
it('graphql with read', () => {
|
|
369
369
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
370
370
|
setRoles({read: true, graphql: true, repoName});
|
|
371
|
-
verifyCheckedUserAuth(repoName, {read: true, write: false,
|
|
372
|
-
verifyDisabledUserAuth(repoName, {read: false, write: false,
|
|
371
|
+
verifyCheckedUserAuth(repoName, {read: true, write: false, maintain: false, graphql: true});
|
|
372
|
+
verifyDisabledUserAuth(repoName, {read: false, write: false, maintain: false, graphql: false});
|
|
373
373
|
});
|
|
374
374
|
|
|
375
375
|
it('graphql with write', () => {
|
|
376
376
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
377
377
|
setRoles({readWrite: true, graphql: true, repoName});
|
|
378
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
379
|
-
verifyDisabledUserAuth(repoName, {read: true, write: false,
|
|
378
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: false, graphql: true});
|
|
379
|
+
verifyDisabledUserAuth(repoName, {read: true, write: false, maintain: false, graphql: false});
|
|
380
380
|
});
|
|
381
381
|
});
|
|
382
382
|
|
|
@@ -386,41 +386,41 @@ describe('User and Access', () => {
|
|
|
386
386
|
it('read', () => {
|
|
387
387
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
388
388
|
setRoles({read: true, anyRepo});
|
|
389
|
-
verifyCheckedUserAuth(anyRepo, {read: true, write: false,
|
|
390
|
-
verifyDisabledUserAuth(anyRepo, {read: false, write: false,
|
|
389
|
+
verifyCheckedUserAuth(anyRepo, {read: true, write: false, maintain: false, graphql: false});
|
|
390
|
+
verifyDisabledUserAuth(anyRepo, {read: false, write: false, maintain: true, graphql: false});
|
|
391
391
|
|
|
392
|
-
verifyCheckedUserAuth(repoName, {read: true, write: false,
|
|
393
|
-
verifyDisabledUserAuth(repoName, {read: true, write: false,
|
|
392
|
+
verifyCheckedUserAuth(repoName, {read: true, write: false, maintain: false, graphql: false});
|
|
393
|
+
verifyDisabledUserAuth(repoName, {read: true, write: false, maintain: false, graphql: false});
|
|
394
394
|
});
|
|
395
395
|
|
|
396
396
|
it('write', () => {
|
|
397
397
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
398
398
|
setRoles({readWrite: true, anyRepo});
|
|
399
|
-
verifyCheckedUserAuth(anyRepo, {read: true, write: true,
|
|
400
|
-
verifyDisabledUserAuth(anyRepo, {read: true, write: false,
|
|
399
|
+
verifyCheckedUserAuth(anyRepo, {read: true, write: true, maintain: false, graphql: false});
|
|
400
|
+
verifyDisabledUserAuth(anyRepo, {read: true, write: false, maintain: true, graphql: false});
|
|
401
401
|
|
|
402
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
403
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
402
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: false, graphql: false});
|
|
403
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: false, graphql: false});
|
|
404
404
|
});
|
|
405
405
|
|
|
406
406
|
it('graphql with read', () => {
|
|
407
407
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
408
408
|
setRoles({read: true, graphql: true, anyRepo});
|
|
409
|
-
verifyCheckedUserAuth(anyRepo, {read: true, write: false,
|
|
410
|
-
verifyDisabledUserAuth(anyRepo, {read: false, write: false,
|
|
409
|
+
verifyCheckedUserAuth(anyRepo, {read: true, write: false, maintain: false, graphql: true});
|
|
410
|
+
verifyDisabledUserAuth(anyRepo, {read: false, write: false, maintain: true, graphql: false});
|
|
411
411
|
|
|
412
|
-
verifyCheckedUserAuth(repoName, {read: true, write: false,
|
|
413
|
-
verifyDisabledUserAuth(repoName, {read: true, write: false,
|
|
412
|
+
verifyCheckedUserAuth(repoName, {read: true, write: false, maintain: false, graphql: true});
|
|
413
|
+
verifyDisabledUserAuth(repoName, {read: true, write: false, maintain: false, graphql: true});
|
|
414
414
|
});
|
|
415
415
|
|
|
416
416
|
it('graphql with write', () => {
|
|
417
417
|
UserAndAccessSteps.clickCreateNewUserButton();
|
|
418
418
|
setRoles({readWrite: true, graphql: true, anyRepo});
|
|
419
|
-
verifyCheckedUserAuth(anyRepo, {read: true, write: true,
|
|
420
|
-
verifyDisabledUserAuth(anyRepo, {read: true, write: false,
|
|
419
|
+
verifyCheckedUserAuth(anyRepo, {read: true, write: true, maintain: false, graphql: true});
|
|
420
|
+
verifyDisabledUserAuth(anyRepo, {read: true, write: false, maintain: true, graphql: false});
|
|
421
421
|
|
|
422
|
-
verifyCheckedUserAuth(repoName, {read: true, write: true,
|
|
423
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true,
|
|
422
|
+
verifyCheckedUserAuth(repoName, {read: true, write: true, maintain: false, graphql: true});
|
|
423
|
+
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: false, graphql: true});
|
|
424
424
|
});
|
|
425
425
|
});
|
|
426
426
|
});
|
|
@@ -623,25 +623,25 @@ describe('User and Access', () => {
|
|
|
623
623
|
});
|
|
624
624
|
});
|
|
625
625
|
|
|
626
|
-
context('User with
|
|
626
|
+
context('User with maintain permission', () => {
|
|
627
627
|
let withoutPermissionRepositoryId;
|
|
628
628
|
let readRepositoryId;
|
|
629
629
|
let writeRepositoryId;
|
|
630
630
|
let graphQLOnlyRepositoryId;
|
|
631
|
-
let
|
|
632
|
-
const
|
|
631
|
+
let maintainedRepositoryId;
|
|
632
|
+
const maintainerUser = 'maintainerUser';
|
|
633
633
|
|
|
634
634
|
beforeEach(() => {
|
|
635
635
|
RepositoriesStubs.spyGetRepositories();
|
|
636
636
|
readRepositoryId = 'readRepositoryId-' + Date.now();
|
|
637
637
|
writeRepositoryId = 'writeRepositoryId-' + Date.now();
|
|
638
638
|
graphQLOnlyRepositoryId = 'graphQLOnlyRepositoryId-' + Date.now();
|
|
639
|
-
|
|
639
|
+
maintainedRepositoryId = 'maintainedRepositoryId-' + Date.now();
|
|
640
640
|
withoutPermissionRepositoryId = 'withoutPermissionRepositoryId-' + Date.now();
|
|
641
641
|
cy.createRepository({id: readRepositoryId});
|
|
642
642
|
cy.createRepository({id: writeRepositoryId});
|
|
643
643
|
cy.createRepository({id: graphQLOnlyRepositoryId});
|
|
644
|
-
cy.createRepository({id:
|
|
644
|
+
cy.createRepository({id: maintainedRepositoryId});
|
|
645
645
|
cy.createRepository({id: withoutPermissionRepositoryId});
|
|
646
646
|
UserAndAccessSteps.visit();
|
|
647
647
|
// Users table should be visible
|
|
@@ -654,21 +654,21 @@ describe('User and Access', () => {
|
|
|
654
654
|
cy.deleteRepository(readRepositoryId, true);
|
|
655
655
|
cy.deleteRepository(writeRepositoryId, true);
|
|
656
656
|
cy.deleteRepository(graphQLOnlyRepositoryId, true);
|
|
657
|
-
cy.deleteRepository(
|
|
657
|
+
cy.deleteRepository(maintainedRepositoryId, true);
|
|
658
658
|
cy.deleteRepository(withoutPermissionRepositoryId, true);
|
|
659
|
-
cy.deleteUser(
|
|
659
|
+
cy.deleteUser(maintainerUser, true);
|
|
660
660
|
cy.switchOffFreeAccess(true);
|
|
661
661
|
cy.switchOffSecurity(true);
|
|
662
662
|
});
|
|
663
663
|
});
|
|
664
664
|
|
|
665
|
-
it('should list all repositories for which a user with
|
|
665
|
+
it('should list all repositories for which a user with maintain permission has at least read permission', () => {
|
|
666
666
|
// Given there are five repositories.
|
|
667
667
|
// And there is a user with permissions for four of them:
|
|
668
|
-
// 1.
|
|
669
|
-
createUser(
|
|
668
|
+
// 1. Maintain permission for one repository.
|
|
669
|
+
createUser(maintainerUser, PASSWORD, ROLE_USER, {maintain: true, repoName: maintainedRepositoryId});
|
|
670
670
|
// 2. Read permission for one repository.
|
|
671
|
-
UserAndAccessSteps.openEditUserPage(
|
|
671
|
+
UserAndAccessSteps.openEditUserPage(maintainerUser);
|
|
672
672
|
cy.wait('@get-user');
|
|
673
673
|
setUserAuths({repo: readRepositoryId, read: true});
|
|
674
674
|
// 3. Write permission for one repository.
|
|
@@ -677,28 +677,28 @@ describe('User and Access', () => {
|
|
|
677
677
|
setUserAuths({repo: graphQLOnlyRepositoryId, write: true, graphql: true});
|
|
678
678
|
UserAndAccessSteps.confirmUserEdit();
|
|
679
679
|
|
|
680
|
-
// When I log in as a user with repository
|
|
680
|
+
// When I log in as a user with repository maintain permission.
|
|
681
681
|
UserAndAccessSteps.toggleSecurity();
|
|
682
|
-
LoginSteps.loginWithUser(
|
|
682
|
+
LoginSteps.loginWithUser(maintainerUser, PASSWORD);
|
|
683
683
|
// And navigate to the repository list view.
|
|
684
684
|
RepositorySteps.visit(false);
|
|
685
685
|
|
|
686
686
|
// Then I should see all repositories for which the user has at least read permission.
|
|
687
687
|
RepositorySteps.getRepositories().should('have.length', 4);
|
|
688
688
|
|
|
689
|
-
// And I should see the actions allowed for the repository the user can
|
|
690
|
-
RepositorySteps.getCopyRepositoryButton(
|
|
691
|
-
RepositorySteps.getEditRepositoryButton(
|
|
692
|
-
RepositorySteps.getDownloadRepositoryConfigurationButton(
|
|
693
|
-
RepositorySteps.getRestartRepositoryButton(
|
|
689
|
+
// And I should see the actions allowed for the repository the user can maintain.
|
|
690
|
+
RepositorySteps.getCopyRepositoryButton(maintainedRepositoryId).should('be.visible');
|
|
691
|
+
RepositorySteps.getEditRepositoryButton(maintainedRepositoryId).should('be.visible');
|
|
692
|
+
RepositorySteps.getDownloadRepositoryConfigurationButton(maintainedRepositoryId).should('be.visible');
|
|
693
|
+
RepositorySteps.getRestartRepositoryButton(maintainedRepositoryId).should('be.visible');
|
|
694
694
|
|
|
695
|
-
// And the delete button should not be available because users with
|
|
695
|
+
// And the delete button should not be available because users with maintain permission
|
|
696
696
|
// are not allowed to delete repositories.
|
|
697
|
-
RepositorySteps.getDeleteRepositoryButton(
|
|
697
|
+
RepositorySteps.getDeleteRepositoryButton(maintainedRepositoryId).should('not.exist');
|
|
698
698
|
|
|
699
699
|
// And the "Set as default repository" button should not be available because users
|
|
700
|
-
// with
|
|
701
|
-
RepositorySteps.getSetDefaultRepositoryButton(
|
|
700
|
+
// with maintain permission are not allowed to set the default repository.
|
|
701
|
+
RepositorySteps.getSetDefaultRepositoryButton(maintainedRepositoryId).should('not.exist');
|
|
702
702
|
|
|
703
703
|
// And should see the copy action for all repositories.
|
|
704
704
|
RepositorySteps.getCopyRepositoryButton(writeRepositoryId).should('be.visible');
|
|
@@ -725,7 +725,7 @@ describe('User and Access', () => {
|
|
|
725
725
|
RepositorySteps.getSetDefaultRepositoryButton(graphQLOnlyRepositoryId).should('not.exist');
|
|
726
726
|
|
|
727
727
|
// And the "Create", "Create from file", and "Attach remote repository" page buttons
|
|
728
|
-
// should not be available to a user with
|
|
728
|
+
// should not be available to a user with maintain permission.
|
|
729
729
|
RepositorySteps.getPageButtons().should('not.exist');
|
|
730
730
|
|
|
731
731
|
// When I select a repository for which I have GraphQL-only permission.
|
|
@@ -736,19 +736,19 @@ describe('User and Access', () => {
|
|
|
736
736
|
});
|
|
737
737
|
|
|
738
738
|
it('should not allow a user with maintain permission to rename a repository', () => {
|
|
739
|
-
// Given there is a user with
|
|
740
|
-
createUser(
|
|
739
|
+
// Given there is a user with maintain permission for a repository.
|
|
740
|
+
createUser(maintainerUser, PASSWORD, ROLE_USER, {maintain: true, repoName: maintainedRepositoryId});
|
|
741
741
|
UserAndAccessSteps.toggleSecurity();
|
|
742
|
-
LoginSteps.loginWithUser(
|
|
742
|
+
LoginSteps.loginWithUser(maintainerUser, PASSWORD);
|
|
743
743
|
RepositorySteps.visit(false);
|
|
744
744
|
|
|
745
|
-
// When the user opens the edit page of the repository they can
|
|
746
|
-
RepositorySteps.getEditRepositoryButton(
|
|
747
|
-
RepositorySteps.editRepository(
|
|
745
|
+
// When the user opens the edit page of the repository they can maintain.
|
|
746
|
+
RepositorySteps.getEditRepositoryButton(maintainedRepositoryId).should('be.visible');
|
|
747
|
+
RepositorySteps.editRepository(maintainedRepositoryId);
|
|
748
748
|
|
|
749
749
|
// Then the repository id should be rendered as read only.
|
|
750
750
|
RepositorySteps.getGDBIdInput()
|
|
751
|
-
.should('have.value',
|
|
751
|
+
.should('have.value', maintainedRepositoryId)
|
|
752
752
|
.and('be.disabled');
|
|
753
753
|
|
|
754
754
|
// And the action which unlocks the repository id field should not be available, because renaming
|
|
@@ -761,8 +761,8 @@ describe('User and Access', () => {
|
|
|
761
761
|
ModalDialogSteps.clickOKButton();
|
|
762
762
|
|
|
763
763
|
// And the repository should keep its original id after the configuration is saved.
|
|
764
|
-
RepositorySteps.getRepositoryFromList(
|
|
765
|
-
RepositorySteps.getEditRepositoryButton(
|
|
764
|
+
RepositorySteps.getRepositoryFromList(maintainedRepositoryId).should('be.visible');
|
|
765
|
+
RepositorySteps.getEditRepositoryButton(maintainedRepositoryId).should('be.visible');
|
|
766
766
|
});
|
|
767
767
|
});
|
|
768
768
|
|
|
@@ -800,8 +800,8 @@ describe('User and Access', () => {
|
|
|
800
800
|
}
|
|
801
801
|
|
|
802
802
|
function setRoles(opts = {}) {
|
|
803
|
-
const {read = false, readWrite = false, graphql = false,
|
|
804
|
-
setUserAuths({repo: repoName, read, write: readWrite, graphql,
|
|
803
|
+
const {read = false, readWrite = false, graphql = false, maintain = false, repoName = '*'} = opts;
|
|
804
|
+
setUserAuths({repo: repoName, read, write: readWrite, graphql, maintain});
|
|
805
805
|
}
|
|
806
806
|
|
|
807
807
|
function testForUser(name, isAdmin) {
|
|
@@ -820,10 +820,10 @@ describe('User and Access', () => {
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
-
function assertUserAuthsInCatalog(username, {repo, read = false, write = false,
|
|
823
|
+
function assertUserAuthsInCatalog(username, {repo, read = false, write = false, maintain = false, graphql = false} = {}) {
|
|
824
824
|
UserAndAccessSteps.findUserRowAlias(username, 'userRow');
|
|
825
825
|
|
|
826
|
-
if (!read && !write && !
|
|
826
|
+
if (!read && !write && !maintain) {
|
|
827
827
|
return UserAndAccessSteps.getRepoLine('@userRow', repo).should('not.exist');
|
|
828
828
|
}
|
|
829
829
|
|
|
@@ -842,10 +842,10 @@ describe('User and Access', () => {
|
|
|
842
842
|
UserAndAccessSteps.findWriteIconAlias('@repoLine').should('not.exist');
|
|
843
843
|
}
|
|
844
844
|
|
|
845
|
-
if (
|
|
846
|
-
UserAndAccessSteps.
|
|
845
|
+
if (maintain) {
|
|
846
|
+
UserAndAccessSteps.findMaintainIconAlias('@repoLine').should('be.visible');
|
|
847
847
|
} else {
|
|
848
|
-
UserAndAccessSteps.
|
|
848
|
+
UserAndAccessSteps.findMaintainIconAlias('@repoLine').should('not.exist');
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
if (graphql) {
|
|
@@ -855,7 +855,7 @@ describe('User and Access', () => {
|
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
|
|
858
|
-
function setUserAuths({repo, read = false, write = false, graphql = false,
|
|
858
|
+
function setUserAuths({repo, read = false, write = false, graphql = false, maintain = false} = {}) {
|
|
859
859
|
if (read === true) {
|
|
860
860
|
UserAndAccessSteps.toggleReadAccessForRepo(repo);
|
|
861
861
|
UserAndAccessSteps.validateReadAccessForRepo(repo, {checked: read});
|
|
@@ -871,24 +871,24 @@ describe('User and Access', () => {
|
|
|
871
871
|
UserAndAccessSteps.validateGraphqlAccessForRepo(repo, {checked: graphql});
|
|
872
872
|
}
|
|
873
873
|
|
|
874
|
-
if (
|
|
875
|
-
UserAndAccessSteps.
|
|
876
|
-
UserAndAccessSteps.
|
|
874
|
+
if (maintain === true) {
|
|
875
|
+
UserAndAccessSteps.toggleMaintainRepoForRepo(repo);
|
|
876
|
+
UserAndAccessSteps.validateMaintainAccessForRepo(repo, {checked: maintain});
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
879
|
|
|
880
|
-
function verifyCheckedUserAuth(repo, {read = false, write = false, graphql = false,
|
|
880
|
+
function verifyCheckedUserAuth(repo, {read = false, write = false, graphql = false, maintain = false} = {}) {
|
|
881
881
|
UserAndAccessSteps.validateReadAccessForRepo(repo, {checked: read});
|
|
882
882
|
UserAndAccessSteps.validateWriteAccessForRepo(repo, {checked: write});
|
|
883
883
|
UserAndAccessSteps.validateGraphqlAccessForRepo(repo, {checked: graphql});
|
|
884
|
-
UserAndAccessSteps.
|
|
884
|
+
UserAndAccessSteps.validateMaintainAccessForRepo(repo, {checked: maintain});
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
function verifyDisabledUserAuth(repo, {read = false, write = false, graphql = false,
|
|
887
|
+
function verifyDisabledUserAuth(repo, {read = false, write = false, graphql = false, maintain = false} = {}) {
|
|
888
888
|
UserAndAccessSteps.validateReadAccessForRepo(repo, {disabled: read});
|
|
889
889
|
UserAndAccessSteps.validateWriteAccessForRepo(repo, {disabled: write});
|
|
890
890
|
UserAndAccessSteps.validateGraphqlAccessForRepo(repo, {disabled: graphql});
|
|
891
|
-
UserAndAccessSteps.
|
|
891
|
+
UserAndAccessSteps.validateMaintainAccessForRepo(repo, {disabled: maintain});
|
|
892
892
|
}
|
|
893
893
|
|
|
894
894
|
function navigateMenuPath(pathArray, expectedUrl, expectedTitle) {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# edited ODBA file
|
|
2
|
+
[PrefixDeclaration]
|
|
3
|
+
: http://example.org/voc#
|
|
4
|
+
ex: http://example.org/
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
7
|
+
xml: http://www.w3.org/XML/1998/namespace
|
|
8
|
+
xsd: http://www.w3.org/2001/XMLSchema#
|
|
9
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
10
|
+
obda: https://w3id.org/obda/vocabulary#
|
|
11
|
+
rdfs: http://www.w3.org/2000/01/rdf-schema#
|
|
12
|
+
|
|
13
|
+
[MappingDeclaration] @collection [[
|
|
14
|
+
mappingId uni1-student
|
|
15
|
+
target :uni1/student/{s_id} a :Student ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string .
|
|
16
|
+
source SELECT * FROM "uni1"."student"
|
|
17
|
+
|
|
18
|
+
mappingId uni1-academic
|
|
19
|
+
target :uni1/academic/{a_id} a :FacultyMember ; foaf:firstName {first_name}^^xsd:string ; foaf:lastName {last_name}^^xsd:string .
|
|
20
|
+
source SELECT * FROM "uni1"."academic"
|
|
21
|
+
|
|
22
|
+
mappingId uni1-fullProfessor
|
|
23
|
+
target :uni1/academic/{a_id} a :FullProfessor .
|
|
24
|
+
source SELECT * FROM "uni1"."academic"
|
|
25
|
+
WHERE "position" = 1
|
|
26
|
+
|
|
27
|
+
mappingId uni1-AssociateProfessor
|
|
28
|
+
target :uni1/academic/{a_id} a :AssociateProfessor .
|
|
29
|
+
source SELECT * FROM "uni1"."academic"
|
|
30
|
+
WHERE "position" = 2
|
|
31
|
+
|
|
32
|
+
mappingId uni1-PostDoc
|
|
33
|
+
target :uni1/academic/{a_id} a :PostDoc .
|
|
34
|
+
source SELECT * FROM "uni1"."academic"
|
|
35
|
+
WHERE "position" = 9
|
|
36
|
+
|
|
37
|
+
mappingId uni1-externalTeacher
|
|
38
|
+
target :uni1/academic/{a_id} a :ExternalTeacher .
|
|
39
|
+
source SELECT * FROM "uni1"."academic"
|
|
40
|
+
WHERE "position" = 8
|
|
41
|
+
|
|
42
|
+
mappingId uni1-teaching
|
|
43
|
+
target :uni1/academic/{a_id} :teaches :uni1/course/{c_id} .
|
|
44
|
+
source SELECT * FROM "uni1"."teaching"
|
|
45
|
+
|
|
46
|
+
mappingId uni1-course
|
|
47
|
+
target :uni1/course/{c_id} a :Course ; :title {title} ; :isGivenAt :uni1/university .
|
|
48
|
+
source SELECT * FROM "uni1"."course"
|
|
49
|
+
|
|
50
|
+
mappingId uni1-registration
|
|
51
|
+
target :uni1/student/{s_id} :attends :uni1/course/{c_id} .
|
|
52
|
+
source SELECT *
|
|
53
|
+
FROM "uni1"."course-registration"
|
|
54
|
+
|
|
55
|
+
mappingId uni2-person
|
|
56
|
+
target :uni2/person/{pid} a foaf:Person ; foaf:firstName {fname}^^xsd:string ; foaf:lastName {lname}^^xsd:string .
|
|
57
|
+
source SELECT * FROM "uni2"."person"
|
|
58
|
+
|
|
59
|
+
mappingId uni2-undergraduate
|
|
60
|
+
target :uni2/person/{pid} a :UndergraduateStudent .
|
|
61
|
+
source SELECT * FROM "uni2"."person"
|
|
62
|
+
WHERE "status" = 1
|
|
63
|
+
|
|
64
|
+
mappingId uni2-graduate
|
|
65
|
+
target :uni2/person/{pid} a :GraduateStudent .
|
|
66
|
+
source SELECT * FROM "uni2"."person"
|
|
67
|
+
WHERE "status" = 2
|
|
68
|
+
|
|
69
|
+
mappingId uni2-fullProfessor
|
|
70
|
+
target :uni2/person/{pid} a :FullProfessor .
|
|
71
|
+
source SELECT * FROM "uni2"."person"
|
|
72
|
+
WHERE "status" = 7
|
|
73
|
+
|
|
74
|
+
mappingId uni2-associate-prof
|
|
75
|
+
target :uni2/person/{pid} a :AssociateProfessor .
|
|
76
|
+
source SELECT * FROM "uni2"."person"
|
|
77
|
+
WHERE "status" = 8
|
|
78
|
+
|
|
79
|
+
mappingId uni2-course
|
|
80
|
+
target :uni2/course/{cid} a :Course ; :title {topic}^^xsd:string ; :isGivenAt :uni2/university .
|
|
81
|
+
source SELECT * FROM "uni2"."course"
|
|
82
|
+
|
|
83
|
+
mappingId uni2-lecturer
|
|
84
|
+
target :uni2/person/{lecturer} :givesLecture :uni2/course/{cid} .
|
|
85
|
+
source SELECT * FROM "uni2"."course"
|
|
86
|
+
|
|
87
|
+
mappingId uni2-assistantProfessor
|
|
88
|
+
target :uni2/person/{pid} a :AssistantProfessor .
|
|
89
|
+
source SELECT * FROM "uni2"."person"
|
|
90
|
+
WHERE "status" = 9
|
|
91
|
+
|
|
92
|
+
mappingId uni2-postDoc
|
|
93
|
+
target :uni2/person/{pid} a :PostDoc .
|
|
94
|
+
source SELECT * FROM "uni2"."person"
|
|
95
|
+
WHERE "status" = 3
|
|
96
|
+
|
|
97
|
+
mappingId uni2-lab-teacher
|
|
98
|
+
target :uni2/person/{lab_teacher} :givesLab :uni2/course/{cid} .
|
|
99
|
+
source SELECT * FROM "uni2"."course"
|
|
100
|
+
|
|
101
|
+
mappingId uni2-registration
|
|
102
|
+
target :uni2/person/{pid} :attends :uni2/course/{cid} .
|
|
103
|
+
source SELECT *
|
|
104
|
+
FROM "uni2"."registration"
|
|
105
|
+
]]
|
|
106
|
+
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-TR11",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.5.0-
|
|
9
|
+
"version": "3.5.0-TR11",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
@@ -3343,9 +3343,9 @@
|
|
|
3343
3343
|
"license": "MIT"
|
|
3344
3344
|
},
|
|
3345
3345
|
"node_modules/brace-expansion": {
|
|
3346
|
-
"version": "1.1.
|
|
3347
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.
|
|
3348
|
-
"integrity": "sha512-
|
|
3346
|
+
"version": "1.1.18",
|
|
3347
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
|
|
3348
|
+
"integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
|
|
3349
3349
|
"dev": true,
|
|
3350
3350
|
"license": "MIT",
|
|
3351
3351
|
"dependencies": {
|
|
@@ -7728,9 +7728,9 @@
|
|
|
7728
7728
|
}
|
|
7729
7729
|
},
|
|
7730
7730
|
"node_modules/mocha/node_modules/brace-expansion": {
|
|
7731
|
-
"version": "5.0.
|
|
7732
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
7733
|
-
"integrity": "sha512-
|
|
7731
|
+
"version": "5.0.9",
|
|
7732
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
|
|
7733
|
+
"integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
|
|
7734
7734
|
"dev": true,
|
|
7735
7735
|
"license": "MIT",
|
|
7736
7736
|
"peer": true,
|
|
@@ -7738,7 +7738,7 @@
|
|
|
7738
7738
|
"balanced-match": "^4.0.2"
|
|
7739
7739
|
},
|
|
7740
7740
|
"engines": {
|
|
7741
|
-
"node": "
|
|
7741
|
+
"node": "20 || >=22"
|
|
7742
7742
|
}
|
|
7743
7743
|
},
|
|
7744
7744
|
"node_modules/mocha/node_modules/glob": {
|
|
@@ -9086,16 +9086,16 @@
|
|
|
9086
9086
|
}
|
|
9087
9087
|
},
|
|
9088
9088
|
"node_modules/rimraf/node_modules/brace-expansion": {
|
|
9089
|
-
"version": "5.0.
|
|
9090
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
9091
|
-
"integrity": "sha512-
|
|
9089
|
+
"version": "5.0.9",
|
|
9090
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
|
|
9091
|
+
"integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
|
|
9092
9092
|
"dev": true,
|
|
9093
9093
|
"license": "MIT",
|
|
9094
9094
|
"dependencies": {
|
|
9095
9095
|
"balanced-match": "^4.0.2"
|
|
9096
9096
|
},
|
|
9097
9097
|
"engines": {
|
|
9098
|
-
"node": "
|
|
9098
|
+
"node": "20 || >=22"
|
|
9099
9099
|
}
|
|
9100
9100
|
},
|
|
9101
9101
|
"node_modules/rimraf/node_modules/glob": {
|
package/package.json
CHANGED
|
@@ -9,10 +9,22 @@ export class OntopRepositorySteps {
|
|
|
9
9
|
return cy.get('div').contains("OBDA or R2RML file *").parent();
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
static getPage() {
|
|
13
|
+
return cy.get('#wb-repository');
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
static getOBDAUploadButton() {
|
|
13
17
|
return cy.get('span[for="obdaFile"]').contains("Upload file...");
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
static getOBDAFileFieldEditButton() {
|
|
21
|
+
return OntopRepositorySteps.getOBDAFileField().find('.ot-edit-input');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static editOBDAFile() {
|
|
25
|
+
OntopRepositorySteps.getOBDAFileFieldEditButton().click();
|
|
26
|
+
}
|
|
27
|
+
|
|
16
28
|
static getOntologyFileField() {
|
|
17
29
|
return cy.get('div').contains("Ontology file");
|
|
18
30
|
}
|
|
@@ -119,9 +131,17 @@ export class OntopRepositorySteps {
|
|
|
119
131
|
OntopRepositorySteps.getOBDAUploadButton().click();
|
|
120
132
|
}
|
|
121
133
|
|
|
134
|
+
static getAdditionalJDBCProperties() {
|
|
135
|
+
return OntopRepositorySteps.getPage().find('.additional-jdbc-properties');
|
|
136
|
+
}
|
|
137
|
+
|
|
122
138
|
static uploadObdaFile(file) {
|
|
123
139
|
// The label for the input has visibility: hidden, so force must be used
|
|
124
140
|
// eq() index 0 for location of OBDA field input
|
|
125
141
|
cy.get('input[type=file]').eq(0).selectFile(file, {force: true});
|
|
126
142
|
}
|
|
143
|
+
|
|
144
|
+
static getOntopSaveButton() {
|
|
145
|
+
return cy.get('#addEditOntopRepository');
|
|
146
|
+
}
|
|
127
147
|
}
|
|
@@ -303,7 +303,7 @@ export class UserAndAccessSteps {
|
|
|
303
303
|
return cy.get(repoLineAlias).find('.ri-edit-line');
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
-
static
|
|
306
|
+
static findMaintainIconAlias(repoLineAlias) {
|
|
307
307
|
return cy.get(repoLineAlias).find('.ri-folder-settings-line');
|
|
308
308
|
}
|
|
309
309
|
|
|
@@ -382,24 +382,24 @@ export class UserAndAccessSteps {
|
|
|
382
382
|
this.validateRightsForRepo(repoName, writeAccessCheckbox, expectedState);
|
|
383
383
|
}
|
|
384
384
|
|
|
385
|
-
// =============
|
|
385
|
+
// ============= Maintain Repository Access Toggles and Validations =============
|
|
386
386
|
|
|
387
|
-
static
|
|
387
|
+
static getMaintainAccessRepoCheckbox(repoName) {
|
|
388
388
|
return this.getRepositoryRightsLine(repoName)
|
|
389
|
-
.find('.
|
|
389
|
+
.find('.maintain-repository');
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
static
|
|
393
|
-
UserAndAccessSteps.
|
|
392
|
+
static clickMaintainAccessRepo(repoName) {
|
|
393
|
+
UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).realClick();
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
static
|
|
397
|
-
return this.
|
|
396
|
+
static toggleMaintainRepoForRepo(repoName) {
|
|
397
|
+
return this.clickMaintainAccessRepo(repoName);
|
|
398
398
|
}
|
|
399
399
|
|
|
400
|
-
static
|
|
401
|
-
const
|
|
402
|
-
this.validateRightsForRepo(repoName,
|
|
400
|
+
static validateMaintainAccessForRepo(repoName, expectedState) {
|
|
401
|
+
const maintainAccessCheckbox = this.getMaintainAccessRepoCheckbox(repoName);
|
|
402
|
+
this.validateRightsForRepo(repoName, maintainAccessCheckbox, expectedState);
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
// ============= GraphQL Access Toggles and Validations =============
|