graphdb-workbench-tests 4.0.0-reactodia-blank-nodes-TR2 → 4.0.0-revert-explain-query-tests
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-flaky/import/import-server-files-operations.spec.js +9 -9
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +20 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +5 -5
- package/e2e-legacy/import/import-server-files.spec.js +23 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +21 -21
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +8 -8
- package/e2e-legacy/import/import-user-data-url.spec.js +3 -3
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +125 -0
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/resource/resource.spec.js +4 -17
- 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 +43 -23
- package/e2e-legacy/ttyg/create-agent.spec.js +111 -0
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -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/cluster/cluster-configuration-steps.js +4 -0
- package/steps/import/import-steps.js +26 -6
- package/steps/main-menu-steps.js +5 -23
- package/steps/resource/resource-steps.js +0 -8
- package/steps/setup/settings-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +44 -19
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +16 -0
- package/stubs/cluster/cluster-stubs.js +8 -1
- package/e2e-legacy/reactodia/reactodia.spec.js +0 -122
- package/steps/reactodia-steps.js +0 -42
|
@@ -128,7 +128,6 @@ describe('User and Access', () => {
|
|
|
128
128
|
UserAndAccessSteps.getCustomRoleFieldError().should('not.be.visible');
|
|
129
129
|
|
|
130
130
|
// When I create the user with a valid custom role
|
|
131
|
-
UserAndAccessSteps.toggleWriteAccessAny();
|
|
132
131
|
SecurityStubs.spyOnUserCreate();
|
|
133
132
|
UserAndAccessSteps.confirmUserCreate();
|
|
134
133
|
// Then the user should be created with that custom role
|
|
@@ -318,6 +317,8 @@ describe('User and Access', () => {
|
|
|
318
317
|
verifyDisabledUserAuth('*', {read: false, write: false, maintain: true, graphql: true});
|
|
319
318
|
verifyCheckedUserAuth(repoName, {read: false, write: false, maintain: false, graphql: false});
|
|
320
319
|
verifyDisabledUserAuth(repoName, {read: false, write: false, maintain: false, graphql: true});
|
|
320
|
+
// The GraphQL checkbox is disabled for the lack of read/write rights, not because of the role
|
|
321
|
+
UserAndAccessSteps.getGraphqlAnyRoleTooltip().should('not.exist');
|
|
321
322
|
});
|
|
322
323
|
|
|
323
324
|
context('for non user roles', () => {
|
|
@@ -327,8 +328,7 @@ describe('User and Access', () => {
|
|
|
327
328
|
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
328
329
|
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
329
330
|
|
|
330
|
-
|
|
331
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
331
|
+
UserAndAccessSteps.getRepositoryRightsRows().should('not.exist');
|
|
332
332
|
});
|
|
333
333
|
|
|
334
334
|
it('repository manager', () => {
|
|
@@ -338,8 +338,7 @@ describe('User and Access', () => {
|
|
|
338
338
|
verifyCheckedUserAuth('*', {read: true, write: true, maintain: true, graphql: false});
|
|
339
339
|
verifyDisabledUserAuth('*', {read: true, write: true, maintain: true, graphql: true});
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
verifyDisabledUserAuth(repoName, {read: true, write: true, maintain: true, graphql: true});
|
|
341
|
+
UserAndAccessSteps.getRepositoryRightsRows().should('not.exist');
|
|
343
342
|
});
|
|
344
343
|
});
|
|
345
344
|
|
|
@@ -464,6 +463,27 @@ describe('User and Access', () => {
|
|
|
464
463
|
createUser(graphqlUser, PASSWORD, ROLE_USER, {read: true, graphql: true, repoName: repositoryId2});
|
|
465
464
|
});
|
|
466
465
|
|
|
466
|
+
it('Should not allow GraphQL access for Ontop and FedX repositories', () => {
|
|
467
|
+
// GIVEN Ontop and FedX repositories alongside a GraphDB one
|
|
468
|
+
RepositoriesStubs.stubRepositories(0, '/repositories/get-repositories-with-unsupported-graphql-types.json');
|
|
469
|
+
UserAndAccessSteps.visit();
|
|
470
|
+
UserAndAccessSteps.clickCreateNewUserButton();
|
|
471
|
+
// WHEN the user is granted read access to all of them
|
|
472
|
+
UserAndAccessSteps.toggleReadAccessAny();
|
|
473
|
+
|
|
474
|
+
// THEN GraphQL should be available only for the GraphDB repository
|
|
475
|
+
UserAndAccessSteps.validateGraphqlAccessForRepo('graphdb-repo', {disabled: false});
|
|
476
|
+
UserAndAccessSteps.getGraphqlRepositoryTypeTooltipForRepo('graphdb-repo').should('not.exist');
|
|
477
|
+
|
|
478
|
+
// AND it should be permanently disabled for the Ontop and the FedX ones
|
|
479
|
+
['ontop-repo', 'fedx-repo'].forEach((repository) => {
|
|
480
|
+
UserAndAccessSteps.validateGraphqlAccessForRepo(repository, {checked: false, disabled: true});
|
|
481
|
+
UserAndAccessSteps.hoverGraphQlRightsCheckbox(repository)
|
|
482
|
+
UserAndAccessSteps.getAngularTooltip().should('have.text', 'Not available for this repository type');
|
|
483
|
+
UserAndAccessSteps.blurGraphQlRightsCheckbox(repository)
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
|
|
467
487
|
// Fails for unknown reason only in CI
|
|
468
488
|
it('Can create user with different auth combinations', () => {
|
|
469
489
|
cy.wait('@getRepositories');
|
|
@@ -956,14 +976,14 @@ describe('User and Access', () => {
|
|
|
956
976
|
};
|
|
957
977
|
|
|
958
978
|
const MENU_ITEMS_WITHOUT_GRAPHQL = [
|
|
959
|
-
//
|
|
979
|
+
// Import
|
|
960
980
|
{
|
|
961
981
|
path: ['Import'],
|
|
962
982
|
expectedUrl: '/import',
|
|
963
983
|
checks: noAuthChecks,
|
|
964
984
|
},
|
|
965
985
|
|
|
966
|
-
//
|
|
986
|
+
// Explore
|
|
967
987
|
{
|
|
968
988
|
path: ['Explore', 'Graphs overview'],
|
|
969
989
|
expectedUrl: '/graphs',
|
|
@@ -991,7 +1011,7 @@ describe('User and Access', () => {
|
|
|
991
1011
|
checks: noAuthChecks,
|
|
992
1012
|
},
|
|
993
1013
|
|
|
994
|
-
//
|
|
1014
|
+
// SPARQL
|
|
995
1015
|
{
|
|
996
1016
|
path: ['SPARQL'],
|
|
997
1017
|
expectedTitle: 'SPARQL Query & Update',
|
|
@@ -999,9 +1019,16 @@ describe('User and Access', () => {
|
|
|
999
1019
|
checks: noAuthChecks,
|
|
1000
1020
|
},
|
|
1001
1021
|
|
|
1002
|
-
//
|
|
1022
|
+
// TTYG
|
|
1023
|
+
{
|
|
1024
|
+
path: ['Talk to Your Graph'],
|
|
1025
|
+
expectedUrl: '/ttyg',
|
|
1026
|
+
checks: noAuthChecks,
|
|
1027
|
+
},
|
|
1028
|
+
|
|
1029
|
+
// GraphQL
|
|
1003
1030
|
|
|
1004
|
-
//
|
|
1031
|
+
// Monitor
|
|
1005
1032
|
{
|
|
1006
1033
|
path: ['Monitor', 'Queries and Updates'],
|
|
1007
1034
|
expectedUrl: '/monitor/queries',
|
|
@@ -1009,7 +1036,7 @@ describe('User and Access', () => {
|
|
|
1009
1036
|
checks: noAuthChecks,
|
|
1010
1037
|
},
|
|
1011
1038
|
|
|
1012
|
-
//
|
|
1039
|
+
// Setup
|
|
1013
1040
|
{
|
|
1014
1041
|
path: ['Setup', 'My Settings'],
|
|
1015
1042
|
expectedUrl: '/settings',
|
|
@@ -1061,14 +1088,7 @@ describe('User and Access', () => {
|
|
|
1061
1088
|
checks: noAuthChecks,
|
|
1062
1089
|
},
|
|
1063
1090
|
|
|
1064
|
-
//
|
|
1065
|
-
{
|
|
1066
|
-
path: ['Lab', 'Talk to Your Graph'],
|
|
1067
|
-
expectedUrl: '/ttyg',
|
|
1068
|
-
checks: noAuthChecks,
|
|
1069
|
-
},
|
|
1070
|
-
|
|
1071
|
-
// 8) Help
|
|
1091
|
+
// Help
|
|
1072
1092
|
{
|
|
1073
1093
|
path: ['Help', 'REST API'],
|
|
1074
1094
|
expectedUrl: '/webapi',
|
|
@@ -1108,14 +1128,14 @@ describe('User and Access', () => {
|
|
|
1108
1128
|
];
|
|
1109
1129
|
|
|
1110
1130
|
const FREE_ACCESS_MENU_ITEMS_WITHOUT_GRAPHQL = [
|
|
1111
|
-
//
|
|
1131
|
+
// Import
|
|
1112
1132
|
{
|
|
1113
1133
|
path: ['Import'],
|
|
1114
1134
|
expectedUrl: '/import',
|
|
1115
1135
|
checks: noAuthChecks,
|
|
1116
1136
|
},
|
|
1117
1137
|
|
|
1118
|
-
//
|
|
1138
|
+
// Explore
|
|
1119
1139
|
{
|
|
1120
1140
|
path: ['Explore', 'Graphs overview'],
|
|
1121
1141
|
expectedUrl: '/graphs',
|
|
@@ -1143,7 +1163,7 @@ describe('User and Access', () => {
|
|
|
1143
1163
|
checks: noAuthChecks,
|
|
1144
1164
|
},
|
|
1145
1165
|
|
|
1146
|
-
//
|
|
1166
|
+
// SPARQL
|
|
1147
1167
|
{
|
|
1148
1168
|
path: ['SPARQL'],
|
|
1149
1169
|
expectedTitle: 'SPARQL Query & Update',
|
|
@@ -1151,7 +1171,7 @@ describe('User and Access', () => {
|
|
|
1151
1171
|
checks: noAuthChecks,
|
|
1152
1172
|
},
|
|
1153
1173
|
|
|
1154
|
-
//
|
|
1174
|
+
// Setup
|
|
1155
1175
|
{
|
|
1156
1176
|
path: ['Setup', 'Connectors'],
|
|
1157
1177
|
expectedUrl: '/connectors',
|
|
@@ -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,53 @@ 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 last set temperature value to be restored instead of the default one.
|
|
540
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '1.2');
|
|
541
|
+
// AND: I expect the high-temperature warning to be displayed again.
|
|
542
|
+
TtygAgentSettingsModalSteps.getTemperatureField().should('have.class', 'has-warning');
|
|
543
|
+
});
|
|
544
|
+
|
|
545
|
+
it('should toggle the topP setting', () => {
|
|
546
|
+
// GIVEN: I have opened the Create Agent dialog.
|
|
547
|
+
openCreateAgentDialog(repositoryId);
|
|
548
|
+
|
|
549
|
+
// WHEN: I set a custom topP value.
|
|
550
|
+
TtygAgentSettingsModalSteps.setTopP('0.3');
|
|
551
|
+
// THEN: I expect the topP value to be updated.
|
|
552
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '0.3');
|
|
553
|
+
|
|
554
|
+
// WHEN: I disable the topP setting.
|
|
555
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
556
|
+
// THEN: I expect the topP control to be disabled.
|
|
557
|
+
TtygAgentSettingsModalSteps.getTopPField().should('be.disabled');
|
|
558
|
+
|
|
559
|
+
// WHEN: I enable the topP setting.
|
|
560
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
561
|
+
// THEN: I expect the last set topP value to be restored instead of the default one.
|
|
562
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '0.3');
|
|
563
|
+
});
|
|
564
|
+
|
|
464
565
|
it('Should warn the user when he changes the default value of the base instruction', () => {
|
|
465
566
|
RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-enabled-fts.json');
|
|
466
567
|
TTYGStubs.stubChatsListGetNoResults();
|
|
@@ -541,3 +642,13 @@ function fillAgentName(name) {
|
|
|
541
642
|
TtygAgentSettingsModalSteps.getAgentNameError().should('be.visible').and('contain', 'This field is required');
|
|
542
643
|
TtygAgentSettingsModalSteps.typeAgentName(name);
|
|
543
644
|
}
|
|
645
|
+
|
|
646
|
+
const openCreateAgentDialog = (repositoryId) => {
|
|
647
|
+
TTYGStubs.stubChatsListGetNoResults();
|
|
648
|
+
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
649
|
+
ConnectorStubs.stubGetConnectors();
|
|
650
|
+
TTYGStubs.getSimilarityIndexesForRepo(repositoryId );
|
|
651
|
+
TTYGViewSteps.visit();
|
|
652
|
+
cy.wait('@get-all-repositories');
|
|
653
|
+
TTYGViewSteps.createFirstAgent();
|
|
654
|
+
}
|
|
@@ -45,6 +45,55 @@ describe('TTYG edit an agent', () => {
|
|
|
45
45
|
ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
+
it('should preserve the temperature and topP values of the edited agent', () => {
|
|
49
|
+
TTYGStubs.stubChatsListGet();
|
|
50
|
+
TTYGStubs.stubAgentListGet();
|
|
51
|
+
TTYGStubs.stubChatGet();
|
|
52
|
+
// GIVEN: I have opened the ttyg page
|
|
53
|
+
TTYGViewSteps.visit();
|
|
54
|
+
cy.wait('@get-chat-list');
|
|
55
|
+
cy.wait('@get-agent-list');
|
|
56
|
+
cy.wait('@get-chat');
|
|
57
|
+
|
|
58
|
+
// WHEN: I open the settings of an agent whose temperature and topP differ from the default values
|
|
59
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
60
|
+
|
|
61
|
+
// THEN: I expect the values of the agent to be loaded instead of the default ones
|
|
62
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '0');
|
|
63
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '0');
|
|
64
|
+
|
|
65
|
+
// WHEN: I disable the temperature setting
|
|
66
|
+
TtygAgentSettingsModalSteps.toggleTemperature();
|
|
67
|
+
// THEN: I expect the temperature controls to be disabled
|
|
68
|
+
TtygAgentSettingsModalSteps.getTemperatureField().should('be.disabled');
|
|
69
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('be.disabled');
|
|
70
|
+
|
|
71
|
+
// WHEN: I enable the temperature setting again
|
|
72
|
+
TtygAgentSettingsModalSteps.toggleTemperature();
|
|
73
|
+
// THEN: I expect the temperature value of the agent to be restored instead of the default one
|
|
74
|
+
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '0');
|
|
75
|
+
|
|
76
|
+
// WHEN: I disable the topP setting
|
|
77
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
78
|
+
// THEN: I expect the topP control to be disabled
|
|
79
|
+
TtygAgentSettingsModalSteps.getTopPField().should('be.disabled');
|
|
80
|
+
|
|
81
|
+
// WHEN: I enable the topP setting again
|
|
82
|
+
TtygAgentSettingsModalSteps.toggleTop();
|
|
83
|
+
// THEN: I expect the topP value of the agent to be restored instead of the default one
|
|
84
|
+
TtygAgentSettingsModalSteps.getTopPField().should('have.value', '0');
|
|
85
|
+
|
|
86
|
+
// WHEN: I save the agent
|
|
87
|
+
TTYGStubs.stubAgentEdit();
|
|
88
|
+
TtygAgentSettingsModalSteps.saveAgent();
|
|
89
|
+
// THEN: I expect the values of the agent to be sent instead of the default ones
|
|
90
|
+
cy.wait('@edit-agent').then((interception) => {
|
|
91
|
+
expect(interception.request.body.temperature).to.equal(0);
|
|
92
|
+
expect(interception.request.body.topP).to.equal(0);
|
|
93
|
+
});
|
|
94
|
+
ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
|
|
95
|
+
});
|
|
96
|
+
|
|
48
97
|
it('should not be able to edit an agent if an extraction method is selected but the precondition has failed', () => {
|
|
49
98
|
TTYGStubs.stubChatsListGet();
|
|
50
99
|
TTYGStubs.stubAgentListGet();
|
|
@@ -60,6 +109,14 @@ describe('TTYG edit an agent', () => {
|
|
|
60
109
|
|
|
61
110
|
// THEN: The Save Agent button should be disabled
|
|
62
111
|
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
112
|
+
// AND: The panel of the FTS extraction method should be expanded, so that the reason is visible
|
|
113
|
+
TtygAgentSettingsModalSteps.getFtsDisabledHelp().should('be.visible');
|
|
114
|
+
|
|
115
|
+
// WHEN: I try to collapse the panel of the FTS extraction method
|
|
116
|
+
TtygAgentSettingsModalSteps.toggleFTSExtractionMethodPanel();
|
|
117
|
+
// THEN: The panel should remain expanded, because the precondition error is not resolved yet
|
|
118
|
+
TtygAgentSettingsModalSteps.getFtsDisabledHelp().should('be.visible');
|
|
119
|
+
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
63
120
|
});
|
|
64
121
|
|
|
65
122
|
it('should be able to edit Autocomplete extraction method option', () => {
|
|
@@ -39,7 +39,7 @@ describe('TTYG initial state with API key', () => {
|
|
|
39
39
|
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
40
40
|
// Given, I visit the TTYG page via the navigation menu
|
|
41
41
|
HomeSteps.visit();
|
|
42
|
-
MainMenuSteps.
|
|
42
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
43
43
|
// Then,
|
|
44
44
|
verifyStateWithApiKey();
|
|
45
45
|
});
|
|
@@ -38,7 +38,7 @@ describe.skip('TTYG initial state with selected repository', () => {
|
|
|
38
38
|
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
39
39
|
// Given, I visit the TTYG page via the navigation menu with a repository selected
|
|
40
40
|
HomeSteps.visit();
|
|
41
|
-
MainMenuSteps.
|
|
41
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
42
42
|
// Then,
|
|
43
43
|
verifyStateWithSelectedRepository();
|
|
44
44
|
});
|
|
@@ -14,7 +14,7 @@ describe('TTYG initial state without selected repository', () => {
|
|
|
14
14
|
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
15
15
|
// Given, I visit the TTYG page via the navigation menu without a repository selected
|
|
16
16
|
HomeSteps.visit();
|
|
17
|
-
MainMenuSteps.
|
|
17
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
18
18
|
// Then,
|
|
19
19
|
ErrorSteps.verifyNoConnectedRepoMessage();
|
|
20
20
|
});
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"address": "pc-desktop:7300",
|
|
4
|
+
"nodeState": "FOLLOWER",
|
|
5
|
+
"term": 2,
|
|
6
|
+
"syncStatus": {},
|
|
7
|
+
"lastLogTerm": 0,
|
|
8
|
+
"lastLogIndex": 0,
|
|
9
|
+
"endpoint": "http://pc-desktop:7200",
|
|
10
|
+
"recoveryStatus": {},
|
|
11
|
+
"topologyStatus": {
|
|
12
|
+
"state": "PRIMARY_NODE"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"address": "pc-desktop:7301",
|
|
17
|
+
"nodeState": "FOLLOWER",
|
|
18
|
+
"term": 2,
|
|
19
|
+
"syncStatus": {},
|
|
20
|
+
"lastLogTerm": 0,
|
|
21
|
+
"lastLogIndex": 0,
|
|
22
|
+
"endpoint": "http://pc-desktop:7201",
|
|
23
|
+
"recoveryStatus": {},
|
|
24
|
+
"topologyStatus": {
|
|
25
|
+
"state": "PRIMARY_NODE"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"address": "pc-desktop:7302",
|
|
30
|
+
"nodeState": "FOLLOWER",
|
|
31
|
+
"term": 2,
|
|
32
|
+
"syncStatus": {},
|
|
33
|
+
"lastLogTerm": 0,
|
|
34
|
+
"lastLogIndex": 0,
|
|
35
|
+
"endpoint": "http://pc-desktop:7202",
|
|
36
|
+
"recoveryStatus": {},
|
|
37
|
+
"topologyStatus": {
|
|
38
|
+
"state": "PRIMARY_NODE"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
@@ -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-revert-explain-query-tests",
|
|
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-revert-explain-query-tests",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
package/package.json
CHANGED
|
@@ -119,6 +119,10 @@ export class ClusterConfigurationSteps {
|
|
|
119
119
|
return this.getMultiRegionTabContent().find('.title');
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
static getNoLeaderAlert() {
|
|
123
|
+
return this.getMultiRegionTabContent().find('.no-leader-alert');
|
|
124
|
+
}
|
|
125
|
+
|
|
122
126
|
static getAddTagButton() {
|
|
123
127
|
return this.getMultiRegionTabContent().find('.create-tag-btn');
|
|
124
128
|
}
|
|
@@ -161,17 +161,29 @@ class ImportSteps {
|
|
|
161
161
|
return this.getSelectedResources().eq(index).closest('.title-row');
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
static
|
|
164
|
+
static getResourceTitleRow(index) {
|
|
165
165
|
return this.getResources().eq(index);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
static getResourceByIndex(index) {
|
|
169
|
+
return this.getResourcesTable().find(`[data-test="resource-${index}"]`);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static getResourceNameByIndex(index) {
|
|
173
|
+
return this.getResourceByIndex(index).find('.cell-title').invoke('text');
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
static getResourceStatusByIndex(index) {
|
|
177
|
+
return this.getResourceByIndex(index).find('.import-resource-message');
|
|
178
|
+
}
|
|
179
|
+
|
|
168
180
|
static getResourceByName(name) {
|
|
169
181
|
return this.getResources().find('.cell-title').contains(name)
|
|
170
182
|
.closest('.row.title-row');
|
|
171
183
|
}
|
|
172
184
|
|
|
173
185
|
static selectFileByIndex(index) {
|
|
174
|
-
this.
|
|
186
|
+
this.getResourceTitleRow(index).find('.select-checkbox').click();
|
|
175
187
|
}
|
|
176
188
|
|
|
177
189
|
static selectFileByName(name) {
|
|
@@ -194,8 +206,16 @@ class ImportSteps {
|
|
|
194
206
|
return this.getResources().find('.import-resource-message');
|
|
195
207
|
}
|
|
196
208
|
|
|
197
|
-
static
|
|
209
|
+
static checkImportedResourceByIndex(index, resourceName, expectedStatus) {
|
|
198
210
|
const status = expectedStatus || 'Imported successfully';
|
|
211
|
+
|
|
212
|
+
this.getResourceNameByIndex(index).should('contain', resourceName);
|
|
213
|
+
this.getResourceStatusByIndex(index).should('contain', status);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
static checkImportedResourceByName(resourceName, expectedStatus) {
|
|
217
|
+
const status = expectedStatus || 'Imported successfully';
|
|
218
|
+
|
|
199
219
|
this.getResourceByName(resourceName).should('contain', resourceName);
|
|
200
220
|
this.getResourceStatus(resourceName).should('contain', status);
|
|
201
221
|
}
|
|
@@ -263,11 +283,11 @@ class ImportSteps {
|
|
|
263
283
|
}
|
|
264
284
|
|
|
265
285
|
static deleteUploadedFile(index) {
|
|
266
|
-
this.
|
|
286
|
+
this.getResourceTitleRow(index).find('.import-resource-action-remove-btn').invoke('show').trigger('click');
|
|
267
287
|
}
|
|
268
288
|
|
|
269
289
|
static importFile(index) {
|
|
270
|
-
this.
|
|
290
|
+
this.getResourceTitleRow(index).find('.import-resource-action-import-btn').invoke('show').trigger('click');
|
|
271
291
|
}
|
|
272
292
|
|
|
273
293
|
static importResourceByName(name) {
|
|
@@ -275,7 +295,7 @@ class ImportSteps {
|
|
|
275
295
|
}
|
|
276
296
|
|
|
277
297
|
static resetFileStatus(index) {
|
|
278
|
-
this.
|
|
298
|
+
this.getResourceTitleRow(index).find('.import-resource-action-reset-btn').click();
|
|
279
299
|
}
|
|
280
300
|
|
|
281
301
|
static resetResourceStatusByName(name) {
|
package/steps/main-menu-steps.js
CHANGED
|
@@ -107,15 +107,6 @@ export class MainMenuSteps {
|
|
|
107
107
|
this.getSubMenuButton('sub-menu-visual-graph').click();
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
static clickOnReactodia() {
|
|
111
|
-
this.clickOnExplore();
|
|
112
|
-
this.clickOnSubmenuReactodia();
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
static clickOnSubmenuReactodia() {
|
|
116
|
-
this.getSubMenuButton('menu-reactodia').click();
|
|
117
|
-
}
|
|
118
|
-
|
|
119
110
|
static clickOnClassRelationships() {
|
|
120
111
|
this.clickOnExplore();
|
|
121
112
|
this.clickOnSubmenuClassRelationships();
|
|
@@ -281,23 +272,14 @@ export class MainMenuSteps {
|
|
|
281
272
|
}
|
|
282
273
|
|
|
283
274
|
// --------------------------
|
|
284
|
-
// --
|
|
275
|
+
// -- TTYG menu --
|
|
285
276
|
// --------------------------
|
|
286
|
-
static
|
|
287
|
-
return this.getMainMenu().getByTestId('menu-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
static clickOnMenuLab() {
|
|
291
|
-
return this.getMenuLab().click();
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
static clickOnTTYG() {
|
|
295
|
-
this.clickOnMenuLab();
|
|
296
|
-
this.clickOnTTYGSubmenu()
|
|
277
|
+
static getMenuTTYG() {
|
|
278
|
+
return this.getMainMenu().getByTestId('menu-ttyg');
|
|
297
279
|
}
|
|
298
280
|
|
|
299
|
-
static
|
|
300
|
-
this.
|
|
281
|
+
static clickOnMenuTTYG() {
|
|
282
|
+
return this.getMenuTTYG().click();
|
|
301
283
|
}
|
|
302
284
|
|
|
303
285
|
// --------------------------
|
|
@@ -147,12 +147,4 @@ export class ResourceSteps {
|
|
|
147
147
|
static getDataTable() {
|
|
148
148
|
return cy.get('.dataTable');
|
|
149
149
|
}
|
|
150
|
-
|
|
151
|
-
static getVisualizeReactodiaButton() {
|
|
152
|
-
return cy.getByTestId('visualize-reactodia-button');
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
static clickOnVisualizeReactodiaButton() {
|
|
156
|
-
ResourceSteps.getVisualizeReactodiaButton().click();
|
|
157
|
-
}
|
|
158
150
|
}
|
|
@@ -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
|
}
|