graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR3

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.
@@ -106,17 +106,13 @@ describe('Main Menu Guide steps', () => {
106
106
  BaseSteps.validateUrl('/sparql');
107
107
 
108
108
  // TTYG
109
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/3');
110
- GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agen');
109
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/2');
110
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agent.');
111
111
  GuideDialogSteps.clickOnNextButton();
112
112
 
113
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/3');
114
- GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
115
- MainMenuSteps.clickOnMenuLab();
116
-
117
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
113
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/2');
118
114
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
119
- MainMenuSteps.clickOnTTYGSubmenu();
115
+ MainMenuSteps.clickOnMenuTTYG();
120
116
  BaseSteps.validateUrl('/ttyg');
121
117
 
122
118
  // Autocomplete
@@ -249,15 +245,11 @@ describe('Main Menu Guide steps', () => {
249
245
  BaseSteps.validateUrl('/sparql');
250
246
 
251
247
  // TTYG
252
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/3');
248
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/2');
253
249
  GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agen');
254
250
  GuideDialogSteps.clickOnNextButton();
255
251
 
256
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/3');
257
- GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
258
- GuideDialogSteps.clickOnNextButton();
259
-
260
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/3');
252
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/2');
261
253
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
262
254
  GuideDialogSteps.clickOnNextButton();
263
255
  BaseSteps.validateUrl('/ttyg');
@@ -33,116 +33,112 @@ describe('ttyg configure agent guide', () => {
33
33
  })
34
34
 
35
35
  it('should create and configure TTYG agent with actions', () => {
36
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/30');
36
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 1/29');
37
37
  GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an agent.');
38
38
  GuideDialogSteps.clickOnNextButton();
39
39
 
40
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/30');
41
- GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
42
- MainMenuSteps.clickOnMenuLab();
43
-
44
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 3/30');
40
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 2/29');
45
41
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
46
- MainMenuSteps.clickOnTTYGSubmenu();
42
+ MainMenuSteps.clickOnMenuTTYG();
47
43
 
48
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 5/30');
44
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 4/29');
49
45
  GuideDialogSteps.assertDialogWithContentIsVisible('An agent is a helpful assistant that can answer your queries. You need to configure an agent in order to ask anything of Talk to Your Graph.');
50
46
  GuideDialogSteps.clickOnNextButton();
51
47
 
52
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 7/30');
48
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 6/29');
53
49
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the create agent button to create a new agent.');
54
50
  TTYGViewSteps.clickCreateAgentButton();
55
51
 
56
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 9/30');
52
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 8/29');
57
53
  GuideDialogSteps.assertDialogWithContentIsVisible('Type a name for the agent. You will refer to it later.');
58
54
  TtygAgentSettingsModalSteps.typeAgentName('MyAgent');
59
55
  GuideDialogSteps.clickOnNextButton();
60
56
 
61
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 10/30');
57
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 9/29');
62
58
  GuideDialogSteps.assertDialogWithContentIsVisible('Here you can type the name of the OpenAI model to be used.');
63
59
  TtygAgentSettingsModalSteps.clearLLMModel();
64
60
  TtygAgentSettingsModalSteps.typeLLMModel('gpt-3.5-turbo');
65
61
  GuideDialogSteps.clickOnNextButton();
66
62
 
67
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 11/30');
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 10/29');
68
64
  GuideDialogSteps.assertDialogWithContentIsVisible('Sets the sampling temperature of the agent. Lower values result in more consistent, repetitive responses generated by the agent and higher values result in a wider variety of responses');
69
65
  TtygAgentSettingsModalSteps.setTemperature(0.8);
70
66
  GuideDialogSteps.clickOnNextButton();
71
67
 
72
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 12/30');
68
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 11/29');
73
69
  GuideDialogSteps.assertDialogWithContentIsVisible('Sets the nucleus sampling of the agent');
74
70
  TtygAgentSettingsModalSteps.setTopP(0.9);
75
71
  GuideDialogSteps.clickOnNextButton();
76
72
 
77
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/30');
73
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 12/29');
78
74
  GuideDialogSteps.assertDialogWithContentIsVisible('Enabling SPARQL search allows the agent to answers questions by performing a SPARQL query.');
79
75
  GuideDialogSteps.clickOnNextButton();
80
76
 
81
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/30');
77
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/29');
82
78
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable SPARQL search query method.');
83
79
  TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
84
80
 
85
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/30');
81
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/29');
86
82
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable providing an ontology in a named graph.');
87
83
  TtygAgentSettingsModalSteps.selectSparqlMethodOntologyGraph();
88
84
 
89
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/30');
85
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/29');
90
86
  GuideDialogSteps.assertDialogWithContentIsVisible('Type http://example.org/some/test/ontology as the named graph which contains the ontology.');
91
87
  TtygAgentSettingsModalSteps.clearSparqlMethodOntologyGraphField();
92
88
  TtygAgentSettingsModalSteps.typeSparqlMethodOntologyGraphField('http://example.org/some/test/ontology');
93
89
  GuideDialogSteps.clickOnNextButton();
94
90
 
95
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 17/30');
91
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/29');
96
92
  GuideDialogSteps.assertDialogWithContentIsVisible('Check to automatically add missing namespaces.');
97
93
  TtygAgentSettingsModalSteps.toggleAddMissingNamespacesCheckbox();
98
94
 
99
- GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 18/30');
95
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 17/29');
100
96
  GuideDialogSteps.assertDialogWithContentIsVisible('Enabling FTS search allows the agent to answer questions by using full-text search in literals and IRIs.');
101
97
  GuideDialogSteps.clickOnNextButton();
102
98
 
103
- GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 19/30');
99
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 18/29');
104
100
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable FTS search query method.');
105
101
  TtygAgentSettingsModalSteps.enableFtsExtractionMethod();
106
102
 
107
- GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 20/30');
103
+ GuideDialogSteps.assertDialogWithTitleIsVisible('FTS search query method — 19/29');
108
104
  GuideDialogSteps.assertDialogWithContentIsVisible('Type 100 as the maximum number of triples to retrieve per call.');
109
105
  TtygAgentSettingsModalSteps.setFtsSearchMaxTriples(100);
110
106
  GuideDialogSteps.clickOnNextButton();
111
107
 
112
- GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 21/30');
108
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 20/29');
113
109
  GuideDialogSteps.assertDialogWithContentIsVisible('Enabling Similarity search allows the agent to answer questions by using Similarity search.');
114
110
  GuideDialogSteps.clickOnNextButton();
115
111
 
116
- GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 22/30');
112
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 21/29');
117
113
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Similarity search query method.');
118
114
  TtygAgentSettingsModalSteps.enableSimilaritySearchMethodPanel();
119
115
 
120
- GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 23/30');
116
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Similarity search query method — 22/29');
121
117
  GuideDialogSteps.assertDialogWithContentIsVisible('Select the index to use for Similarity search.');
122
118
  TtygAgentSettingsModalSteps.selectSimilarityIndex(0);
123
119
  GuideDialogSteps.clickOnNextButton();
124
120
 
125
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 24/30');
121
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 23/29');
126
122
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Full-text search in labels for IRI discovery');
127
123
  TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
128
124
 
129
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 25/30');
125
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 24/29');
130
126
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable Autocomplete for IRI discovery.');
131
127
  TtygAgentSettingsModalSteps.checkAutocompleteSearchCheckbox();
132
128
 
133
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 26/30');
129
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 25/29');
134
130
  GuideDialogSteps.assertDialogWithContentIsVisible('Set the Max number of results (IRIs) per call to 15');
135
131
  TtygAgentSettingsModalSteps.setAutocompleteMaxResults(15);
136
132
  GuideDialogSteps.clickOnNextButton();
137
133
 
138
- GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 27/30');
134
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Talk to Your Graph — 26/29');
139
135
  GuideDialogSteps.assertDialogWithContentIsVisible('Set Context Size to 4096 so the model can use the ontology and conversation history to answer correctly');
140
136
  TtygAgentSettingsModalSteps.getContextSizeField().focus();
141
137
  TtygAgentSettingsModalSteps.clearContextSize();
142
138
  TtygAgentSettingsModalSteps.enterContextSize(4096);
143
139
  GuideDialogSteps.clickOnNextButton();
144
140
 
145
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 28/30');
141
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 27/29');
146
142
  GuideDialogSteps.assertDialogWithContentIsVisible('Enter the following in the input:');
147
143
  TtygAgentSettingsModalSteps.clearUserInstructions();
148
144
  TtygAgentSettingsModalSteps.getCodeToCopy().then(code => {
@@ -150,7 +146,7 @@ describe('ttyg configure agent guide', () => {
150
146
  GuideDialogSteps.clickOnNextButton();
151
147
  });
152
148
 
153
- GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 29/30');
149
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent — 28/29');
154
150
  GuideDialogSteps.assertDialogWithContentIsVisible('Click to save the agent settings');
155
151
  TtygAgentSettingsModalSteps.saveAgent();
156
152
  });
@@ -28,15 +28,11 @@ describe('Edit TTYG agent guide', () => {
28
28
  it('should end guide when no api key is present', () => {
29
29
  TTYGStubs.stubAgentListGetError('Set the config property \'graphdb.llm.api-key\' to your LLM API key');
30
30
 
31
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/18');
32
- GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
33
- MainMenuSteps.clickOnMenuLab();
34
-
35
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 2/18');
31
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/17');
36
32
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
37
- MainMenuSteps.clickOnTTYGSubmenu();
33
+ MainMenuSteps.clickOnMenuTTYG();
38
34
 
39
- GuideDialogSteps.assertDialogWithTitleIsVisible('Missing OpenAI key — 3/18');
35
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Missing OpenAI key — 2/17');
40
36
  GuideDialogSteps.assertDialogWithContentIsVisible('To use Talk to Your Graph, GraphDB must first be configured to work with LLM API.');
41
37
  GuideDialogSteps.clickOnCloseButton();
42
38
  });
@@ -48,39 +44,35 @@ describe('Edit TTYG agent guide', () => {
48
44
  TTYGStubs.stubAgentEdit();
49
45
  RepositoriesStubs.stubRepositoryModel(repositoryId);
50
46
 
51
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/18');
52
- GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Lab menu.');
53
- MainMenuSteps.clickOnMenuLab();
54
-
55
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 2/18');
47
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 1/17');
56
48
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Talk to Your Graph menu.');
57
- MainMenuSteps.clickOnTTYGSubmenu();
49
+ MainMenuSteps.clickOnMenuTTYG();
58
50
 
59
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 4/18');
51
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 3/17');
60
52
  GuideDialogSteps.assertDialogWithContentIsVisible('An agent\'s configuration such as the extraction methods can be reconfigured at any time');
61
53
  GuideDialogSteps.clickOnNextButton();
62
54
 
63
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 11/18');
55
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 10/17');
64
56
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the edit agent button to edit the configuration of the selected agent.');
65
57
  TTYGViewSteps.editCurrentAgent();
66
58
 
67
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/18');
59
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 12/17');
68
60
  GuideDialogSteps.assertDialogWithContentIsVisible('Enabling SPARQL search allows the agent to answers questions by performing a SPARQL query');
69
61
  GuideDialogSteps.clickOnNextButton();
70
62
 
71
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/18');
63
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 13/17');
72
64
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable SPARQL search query method.');
73
65
  TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
74
66
 
75
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/18');
67
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 14/17');
76
68
  GuideDialogSteps.assertDialogWithContentIsVisible('Click on the toggle to enable providing an ontology in a named graph.');
77
69
  TtygAgentSettingsModalSteps.selectSparqlMethodOntologyGraph();
78
70
 
79
- GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 16/18');
71
+ GuideDialogSteps.assertDialogWithTitleIsVisible('SPARQL search query method — 15/17');
80
72
  GuideDialogSteps.assertDialogWithContentIsVisible('Type http://example.com as the named graph which contains the ontology.');
81
73
  GuideDialogSteps.clickOnNextButton();
82
74
 
83
- GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 17/18');
75
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent — 16/17');
84
76
  GuideDialogSteps.assertDialogWithContentIsVisible('Click to save the agent settings.');
85
77
  TtygAgentSettingsModalSteps.saveAgent();
86
78
  ModalDialogSteps.getDialog().should('not.exist');
@@ -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
@@ -977,14 +976,14 @@ describe('User and Access', () => {
977
976
  };
978
977
 
979
978
  const MENU_ITEMS_WITHOUT_GRAPHQL = [
980
- // 1) Import
979
+ // Import
981
980
  {
982
981
  path: ['Import'],
983
982
  expectedUrl: '/import',
984
983
  checks: noAuthChecks,
985
984
  },
986
985
 
987
- // 2) Explore
986
+ // Explore
988
987
  {
989
988
  path: ['Explore', 'Graphs overview'],
990
989
  expectedUrl: '/graphs',
@@ -1012,7 +1011,7 @@ describe('User and Access', () => {
1012
1011
  checks: noAuthChecks,
1013
1012
  },
1014
1013
 
1015
- // 3) SPARQL
1014
+ // SPARQL
1016
1015
  {
1017
1016
  path: ['SPARQL'],
1018
1017
  expectedTitle: 'SPARQL Query & Update',
@@ -1020,9 +1019,16 @@ describe('User and Access', () => {
1020
1019
  checks: noAuthChecks,
1021
1020
  },
1022
1021
 
1023
- // 4) GraphQL
1022
+ // TTYG
1023
+ {
1024
+ path: ['Talk to Your Graph'],
1025
+ expectedUrl: '/ttyg',
1026
+ checks: noAuthChecks,
1027
+ },
1028
+
1029
+ // GraphQL
1024
1030
 
1025
- // 5) Monitor
1031
+ // Monitor
1026
1032
  {
1027
1033
  path: ['Monitor', 'Queries and Updates'],
1028
1034
  expectedUrl: '/monitor/queries',
@@ -1030,7 +1036,7 @@ describe('User and Access', () => {
1030
1036
  checks: noAuthChecks,
1031
1037
  },
1032
1038
 
1033
- // 6) Setup
1039
+ // Setup
1034
1040
  {
1035
1041
  path: ['Setup', 'My Settings'],
1036
1042
  expectedUrl: '/settings',
@@ -1082,14 +1088,7 @@ describe('User and Access', () => {
1082
1088
  checks: noAuthChecks,
1083
1089
  },
1084
1090
 
1085
- // 7) Lab
1086
- {
1087
- path: ['Lab', 'Talk to Your Graph'],
1088
- expectedUrl: '/ttyg',
1089
- checks: noAuthChecks,
1090
- },
1091
-
1092
- // 8) Help
1091
+ // Help
1093
1092
  {
1094
1093
  path: ['Help', 'REST API'],
1095
1094
  expectedUrl: '/webapi',
@@ -1129,14 +1128,14 @@ describe('User and Access', () => {
1129
1128
  ];
1130
1129
 
1131
1130
  const FREE_ACCESS_MENU_ITEMS_WITHOUT_GRAPHQL = [
1132
- // 1) Import
1131
+ // Import
1133
1132
  {
1134
1133
  path: ['Import'],
1135
1134
  expectedUrl: '/import',
1136
1135
  checks: noAuthChecks,
1137
1136
  },
1138
1137
 
1139
- // 2) Explore
1138
+ // Explore
1140
1139
  {
1141
1140
  path: ['Explore', 'Graphs overview'],
1142
1141
  expectedUrl: '/graphs',
@@ -1164,7 +1163,7 @@ describe('User and Access', () => {
1164
1163
  checks: noAuthChecks,
1165
1164
  },
1166
1165
 
1167
- // 3) SPARQL
1166
+ // SPARQL
1168
1167
  {
1169
1168
  path: ['SPARQL'],
1170
1169
  expectedTitle: 'SPARQL Query & Update',
@@ -1172,7 +1171,7 @@ describe('User and Access', () => {
1172
1171
  checks: noAuthChecks,
1173
1172
  },
1174
1173
 
1175
- // 6) Setup
1174
+ // Setup
1176
1175
  {
1177
1176
  path: ['Setup', 'Connectors'],
1178
1177
  expectedUrl: '/connectors',
@@ -536,8 +536,10 @@ describe('TTYG create new agent', () => {
536
536
 
537
537
  // WHEN: I enable the temperature setting.
538
538
  TtygAgentSettingsModalSteps.toggleTemperature();
539
- // THEN: I expect the default temperature value to be restored.
540
- TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '0.7');
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');
541
543
  });
542
544
 
543
545
  it('should toggle the topP setting', () => {
@@ -556,8 +558,8 @@ describe('TTYG create new agent', () => {
556
558
 
557
559
  // WHEN: I enable the topP setting.
558
560
  TtygAgentSettingsModalSteps.toggleTop();
559
- // THEN: I expect the default topP value to be restored.
560
- TtygAgentSettingsModalSteps.getTopPField().should('have.value', '1');
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');
561
563
  });
562
564
 
563
565
  it('Should warn the user when he changes the default value of the base instruction', () => {
@@ -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();
@@ -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.clickOnTTYG();
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.clickOnTTYG();
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.clickOnTTYG();
17
+ MainMenuSteps.clickOnMenuTTYG();
18
18
  // Then,
19
19
  ErrorSteps.verifyNoConnectedRepoMessage();
20
20
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR2",
3
+ "version": "4.0.0-TR3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "4.0.0-TR2",
9
+ "version": "4.0.0-TR3",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "@bahmutov/cypress-code-coverage": "^2.7.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "4.0.0-TR2",
3
+ "version": "4.0.0-TR3",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -272,23 +272,14 @@ export class MainMenuSteps {
272
272
  }
273
273
 
274
274
  // --------------------------
275
- // -- Lab menu --
275
+ // -- TTYG menu --
276
276
  // --------------------------
277
- static getMenuLab() {
278
- return this.getMainMenu().getByTestId('menu-lab');
277
+ static getMenuTTYG() {
278
+ return this.getMainMenu().getByTestId('menu-ttyg');
279
279
  }
280
280
 
281
- static clickOnMenuLab() {
282
- return this.getMenuLab().click();
283
- }
284
-
285
- static clickOnTTYG() {
286
- this.clickOnMenuLab();
287
- this.clickOnTTYGSubmenu()
288
- }
289
-
290
- static clickOnTTYGSubmenu() {
291
- this.getSubMenuButton('sub-menu-ttyg').click();
281
+ static clickOnMenuTTYG() {
282
+ return this.getMenuTTYG().click();
292
283
  }
293
284
 
294
285
  // --------------------------
@@ -1,5 +1,7 @@
1
1
  import {EnvironmentStubs} from "../../stubs/environment-stubs";
2
2
 
3
+ const CENTER_SCROLL = {scrollBehavior: 'center'};
4
+
3
5
  export class UserAndAccessSteps {
4
6
  static visit() {
5
7
  cy.visit('/users');
@@ -118,7 +120,9 @@ export class UserAndAccessSteps {
118
120
  }
119
121
 
120
122
  static typeUsername(text) {
121
- this.getUsernameField().type(text);
123
+ this.getUsernameField()
124
+ .focus()
125
+ .type(text);
122
126
  }
123
127
 
124
128
  static getPasswordField() {
@@ -238,13 +242,13 @@ export class UserAndAccessSteps {
238
242
  .contains('Global (any data repository)')
239
243
  .parent('tr')
240
244
  .find('.graphql')
241
- .realClick();
245
+ .click(CENTER_SCROLL);
242
246
  }
243
247
 
244
248
  static clickGraphqlAccessRepo(repoName) {
245
249
  this.getRepositoryRightsLine(repoName)
246
250
  .find('.graphql')
247
- .realClick();
251
+ .click(CENTER_SCROLL);
248
252
  }
249
253
 
250
254
  static clickReadAccessAny() {
@@ -252,7 +256,7 @@ export class UserAndAccessSteps {
252
256
  .contains('Global (any data repository)')
253
257
  .parent('tr')
254
258
  .find('.read')
255
- .realClick();
259
+ .click(CENTER_SCROLL);
256
260
  }
257
261
 
258
262
  static clickReadAccessRepo(repoName) {
@@ -260,7 +264,7 @@ export class UserAndAccessSteps {
260
264
  .contains(repoName)
261
265
  .parent('tr')
262
266
  .find('.read')
263
- .realClick();
267
+ .click(CENTER_SCROLL);
264
268
  }
265
269
 
266
270
  static clickWriteAccessAny() {
@@ -268,7 +272,7 @@ export class UserAndAccessSteps {
268
272
  .contains('Global (any data repository)')
269
273
  .parent('tr')
270
274
  .find('.write')
271
- .realClick();
275
+ .click(CENTER_SCROLL);
272
276
  }
273
277
 
274
278
  static clickWriteAccessRepo(repoName) {
@@ -276,7 +280,7 @@ export class UserAndAccessSteps {
276
280
  .contains(repoName)
277
281
  .parent('tr')
278
282
  .find('.write')
279
- .realClick();
283
+ .click(CENTER_SCROLL);
280
284
  }
281
285
 
282
286
  static findUserRowAlias(username, aliasName = 'userRow') {
@@ -351,7 +355,7 @@ export class UserAndAccessSteps {
351
355
  }
352
356
 
353
357
  static toggleReadAccessForRepo(repoName) {
354
- return this.getReadAccessForRepo(repoName).realClick();
358
+ return this.getReadAccessForRepo(repoName).click(CENTER_SCROLL);
355
359
  }
356
360
 
357
361
  static validateReadAccessForRepo(repoName, expectedState) {
@@ -374,7 +378,7 @@ export class UserAndAccessSteps {
374
378
  }
375
379
 
376
380
  static toggleWriteAccessForRepo(repoName) {
377
- return this.getWriteAccessForRepo(repoName).realClick();
381
+ return this.getWriteAccessForRepo(repoName).click(CENTER_SCROLL);
378
382
  }
379
383
 
380
384
  static validateWriteAccessForRepo(repoName, expectedState) {
@@ -390,7 +394,7 @@ export class UserAndAccessSteps {
390
394
  }
391
395
 
392
396
  static clickMaintainAccessRepo(repoName) {
393
- UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).realClick();
397
+ UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).click(CENTER_SCROLL);
394
398
  }
395
399
 
396
400
  static toggleMaintainRepoForRepo(repoName) {
@@ -410,7 +414,7 @@ export class UserAndAccessSteps {
410
414
  }
411
415
 
412
416
  static toggleGraphqlAccessForRepo(repoName) {
413
- return this.getGraphqlAccessForRepo(repoName).realClick();
417
+ return this.getGraphqlAccessForRepo(repoName).click(CENTER_SCROLL);
414
418
  }
415
419
 
416
420
  static validateGraphqlAccessForRepo(repoName, expectedState) {
@@ -455,19 +459,19 @@ export class UserAndAccessSteps {
455
459
  .contains(repoName)
456
460
  .parent('.row')
457
461
  .find('.read')
458
- .realClick();
462
+ .click(CENTER_SCROLL);
459
463
  }
460
464
 
461
465
  static clickFreeWriteAccessRepo(repoName) {
462
466
  cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
463
467
  cy.get('@row').scrollIntoView();
464
- cy.get('@row').find('.write').realClick();
468
+ cy.get('@row').find('.write').click(CENTER_SCROLL);
465
469
  }
466
470
 
467
471
  static clickFreeGraphqlAccessRepo(repoName) {
468
472
  cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
469
473
  cy.get('@row').scrollIntoView();
470
- cy.get('@row').find('.graphql').realClick();
474
+ cy.get('@row').find('.graphql').click(CENTER_SCROLL);
471
475
  }
472
476
 
473
477
  }