graphdb-workbench-tests 4.0.0-TR1 → 4.0.0-TR2
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/rename-repository-restrictions.spec.js +125 -0
- package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +5 -11
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +25 -4
- package/e2e-legacy/ttyg/create-agent.spec.js +109 -0
- package/fixtures/repositories/get-repositories-with-unsupported-graphql-types.json +46 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/setup/settings-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +26 -5
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +16 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {RepositorySteps} from "../../steps/repository-steps";
|
|
2
|
+
import {OntopRepositorySteps} from "../../steps/ontop-repository-steps";
|
|
3
|
+
import {ToasterSteps} from "../../steps/toaster-steps";
|
|
4
|
+
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
5
|
+
|
|
6
|
+
describe('Repository rename restrictions', () => {
|
|
7
|
+
|
|
8
|
+
let repositoryId;
|
|
9
|
+
let memberRepositoryId;
|
|
10
|
+
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
repositoryId = 'repo-' + Date.now();
|
|
13
|
+
memberRepositoryId = 'member-' + Date.now();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
cy.deleteRepository(repositoryId);
|
|
18
|
+
cy.deleteRepository(memberRepositoryId);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should allow renaming of a GraphDB repository', () => {
|
|
22
|
+
// Given there is a GraphDB repository.
|
|
23
|
+
cy.createRepository({id: repositoryId});
|
|
24
|
+
|
|
25
|
+
// When I open its edit page.
|
|
26
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
27
|
+
|
|
28
|
+
// Then the repository id should be rendered as read only,
|
|
29
|
+
RepositorySteps.getGDBIdInput()
|
|
30
|
+
.should('have.value', repositoryId)
|
|
31
|
+
.and('be.disabled');
|
|
32
|
+
// and the action which unlocks the repository id field should be available.
|
|
33
|
+
RepositorySteps.getRepositoryIdEditElement().should('be.visible');
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('should not allow renaming of an Ontop repository', () => {
|
|
37
|
+
// Given there is an Ontop repository.
|
|
38
|
+
createOntopRepository(repositoryId);
|
|
39
|
+
|
|
40
|
+
// When I open its edit page.
|
|
41
|
+
RepositorySteps.visit();
|
|
42
|
+
RepositorySteps.editRepository(repositoryId);
|
|
43
|
+
|
|
44
|
+
// Then the repository id should be rendered as read only,
|
|
45
|
+
RepositorySteps.getGDBIdInput()
|
|
46
|
+
.should('have.value', repositoryId)
|
|
47
|
+
.and('be.disabled');
|
|
48
|
+
// and the action which unlocks the repository id field should not be available, because
|
|
49
|
+
// renaming is allowed only for GraphDB repositories.
|
|
50
|
+
RepositorySteps.getRepositoryIdEditElement().should('not.exist');
|
|
51
|
+
|
|
52
|
+
// When the repository id is changed despite the field being disabled,
|
|
53
|
+
forceChangeRepositoryId('renamed-' + repositoryId);
|
|
54
|
+
// and I try to save the configuration.
|
|
55
|
+
RepositorySteps.clickSaveEditedRepo();
|
|
56
|
+
|
|
57
|
+
// Then I expect to see an error message,
|
|
58
|
+
ToasterSteps.verifyError('Can not change the name of ontop repository');
|
|
59
|
+
// and the repository should keep its original id.
|
|
60
|
+
RepositorySteps.visit();
|
|
61
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('be.visible');
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it('should not allow renaming of a FedX repository', () => {
|
|
65
|
+
// Given there is a FedX repository.
|
|
66
|
+
cy.createRepository({id: memberRepositoryId});
|
|
67
|
+
createFedxRepository(repositoryId, memberRepositoryId);
|
|
68
|
+
|
|
69
|
+
// When I open its edit page.
|
|
70
|
+
RepositorySteps.visit();
|
|
71
|
+
RepositorySteps.editRepository(repositoryId);
|
|
72
|
+
|
|
73
|
+
// Then the repository id should be rendered as read only,
|
|
74
|
+
RepositorySteps.getGDBIdInput()
|
|
75
|
+
.should('have.value', repositoryId)
|
|
76
|
+
.and('be.disabled');
|
|
77
|
+
// and the action which unlocks the repository id field should not be available, because
|
|
78
|
+
// renaming is allowed only for GraphDB repositories.
|
|
79
|
+
RepositorySteps.getRepositoryIdEditElement().should('not.exist');
|
|
80
|
+
|
|
81
|
+
// When I save the configuration.
|
|
82
|
+
RepositorySteps.getSaveRepositoryButton().click();
|
|
83
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
84
|
+
|
|
85
|
+
// Then the repository should keep its original id.
|
|
86
|
+
RepositorySteps.visit();
|
|
87
|
+
RepositorySteps.getRepositoryFromList(repositoryId).should('be.visible');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Changes the repository id field although it is disabled in order to verify that the restriction is
|
|
92
|
+
* enforced by the controller too and not only by the view.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} newRepositoryId The new repository id.
|
|
95
|
+
*/
|
|
96
|
+
const forceChangeRepositoryId = (newRepositoryId) => {
|
|
97
|
+
RepositorySteps.getGDBIdInput()
|
|
98
|
+
.clear({force: true})
|
|
99
|
+
.type(newRepositoryId, {force: true})
|
|
100
|
+
.should('have.value', newRepositoryId);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const createOntopRepository = (repositoryId) => {
|
|
104
|
+
OntopRepositorySteps.visitCreate();
|
|
105
|
+
RepositorySteps.typeRepositoryId(repositoryId);
|
|
106
|
+
OntopRepositorySteps.selectOracleDatabase();
|
|
107
|
+
OntopRepositorySteps.typeHostName('localhost');
|
|
108
|
+
OntopRepositorySteps.typePort(5423);
|
|
109
|
+
OntopRepositorySteps.typeDatabaseName('database-name');
|
|
110
|
+
OntopRepositorySteps.clickObdaFileUploadButton();
|
|
111
|
+
OntopRepositorySteps.uploadObdaFile('fixtures/ontop/university-complete.obda');
|
|
112
|
+
// Wait the OBDA edit button to become visible to ensure that the file is uploaded.
|
|
113
|
+
OntopRepositorySteps.getOBDAFileFieldEditButton().should('be.visible');
|
|
114
|
+
OntopRepositorySteps.clickOnCreateRepositoryButton();
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const createFedxRepository = (repositoryId, memberRepositoryId) => {
|
|
118
|
+
RepositorySteps.visit();
|
|
119
|
+
RepositorySteps.createRepository();
|
|
120
|
+
RepositorySteps.createFedexRepositoryType();
|
|
121
|
+
RepositorySteps.typeRepositoryId(repositoryId);
|
|
122
|
+
RepositorySteps.selectFedexMember(memberRepositoryId);
|
|
123
|
+
RepositorySteps.saveRepository();
|
|
124
|
+
};
|
|
125
|
+
});
|
|
@@ -2,7 +2,7 @@ import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
|
2
2
|
import HomeSteps from "../../../steps/home-steps";
|
|
3
3
|
import {SettingsSteps} from "../../../steps/setup/settings-steps";
|
|
4
4
|
|
|
5
|
-
function verifyInitialState(
|
|
5
|
+
function verifyInitialState() {
|
|
6
6
|
// Password change field is for admin.
|
|
7
7
|
// explicitly state that the fields must be of type password
|
|
8
8
|
SettingsSteps.getPasswordField().should('be.visible')
|
|
@@ -43,14 +43,8 @@ function verifyInitialState(repositoryId) {
|
|
|
43
43
|
// Repository rights
|
|
44
44
|
// - Admin has read and write access to all repositories."
|
|
45
45
|
SettingsSteps.getUserRepositoryTable().should('be.visible');
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
.and('be.checked')
|
|
49
|
-
.and('be.disabled');
|
|
50
|
-
SettingsSteps.getWriteRightsCheckbox(repositoryId)
|
|
51
|
-
.should('be.visible')
|
|
52
|
-
.and('be.checked')
|
|
53
|
-
.and('be.disabled');
|
|
46
|
+
// And Admin doesn't see the list of the repositories
|
|
47
|
+
SettingsSteps.getRepositoryRightsRows().should('not.exist');
|
|
54
48
|
}
|
|
55
49
|
|
|
56
50
|
describe('My Settings initial state', () => {
|
|
@@ -69,7 +63,7 @@ describe('My Settings initial state', () => {
|
|
|
69
63
|
// Given, I visit the My Settings page via URL
|
|
70
64
|
SettingsSteps.visit();
|
|
71
65
|
// Then,
|
|
72
|
-
verifyInitialState(
|
|
66
|
+
verifyInitialState();
|
|
73
67
|
});
|
|
74
68
|
|
|
75
69
|
it('Should display the correct initial state when navigating via the navigation bar', () => {
|
|
@@ -77,6 +71,6 @@ describe('My Settings initial state', () => {
|
|
|
77
71
|
HomeSteps.visit();
|
|
78
72
|
MainMenuSteps.clickOnMySettings();
|
|
79
73
|
// Then,
|
|
80
|
-
verifyInitialState(
|
|
74
|
+
verifyInitialState();
|
|
81
75
|
});
|
|
82
76
|
});
|
|
@@ -318,6 +318,8 @@ describe('User and Access', () => {
|
|
|
318
318
|
verifyDisabledUserAuth('*', {read: false, write: false, maintain: true, graphql: true});
|
|
319
319
|
verifyCheckedUserAuth(repoName, {read: false, write: false, maintain: false, graphql: false});
|
|
320
320
|
verifyDisabledUserAuth(repoName, {read: false, write: false, maintain: false, graphql: true});
|
|
321
|
+
// The GraphQL checkbox is disabled for the lack of read/write rights, not because of the role
|
|
322
|
+
UserAndAccessSteps.getGraphqlAnyRoleTooltip().should('not.exist');
|
|
321
323
|
});
|
|
322
324
|
|
|
323
325
|
context('for non user roles', () => {
|
|
@@ -327,8 +329,7 @@ describe('User and Access', () => {
|
|
|
327
329
|
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
328
330
|
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
329
331
|
|
|
330
|
-
|
|
331
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
332
|
+
UserAndAccessSteps.getRepositoryRightsRows().should('not.exist');
|
|
332
333
|
});
|
|
333
334
|
|
|
334
335
|
it('repository manager', () => {
|
|
@@ -338,8 +339,7 @@ describe('User and Access', () => {
|
|
|
338
339
|
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
339
340
|
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
340
341
|
|
|
341
|
-
|
|
342
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
342
|
+
UserAndAccessSteps.getRepositoryRightsRows().should('not.exist');
|
|
343
343
|
});
|
|
344
344
|
});
|
|
345
345
|
|
|
@@ -464,6 +464,27 @@ describe('User and Access', () => {
|
|
|
464
464
|
createUser(graphqlUser, PASSWORD, ROLE_USER, {read: true, graphql: true, repoName: repositoryId2});
|
|
465
465
|
});
|
|
466
466
|
|
|
467
|
+
it('Should not allow GraphQL access for Ontop and FedX repositories', () => {
|
|
468
|
+
// GIVEN Ontop and FedX repositories alongside a GraphDB one
|
|
469
|
+
RepositoriesStubs.stubRepositories(0, '/repositories/get-repositories-with-unsupported-graphql-types.json');
|
|
470
|
+
UserAndAccessSteps.visit();
|
|
471
|
+
UserAndAccessSteps.clickCreateNewUserButton();
|
|
472
|
+
// WHEN the user is granted read access to all of them
|
|
473
|
+
UserAndAccessSteps.toggleReadAccessAny();
|
|
474
|
+
|
|
475
|
+
// THEN GraphQL should be available only for the GraphDB repository
|
|
476
|
+
UserAndAccessSteps.validateGraphqlAccessForRepo('graphdb-repo', {disabled: false});
|
|
477
|
+
UserAndAccessSteps.getGraphqlRepositoryTypeTooltipForRepo('graphdb-repo').should('not.exist');
|
|
478
|
+
|
|
479
|
+
// AND it should be permanently disabled for the Ontop and the FedX ones
|
|
480
|
+
['ontop-repo', 'fedx-repo'].forEach((repository) => {
|
|
481
|
+
UserAndAccessSteps.validateGraphqlAccessForRepo(repository, {checked: false, disabled: true});
|
|
482
|
+
UserAndAccessSteps.hoverGraphQlRightsCheckbox(repository)
|
|
483
|
+
UserAndAccessSteps.getAngularTooltip().should('have.text', 'Not available for this repository type');
|
|
484
|
+
UserAndAccessSteps.blurGraphQlRightsCheckbox(repository)
|
|
485
|
+
});
|
|
486
|
+
});
|
|
487
|
+
|
|
467
488
|
// Fails for unknown reason only in CI
|
|
468
489
|
it('Can create user with different auth combinations', () => {
|
|
469
490
|
cy.wait('@getRepositories');
|
|
@@ -172,6 +172,60 @@ describe('TTYG create new agent', () => {
|
|
|
172
172
|
TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
|
|
173
173
|
});
|
|
174
174
|
|
|
175
|
+
it('should create an agent without temperature or topP parameters', () => {
|
|
176
|
+
// GIVEN: I have opened the Create Agent dialog and filled in the minimum required fields.
|
|
177
|
+
openCreateAgentDialog(repositoryId)
|
|
178
|
+
TtygAgentSettingsModalSteps.getDialog().should('be.visible');
|
|
179
|
+
|
|
180
|
+
fillAgentName('Test Agent');
|
|
181
|
+
TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
|
|
182
|
+
TtygAgentSettingsModalSteps.selectSparqlMethodSparqlQuery();
|
|
183
|
+
|
|
184
|
+
// WHEN: I disable the temperature setting.
|
|
185
|
+
TtygAgentSettingsModalSteps.toggleTemperature();
|
|
186
|
+
|
|
187
|
+
// AND: I disable the topP setting.
|
|
188
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
189
|
+
|
|
190
|
+
// AND: I save the agent.
|
|
191
|
+
TTYGStubs.stubAgentCreate(1000);
|
|
192
|
+
TTYGStubs.stubAgentListGet(
|
|
193
|
+
'/ttyg/agent/get-agent-list-new-agent.json',
|
|
194
|
+
1000,
|
|
195
|
+
);
|
|
196
|
+
|
|
197
|
+
TtygAgentSettingsModalSteps.saveAgent();
|
|
198
|
+
TtygAgentSettingsModalSteps.getCreatingAgentLoader().should('be.visible');
|
|
199
|
+
|
|
200
|
+
// THEN: I expect the create-agent request not to contain the temperature and topP parameters.
|
|
201
|
+
cy.wait('@create-agent').then((interception) => {
|
|
202
|
+
// eslint-disable-next-line no-undef
|
|
203
|
+
assert.deepEqual(interception.request.body, {
|
|
204
|
+
id: 'id',
|
|
205
|
+
name: 'Test Agent',
|
|
206
|
+
repositoryId: 'starwars',
|
|
207
|
+
model: 'gpt-4o',
|
|
208
|
+
contextSize: 128000,
|
|
209
|
+
seed: 0,
|
|
210
|
+
assistantsInstructions: {
|
|
211
|
+
systemInstruction: '',
|
|
212
|
+
userInstruction: 'If you need to write a SPARQL query, use only the classes and properties provided in the schema and don\'t invent or guess any. Always try to return human-readable names or labels and not only the IRIs. If SPARQL fails to provide the necessary information you can try another tool too.',
|
|
213
|
+
},
|
|
214
|
+
assistantExtractionMethods: [
|
|
215
|
+
{
|
|
216
|
+
method: 'sparql_search',
|
|
217
|
+
sparqlQuery: 'CONSTRUCT {?s ?p ?o} WHERE {GRAPH <http://example.org/ontology> {?s ?p ?o .}}',
|
|
218
|
+
addMissingNamespaces: false,
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
additionalExtractionMethods: [],
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// AND: I expect the modal to be closed.
|
|
226
|
+
TtygAgentSettingsModalSteps.getDialog().should('not.exist');
|
|
227
|
+
});
|
|
228
|
+
|
|
175
229
|
it('Should require FTS to be enabled for selected repository when creating agent with FTS extraction method', () => {
|
|
176
230
|
RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-disabled-fts.json');
|
|
177
231
|
TTYGStubs.stubChatsListGetNoResults();
|
|
@@ -461,6 +515,51 @@ describe('TTYG create new agent', () => {
|
|
|
461
515
|
TtygAgentSettingsModalSteps.getTemperatureField().should('not.have.class', 'has-warning');
|
|
462
516
|
});
|
|
463
517
|
|
|
518
|
+
it('should toggle the temperature setting', () => {
|
|
519
|
+
// GIVEN: I have opened the Create Agent dialog.
|
|
520
|
+
openCreateAgentDialog(repositoryId);
|
|
521
|
+
|
|
522
|
+
// WHEN: I set a high temperature value.
|
|
523
|
+
TtygAgentSettingsModalSteps.setTemperature('1.2');
|
|
524
|
+
// THEN: I expect a warning message to be displayed.
|
|
525
|
+
TtygAgentSettingsModalSteps.getTemperatureField().should('have.class', 'has-warning');
|
|
526
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '1.2');
|
|
527
|
+
|
|
528
|
+
// WHEN: I disable the temperature setting.
|
|
529
|
+
TtygAgentSettingsModalSteps.toggleTemperature();
|
|
530
|
+
// THEN: I expect the high-temperature warning to be hidden.
|
|
531
|
+
TtygAgentSettingsModalSteps.getTemperatureWarning().should('not.exist');
|
|
532
|
+
TtygAgentSettingsModalSteps.getTemperatureField().should('not.have.class', 'has-warning');
|
|
533
|
+
// AND: I expect the temperature controls to be disabled.
|
|
534
|
+
TtygAgentSettingsModalSteps.getTemperatureField().should('be.disabled');
|
|
535
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('be.disabled');
|
|
536
|
+
|
|
537
|
+
// WHEN: I enable the temperature setting.
|
|
538
|
+
TtygAgentSettingsModalSteps.toggleTemperature();
|
|
539
|
+
// THEN: I expect the default temperature value to be restored.
|
|
540
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '0.7');
|
|
541
|
+
});
|
|
542
|
+
|
|
543
|
+
it('should toggle the topP setting', () => {
|
|
544
|
+
// GIVEN: I have opened the Create Agent dialog.
|
|
545
|
+
openCreateAgentDialog(repositoryId);
|
|
546
|
+
|
|
547
|
+
// WHEN: I set a custom topP value.
|
|
548
|
+
TtygAgentSettingsModalSteps.setTopP('0.3');
|
|
549
|
+
// THEN: I expect the topP value to be updated.
|
|
550
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '0.3');
|
|
551
|
+
|
|
552
|
+
// WHEN: I disable the topP setting.
|
|
553
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
554
|
+
// THEN: I expect the topP control to be disabled.
|
|
555
|
+
TtygAgentSettingsModalSteps.getTopPField().should('be.disabled');
|
|
556
|
+
|
|
557
|
+
// WHEN: I enable the topP setting.
|
|
558
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
559
|
+
// THEN: I expect the default topP value to be restored.
|
|
560
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '1');
|
|
561
|
+
});
|
|
562
|
+
|
|
464
563
|
it('Should warn the user when he changes the default value of the base instruction', () => {
|
|
465
564
|
RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-enabled-fts.json');
|
|
466
565
|
TTYGStubs.stubChatsListGetNoResults();
|
|
@@ -541,3 +640,13 @@ function fillAgentName(name) {
|
|
|
541
640
|
TtygAgentSettingsModalSteps.getAgentNameError().should('be.visible').and('contain', 'This field is required');
|
|
542
641
|
TtygAgentSettingsModalSteps.typeAgentName(name);
|
|
543
642
|
}
|
|
643
|
+
|
|
644
|
+
const openCreateAgentDialog = (repositoryId) => {
|
|
645
|
+
TTYGStubs.stubChatsListGetNoResults();
|
|
646
|
+
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
647
|
+
ConnectorStubs.stubGetConnectors();
|
|
648
|
+
TTYGStubs.getSimilarityIndexesForRepo(repositoryId );
|
|
649
|
+
TTYGViewSteps.visit();
|
|
650
|
+
cy.wait('@get-all-repositories');
|
|
651
|
+
TTYGViewSteps.createFirstAgent();
|
|
652
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"": [
|
|
3
|
+
{
|
|
4
|
+
"id": "graphdb-repo",
|
|
5
|
+
"title": "",
|
|
6
|
+
"uri": "http://localhost:8080/graphdb/repositories/graphdb-repo",
|
|
7
|
+
"externalUrl": "http://localhost:8080/graphdb/repositories/graphdb-repo",
|
|
8
|
+
"local": true,
|
|
9
|
+
"type": "graphdb",
|
|
10
|
+
"sesameType": "graphdb:SailRepository",
|
|
11
|
+
"location": "",
|
|
12
|
+
"readable": true,
|
|
13
|
+
"writable": true,
|
|
14
|
+
"unsupported": false,
|
|
15
|
+
"state": "RUNNING"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "ontop-repo",
|
|
19
|
+
"title": "",
|
|
20
|
+
"uri": "http://localhost:8080/graphdb/repositories/ontop-repo",
|
|
21
|
+
"externalUrl": "http://localhost:8080/graphdb/repositories/ontop-repo",
|
|
22
|
+
"local": true,
|
|
23
|
+
"type": "ontop",
|
|
24
|
+
"sesameType": "graphdb:OntopRepository",
|
|
25
|
+
"location": "",
|
|
26
|
+
"readable": true,
|
|
27
|
+
"writable": true,
|
|
28
|
+
"unsupported": false,
|
|
29
|
+
"state": "RUNNING"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "fedx-repo",
|
|
33
|
+
"title": "",
|
|
34
|
+
"uri": "http://localhost:8080/graphdb/repositories/fedx-repo",
|
|
35
|
+
"externalUrl": "http://localhost:8080/graphdb/repositories/fedx-repo",
|
|
36
|
+
"local": true,
|
|
37
|
+
"type": "fedx",
|
|
38
|
+
"sesameType": "graphdb:FedXRepository",
|
|
39
|
+
"location": "",
|
|
40
|
+
"readable": true,
|
|
41
|
+
"writable": true,
|
|
42
|
+
"unsupported": false,
|
|
43
|
+
"state": "RUNNING"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
}
|
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-TR2",
|
|
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-TR2",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
package/package.json
CHANGED
|
@@ -94,6 +94,10 @@ export class SettingsSteps {
|
|
|
94
94
|
return this.getSettingsPage().find('.user-repositories .table');
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
static getRepositoryRightsRows() {
|
|
98
|
+
return this.getUserRepositoryTable().getByTestId('repository-rights-rows');
|
|
99
|
+
}
|
|
100
|
+
|
|
97
101
|
static getUserRepository(name) {
|
|
98
102
|
return this.getUserRepositoryTable().find(`.repository-name:contains('${name}')`).closest('tr');
|
|
99
103
|
}
|
|
@@ -405,11 +405,8 @@ export class UserAndAccessSteps {
|
|
|
405
405
|
// ============= GraphQL Access Toggles and Validations =============
|
|
406
406
|
|
|
407
407
|
static getGraphqlAccessForRepo(repoName) {
|
|
408
|
-
const
|
|
409
|
-
return
|
|
410
|
-
.contains(matchText)
|
|
411
|
-
.parent('tr')
|
|
412
|
-
.find('.graphql')
|
|
408
|
+
const testId = (repoName === '*') ? 'graphql-any-checkbox' : 'graphql-repository-checkbox';
|
|
409
|
+
return this.getRepositoryRightsLine(repoName).getByTestId(testId);
|
|
413
410
|
}
|
|
414
411
|
|
|
415
412
|
static toggleGraphqlAccessForRepo(repoName) {
|
|
@@ -421,6 +418,30 @@ export class UserAndAccessSteps {
|
|
|
421
418
|
this.validateRightsForRepo(repoName, graphqlAccessCheckbox, expectedState);
|
|
422
419
|
}
|
|
423
420
|
|
|
421
|
+
static getRepositoryRightsRows() {
|
|
422
|
+
return cy.getByTestId('repository-rights-rows');
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
static getGraphqlAnyRoleTooltip() {
|
|
426
|
+
return cy.getByTestId('graphql-any-role-tooltip');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
static getGraphqlRepositoryTypeTooltipForRepo(repoName) {
|
|
430
|
+
return this.getRepositoryRightsLine(repoName).getByTestId('graphql-repository-type-tooltip');
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
static hoverGraphQlRightsCheckbox(repoName) {
|
|
434
|
+
this.getGraphqlRepositoryTypeTooltipForRepo(repoName).trigger('mouseover');
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
static blurGraphQlRightsCheckbox(repoName) {
|
|
438
|
+
this.getGraphqlRepositoryTypeTooltipForRepo(repoName).trigger('mouseout');
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
static getAngularTooltip() {
|
|
442
|
+
return cy.get('.angular-tooltip');
|
|
443
|
+
}
|
|
444
|
+
|
|
424
445
|
static clickMenuItem(label) {
|
|
425
446
|
return cy.get('.main-menu').contains(label).click({force: true});
|
|
426
447
|
}
|
|
@@ -451,6 +451,14 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
|
|
|
451
451
|
return this.getDialog().find('.temperature');
|
|
452
452
|
}
|
|
453
453
|
|
|
454
|
+
static getTemperatureToggle() {
|
|
455
|
+
return TtygAgentSettingsModalSteps.getTemperatureFormGroup().find('.temperature-toggle label');
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
static toggleTemperature() {
|
|
459
|
+
TtygAgentSettingsModalSteps.getTemperatureToggle().click();
|
|
460
|
+
}
|
|
461
|
+
|
|
454
462
|
static getTemperatureField() {
|
|
455
463
|
return this.getTemperatureFormGroup().find('#temperature');
|
|
456
464
|
}
|
|
@@ -477,6 +485,14 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
|
|
|
477
485
|
return this.getDialog().find('.top-p');
|
|
478
486
|
}
|
|
479
487
|
|
|
488
|
+
static getTopPToggle() {
|
|
489
|
+
return TtygAgentSettingsModalSteps.getTopPFormGroup().find('.top-p-toggle label');
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
static toggleTop() {
|
|
493
|
+
TtygAgentSettingsModalSteps.getTopPToggle().click();
|
|
494
|
+
}
|
|
495
|
+
|
|
480
496
|
static getTopPField() {
|
|
481
497
|
return this.getTopPFormGroup().find('#topP');
|
|
482
498
|
}
|