graphdb-workbench-tests 4.0.0-TR1 → 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.
- 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/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 +43 -23
- package/e2e-legacy/ttyg/create-agent.spec.js +111 -0
- package/e2e-legacy/ttyg/edit-agent.spec.js +49 -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/repositories/get-repositories-with-unsupported-graphql-types.json +46 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/main-menu-steps.js +5 -14
- 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
|
@@ -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/
|
|
110
|
-
GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Talk to Your Graph view to create an
|
|
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/
|
|
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.
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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.
|
|
42
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
47
43
|
|
|
48
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Create an agent —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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
|
|
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/
|
|
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.
|
|
33
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
38
34
|
|
|
39
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Missing OpenAI key —
|
|
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/
|
|
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.
|
|
49
|
+
MainMenuSteps.clickOnMenuTTYG();
|
|
58
50
|
|
|
59
|
-
GuideDialogSteps.assertDialogWithTitleIsVisible('Edit an agent —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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 —
|
|
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
|
|
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');
|
|
@@ -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
|
});
|
|
@@ -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();
|
|
@@ -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,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-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-
|
|
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
package/steps/main-menu-steps.js
CHANGED
|
@@ -272,23 +272,14 @@ export class MainMenuSteps {
|
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
// --------------------------
|
|
275
|
-
// --
|
|
275
|
+
// -- TTYG menu --
|
|
276
276
|
// --------------------------
|
|
277
|
-
static
|
|
278
|
-
return this.getMainMenu().getByTestId('menu-
|
|
277
|
+
static getMenuTTYG() {
|
|
278
|
+
return this.getMainMenu().getByTestId('menu-ttyg');
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
static
|
|
282
|
-
return this.
|
|
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
|
// --------------------------
|
|
@@ -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
|
}
|
|
@@ -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()
|
|
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
|
-
.
|
|
245
|
+
.click(CENTER_SCROLL);
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
static clickGraphqlAccessRepo(repoName) {
|
|
245
249
|
this.getRepositoryRightsLine(repoName)
|
|
246
250
|
.find('.graphql')
|
|
247
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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).
|
|
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).
|
|
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).
|
|
397
|
+
UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).click(CENTER_SCROLL);
|
|
394
398
|
}
|
|
395
399
|
|
|
396
400
|
static toggleMaintainRepoForRepo(repoName) {
|
|
@@ -405,15 +409,12 @@ export class UserAndAccessSteps {
|
|
|
405
409
|
// ============= GraphQL Access Toggles and Validations =============
|
|
406
410
|
|
|
407
411
|
static getGraphqlAccessForRepo(repoName) {
|
|
408
|
-
const
|
|
409
|
-
return
|
|
410
|
-
.contains(matchText)
|
|
411
|
-
.parent('tr')
|
|
412
|
-
.find('.graphql')
|
|
412
|
+
const testId = (repoName === '*') ? 'graphql-any-checkbox' : 'graphql-repository-checkbox';
|
|
413
|
+
return this.getRepositoryRightsLine(repoName).getByTestId(testId);
|
|
413
414
|
}
|
|
414
415
|
|
|
415
416
|
static toggleGraphqlAccessForRepo(repoName) {
|
|
416
|
-
return this.getGraphqlAccessForRepo(repoName).
|
|
417
|
+
return this.getGraphqlAccessForRepo(repoName).click(CENTER_SCROLL);
|
|
417
418
|
}
|
|
418
419
|
|
|
419
420
|
static validateGraphqlAccessForRepo(repoName, expectedState) {
|
|
@@ -421,6 +422,30 @@ export class UserAndAccessSteps {
|
|
|
421
422
|
this.validateRightsForRepo(repoName, graphqlAccessCheckbox, expectedState);
|
|
422
423
|
}
|
|
423
424
|
|
|
425
|
+
static getRepositoryRightsRows() {
|
|
426
|
+
return cy.getByTestId('repository-rights-rows');
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
static getGraphqlAnyRoleTooltip() {
|
|
430
|
+
return cy.getByTestId('graphql-any-role-tooltip');
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
static getGraphqlRepositoryTypeTooltipForRepo(repoName) {
|
|
434
|
+
return this.getRepositoryRightsLine(repoName).getByTestId('graphql-repository-type-tooltip');
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
static hoverGraphQlRightsCheckbox(repoName) {
|
|
438
|
+
this.getGraphqlRepositoryTypeTooltipForRepo(repoName).trigger('mouseover');
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
static blurGraphQlRightsCheckbox(repoName) {
|
|
442
|
+
this.getGraphqlRepositoryTypeTooltipForRepo(repoName).trigger('mouseout');
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
static getAngularTooltip() {
|
|
446
|
+
return cy.get('.angular-tooltip');
|
|
447
|
+
}
|
|
448
|
+
|
|
424
449
|
static clickMenuItem(label) {
|
|
425
450
|
return cy.get('.main-menu').contains(label).click({force: true});
|
|
426
451
|
}
|
|
@@ -434,19 +459,19 @@ export class UserAndAccessSteps {
|
|
|
434
459
|
.contains(repoName)
|
|
435
460
|
.parent('.row')
|
|
436
461
|
.find('.read')
|
|
437
|
-
.
|
|
462
|
+
.click(CENTER_SCROLL);
|
|
438
463
|
}
|
|
439
464
|
|
|
440
465
|
static clickFreeWriteAccessRepo(repoName) {
|
|
441
466
|
cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
|
|
442
467
|
cy.get('@row').scrollIntoView();
|
|
443
|
-
cy.get('@row').find('.write').
|
|
468
|
+
cy.get('@row').find('.write').click(CENTER_SCROLL);
|
|
444
469
|
}
|
|
445
470
|
|
|
446
471
|
static clickFreeGraphqlAccessRepo(repoName) {
|
|
447
472
|
cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
|
|
448
473
|
cy.get('@row').scrollIntoView();
|
|
449
|
-
cy.get('@row').find('.graphql').
|
|
474
|
+
cy.get('@row').find('.graphql').click(CENTER_SCROLL);
|
|
450
475
|
}
|
|
451
476
|
|
|
452
477
|
}
|
|
@@ -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
|
}
|