graphdb-workbench-tests 3.1.3 → 3.2.0-RC2
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/cypress-flaky.config.js +5 -4
- package/cypress-legacy.config.js +12 -5
- package/cypress.config.js +39 -4
- package/e2e-legacy/cluster/cluster-states.spec.js +3 -3
- package/e2e-legacy/import/initial-state/import-page-without-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/agent-select-menu.spec.js +3 -3
- package/e2e-legacy/ttyg/chat-panel.spec.js +30 -0
- package/e2e-legacy/ttyg/create-agent.spec.js +20 -9
- package/e2e-legacy/ttyg/create-chat.spec.js +2 -1
- package/e2e-legacy/ttyg/edit-agent.spec.js +9 -6
- package/eslint.config.js +39 -0
- package/fixtures/ttyg/agent/get-agent-defaults.json +7 -2
- package/fixtures/ttyg/agent/get-similarity-indexes-for-another-repo.json +6 -0
- package/fixtures/ttyg/agent/get-similarity-indexes.json +13 -0
- package/fixtures/ttyg/chats/ask-question-cancel.json +12 -0
- package/fixtures/ttyg/chats/cancel-question-response.json +1 -0
- package/fixtures/ttyg/chats/create/create-chat-response.json +10 -14
- package/fixtures/ttyg/chats/create/question-response-after-chat-creation.json +29 -0
- package/npm-shrinkwrap.json +2148 -548
- package/package.json +12 -3
- package/plugins/index.js +8 -4
- package/steps/home-steps.js +16 -11
- package/steps/operations-statuses-component-steps.js +3 -3
- package/steps/setup/user-and-access-steps.js +3 -3
- package/steps/ttyg/chat-panel-steps.js +20 -0
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +14 -2
- package/stubs/ttyg/ttyg-stubs.js +44 -6
- package/support/e2e.js +5 -3
package/cypress-flaky.config.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
export default defineConfig({
|
|
4
5
|
projectId: 'v35btb',
|
|
5
6
|
fixturesFolder: 'fixtures',
|
|
6
7
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -16,12 +17,12 @@ module.exports = defineConfig({
|
|
|
16
17
|
// We've imported your old cypress plugins here.
|
|
17
18
|
// You may want to clean this up later by importing these.
|
|
18
19
|
setupNodeEvents(on, config) {
|
|
19
|
-
return
|
|
20
|
+
return setupPlugins(on, config);
|
|
20
21
|
},
|
|
21
22
|
baseUrl: 'http://localhost:9000',
|
|
22
23
|
specPattern: 'e2e-flaky/**/*.{js,jsx,ts,tsx}',
|
|
23
24
|
supportFile: 'support/e2e.js',
|
|
24
|
-
reporter:
|
|
25
|
+
reporter: 'cypress-multi-reporters',
|
|
25
26
|
reporterOptions: {
|
|
26
27
|
configFile: 'cypress-reporter-config.json'
|
|
27
28
|
}
|
package/cypress-legacy.config.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
2
3
|
|
|
3
4
|
const isCoverage = process.env.COVERAGE === 'true';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
const loadCodeCoverage = async (on, config) => {
|
|
7
|
+
const mod = await import('@bahmutov/cypress-code-coverage/plugin');
|
|
8
|
+
const plugin = ('default' in mod) ? mod.default : mod;
|
|
9
|
+
plugin(on, config);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default defineConfig({
|
|
6
13
|
projectId: 'v35btb',
|
|
7
14
|
fixturesFolder: 'fixtures',
|
|
8
15
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -19,10 +26,10 @@ module.exports = defineConfig({
|
|
|
19
26
|
},
|
|
20
27
|
// We've imported your old cypress plugins here.
|
|
21
28
|
// You may want to clean this up later by importing these.
|
|
22
|
-
setupNodeEvents(on, config) {
|
|
23
|
-
|
|
29
|
+
async setupNodeEvents(on, config) {
|
|
30
|
+
setupPlugins(on, config);
|
|
24
31
|
if (isCoverage) {
|
|
25
|
-
|
|
32
|
+
await loadCodeCoverage(on, config);
|
|
26
33
|
}
|
|
27
34
|
return config;
|
|
28
35
|
},
|
package/cypress.config.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { defineConfig } from 'cypress';
|
|
2
|
+
import setupPlugins from './plugins/index.js';
|
|
3
|
+
import webpackPreprocessor from '@cypress/webpack-preprocessor';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
export default defineConfig({
|
|
4
6
|
projectId: 'v35btb',
|
|
5
7
|
fixturesFolder: 'fixtures',
|
|
6
8
|
screenshotsFolder: 'report/screenshots',
|
|
@@ -20,10 +22,43 @@ module.exports = defineConfig({
|
|
|
20
22
|
// We've imported your old cypress plugins here.
|
|
21
23
|
// You may want to clean this up later by importing these.
|
|
22
24
|
setupNodeEvents(on, config) {
|
|
23
|
-
|
|
25
|
+
on('file:preprocessor', webpackPreprocessor({
|
|
26
|
+
webpackOptions: {
|
|
27
|
+
resolve: {
|
|
28
|
+
extensions: ['.js', '.json'],
|
|
29
|
+
modules: ['node_modules', '.'],
|
|
30
|
+
fullySpecified: false,
|
|
31
|
+
alias: {
|
|
32
|
+
path: 'path-browserify'
|
|
33
|
+
},
|
|
34
|
+
fallback: {
|
|
35
|
+
// Provide empty mocks for Node.js core modules
|
|
36
|
+
path: false,
|
|
37
|
+
fs: false,
|
|
38
|
+
os: false,
|
|
39
|
+
crypto: false,
|
|
40
|
+
util: false,
|
|
41
|
+
buffer: false,
|
|
42
|
+
stream: false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
module: {
|
|
46
|
+
rules: [
|
|
47
|
+
{
|
|
48
|
+
test: /\.js$/,
|
|
49
|
+
resolve: {
|
|
50
|
+
fullySpecified: false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
target: 'web',
|
|
56
|
+
}
|
|
57
|
+
}));
|
|
58
|
+
return setupPlugins(on, config);
|
|
24
59
|
},
|
|
25
60
|
baseUrl: 'http://localhost:9000',
|
|
26
|
-
specPattern: './**/*.
|
|
61
|
+
specPattern: './**/*.js',
|
|
27
62
|
supportFile: 'support/e2e.js',
|
|
28
63
|
reporter: "cypress-multi-reporters",
|
|
29
64
|
reporterOptions: {
|
|
@@ -104,14 +104,14 @@ describe('Cluster states', () => {
|
|
|
104
104
|
ClusterViewSteps.getLink('pc-desktop-7300-pc-desktop-7302').should('have.css', 'stroke-dasharray', '10px, 10px')
|
|
105
105
|
.and('have.css', 'marker-mid', 'url("#arrowhead_big")')
|
|
106
106
|
.invoke('attr', 'stroke')
|
|
107
|
-
.should('eq', 'var(--secondary-
|
|
107
|
+
.should('eq', 'var(--gw-secondary-base)');
|
|
108
108
|
// And I expect an out of sync link between the leader and the out of sync node (the one receiving the snapshot)
|
|
109
109
|
ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7300').should('have.css', 'stroke-dasharray', '10px, 10px')
|
|
110
110
|
.invoke('attr', 'stroke')
|
|
111
|
-
.should('eq', 'var(--
|
|
111
|
+
.should('eq', 'var(--gw-neutral-base)');
|
|
112
112
|
// And I expect to have an in sync link between the leader and the node sending the snapshot
|
|
113
113
|
ClusterViewSteps.getLink('pc-desktop-7301-pc-desktop-7302').should('have.css', 'stroke-dasharray', 'none')
|
|
114
114
|
.invoke('attr', 'stroke')
|
|
115
|
-
.should('eq', 'var(--secondary-
|
|
115
|
+
.should('eq', 'var(--gw-secondary-base)');
|
|
116
116
|
});
|
|
117
117
|
});
|
|
@@ -23,6 +23,6 @@ describe('Initial state of the import view without a selected repository', () =>
|
|
|
23
23
|
|
|
24
24
|
const verifyInitialStateWhenNoRepositoryIsSelected = () => {
|
|
25
25
|
RepositoryErrorsWidgetSteps.getWidget().should('be.visible');
|
|
26
|
-
ImportUserDataSteps.getResourcesTable().should('
|
|
26
|
+
ImportUserDataSteps.getResourcesTable().should('not.exist');
|
|
27
27
|
};
|
|
28
28
|
});
|
|
@@ -35,8 +35,8 @@ describe('TTYG agent select menu', () => {
|
|
|
35
35
|
TTYGViewSteps.visit();
|
|
36
36
|
// And: The agent dropdown menu is not visible
|
|
37
37
|
TTYGViewSteps.getAgentsDropdownMenu().should('not.be.visible');
|
|
38
|
-
// And:
|
|
39
|
-
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', '
|
|
38
|
+
// And: The first agent is selected
|
|
39
|
+
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'agent-1');
|
|
40
40
|
|
|
41
41
|
// When: I open the agent selection menu
|
|
42
42
|
TTYGViewSteps.openAgentsMenu();
|
|
@@ -48,7 +48,7 @@ describe('TTYG agent select menu', () => {
|
|
|
48
48
|
// When: I attempt to select an incompatible agent from the menu
|
|
49
49
|
TTYGViewSteps.selectAgent(0);
|
|
50
50
|
// Then: The incompatible agent should not be selected
|
|
51
|
-
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', '
|
|
51
|
+
TTYGViewSteps.getAgentsMenuToggleButton().should('contain', 'agent-1');
|
|
52
52
|
// And: The dropdown menu should remain open
|
|
53
53
|
TTYGViewSteps.getAgentsDropdownMenu().should('be.visible');
|
|
54
54
|
});
|
|
@@ -190,6 +190,36 @@ describe('Ttyg ChatPanel', () => {
|
|
|
190
190
|
.and('contain', 'completion tokens');
|
|
191
191
|
});
|
|
192
192
|
|
|
193
|
+
it('Should abort question', () => {
|
|
194
|
+
// When I type a question
|
|
195
|
+
ChatPanelSteps.getQuestionInputElement()
|
|
196
|
+
.should('be.visible')
|
|
197
|
+
.and('not.have.attr', 'disabled');
|
|
198
|
+
ChatPanelSteps.getQuestionInputElement()
|
|
199
|
+
.type('Who is Han Solo?');
|
|
200
|
+
|
|
201
|
+
// Then I expect the "Ask" button be active
|
|
202
|
+
ChatPanelSteps.getAskButtonElement().should('be.enabled');
|
|
203
|
+
|
|
204
|
+
// When I click on "Ask" button
|
|
205
|
+
TTYGStubs.stubAnswerQuestionWithDelay();
|
|
206
|
+
TTYGStubs.stubCancelQuestion();
|
|
207
|
+
ChatPanelSteps.askQuestion();
|
|
208
|
+
// Then the Cancel button should become visible and the Ask button should be hidden
|
|
209
|
+
ChatPanelSteps.getAskButtonElement().should('not.exist');
|
|
210
|
+
ChatPanelSteps.getCancelButton().should('be.visible');
|
|
211
|
+
// When I cancel the question
|
|
212
|
+
ChatPanelSteps.cancelQuestion();
|
|
213
|
+
// Then the Cancel button should be replaced with the Ask button
|
|
214
|
+
ChatPanelSteps.getCancelButton().should('not.exist');
|
|
215
|
+
ChatPanelSteps.getAskButtonElement().should('be.visible');
|
|
216
|
+
// Then the default Agent response should be visible
|
|
217
|
+
ChatPanelSteps.getAssistantAnswer(2).invoke('text').then((text) => {
|
|
218
|
+
expect(text.trim()).to.equal('Request cancelled by the user.');
|
|
219
|
+
});
|
|
220
|
+
ChatPanelSteps.getAssistantIcon(2).should('not.exist');
|
|
221
|
+
});
|
|
222
|
+
|
|
193
223
|
// Can't test this on CI
|
|
194
224
|
it.skip('Should copy an answer when click on copy button', () => {
|
|
195
225
|
// When I click on copy button
|
|
@@ -2,11 +2,11 @@ import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
|
|
|
2
2
|
import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
|
|
3
3
|
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
4
4
|
import {TtygAgentSettingsModalSteps} from "../../steps/ttyg/ttyg-agent-settings-modal.steps";
|
|
5
|
-
import {SimilarityIndexStubs} from "../../stubs/similarity-index-stubs";
|
|
6
5
|
import {ConnectorStubs} from "../../stubs/connector-stubs";
|
|
7
6
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
8
7
|
import {RepositoriesStub} from "../../stubs/repositories-stub";
|
|
9
8
|
import {AlertDialogSteps} from "../../steps/alert-dialog-steps";
|
|
9
|
+
import {ApplicationSteps} from '../../steps/application-steps.js';
|
|
10
10
|
|
|
11
11
|
describe('TTYG create new agent', () => {
|
|
12
12
|
const repositoryId = 'starwars';
|
|
@@ -68,10 +68,12 @@ describe('TTYG create new agent', () => {
|
|
|
68
68
|
// enable SPARQL extraction method and disable it again to check the error message for the extraction methods
|
|
69
69
|
TtygAgentSettingsModalSteps.enableSparqlExtractionMethod();
|
|
70
70
|
// The component here is the bootstrap collapse component, so we need to wait for the animation to finish, otherwise the test might fail randomly
|
|
71
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
71
72
|
cy.wait(1000);
|
|
72
73
|
TtygAgentSettingsModalSteps.getSparqlExtractionMethodPanel().should('be.visible');
|
|
73
74
|
TtygAgentSettingsModalSteps.disableSparqlExtractionMethod();
|
|
74
75
|
// The component here is the bootstrap collapse component, so we need to wait for the animation to finish, otherwise the test might fail randomly
|
|
76
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
75
77
|
cy.wait(1000);
|
|
76
78
|
TtygAgentSettingsModalSteps.getSparqlExtractionMethodPanel().should('not.exist');
|
|
77
79
|
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
@@ -143,6 +145,7 @@ describe('TTYG create new agent', () => {
|
|
|
143
145
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
144
146
|
TtygAgentSettingsModalSteps.getCreatingAgentLoader().should('be.visible');
|
|
145
147
|
cy.wait('@create-agent').then((interception) => {
|
|
148
|
+
// eslint-disable-next-line no-undef
|
|
146
149
|
assert.deepEqual(interception.request.body, {
|
|
147
150
|
"id": "id",
|
|
148
151
|
"name": "Test Agent",
|
|
@@ -251,7 +254,7 @@ describe('TTYG create new agent', () => {
|
|
|
251
254
|
}, () => {
|
|
252
255
|
TTYGStubs.stubChatsListGetNoResults();
|
|
253
256
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
254
|
-
|
|
257
|
+
TTYGStubs.getSimilarityIndexesForRepo();
|
|
255
258
|
// Given I have opened the ttyg page
|
|
256
259
|
TTYGViewSteps.visit();
|
|
257
260
|
cy.wait('@get-all-repositories');
|
|
@@ -274,7 +277,7 @@ describe('TTYG create new agent', () => {
|
|
|
274
277
|
}, () => {
|
|
275
278
|
TTYGStubs.stubChatsListGetNoResults();
|
|
276
279
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
277
|
-
|
|
280
|
+
TTYGStubs.getSimilarityIndexesForRepo(repositoryId);
|
|
278
281
|
// Given I have opened the ttyg page
|
|
279
282
|
TTYGViewSteps.visit();
|
|
280
283
|
cy.wait('@get-all-repositories');
|
|
@@ -286,8 +289,10 @@ describe('TTYG create new agent', () => {
|
|
|
286
289
|
TtygAgentSettingsModalSteps.selectRepository(repositoryId);
|
|
287
290
|
// And I enable the similarity search extraction method
|
|
288
291
|
TtygAgentSettingsModalSteps.enableSimilaritySearchMethodPanel();
|
|
289
|
-
// Then I expect similarity index to be selected
|
|
290
|
-
TtygAgentSettingsModalSteps.
|
|
292
|
+
// Then I expect the first similarity search index instance to be selected
|
|
293
|
+
TtygAgentSettingsModalSteps.getSimilarityIndexSelectedOption().should('have.text', 'otkg-vector-new');
|
|
294
|
+
// And I expect that no vector fields from that instance should be selected
|
|
295
|
+
TtygAgentSettingsModalSteps.getSimilarityIndexSelectedVectorFieldsValue().should('contain', 'Select field');
|
|
291
296
|
// Then agent save button should be enabled
|
|
292
297
|
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.enabled');
|
|
293
298
|
// When I set the similarity index threshold
|
|
@@ -297,6 +302,7 @@ describe('TTYG create new agent', () => {
|
|
|
297
302
|
TtygAgentSettingsModalSteps.getSimilarityIndexMaxTriplesField().should('have.value', '');
|
|
298
303
|
TtygAgentSettingsModalSteps.setSimilarityIndexMaxTriples('100');
|
|
299
304
|
// When I save the agent
|
|
305
|
+
// !!! This stub is not for agent with similarity search method, but it's ok for this test !!!
|
|
300
306
|
TTYGStubs.stubAgentCreate();
|
|
301
307
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-new-agent.json');
|
|
302
308
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
@@ -432,7 +438,7 @@ describe('TTYG create new agent', () => {
|
|
|
432
438
|
TTYGStubs.stubChatsListGetNoResults();
|
|
433
439
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
434
440
|
ConnectorStubs.stubGetConnectors();
|
|
435
|
-
|
|
441
|
+
TTYGStubs.getSimilarityIndexesForRepo(repositoryId );
|
|
436
442
|
// Given I have opened the ttyg page
|
|
437
443
|
TTYGViewSteps.visit();
|
|
438
444
|
cy.wait('@get-all-repositories');
|
|
@@ -444,16 +450,21 @@ describe('TTYG create new agent', () => {
|
|
|
444
450
|
|
|
445
451
|
// When I open Similarity index name panel
|
|
446
452
|
TtygAgentSettingsModalSteps.enableSimilaritySearchMethodPanel();
|
|
453
|
+
cy.wait('@get-similarity-indexes');
|
|
447
454
|
// Then I expect to see the first index selected.
|
|
448
|
-
TtygAgentSettingsModalSteps.verifySimilarityIndexSelected('
|
|
455
|
+
TtygAgentSettingsModalSteps.verifySimilarityIndexSelected('otkg-vector-new');
|
|
449
456
|
|
|
450
457
|
// When I select another repository that have similarity connectors
|
|
458
|
+
TTYGStubs.getSimilarityIndexesForRepo('biomarkers', '/ttyg/agent/get-similarity-indexes-for-another-repo.json');
|
|
451
459
|
TtygAgentSettingsModalSteps.selectRepository('biomarkers');
|
|
460
|
+
cy.wait('@get-similarity-indexes');
|
|
452
461
|
// Then I expect to see the first similarity index from new repository selected.
|
|
453
|
-
TtygAgentSettingsModalSteps.verifySimilarityIndexSelected('
|
|
462
|
+
TtygAgentSettingsModalSteps.verifySimilarityIndexSelected('biomarkers-vector');
|
|
454
463
|
|
|
455
464
|
// When I select a repository that not have similarity indexes
|
|
456
465
|
TtygAgentSettingsModalSteps.selectRepository('ttyg-repo-1725518186812');
|
|
466
|
+
// Then I expect an error message to be open for similarity search index missing
|
|
467
|
+
ApplicationSteps.getErrorNotifications().should('be.visible');
|
|
457
468
|
// Then I expect help message to be open
|
|
458
469
|
TtygAgentSettingsModalSteps.getSimilaritySearchIndexMissingHelp().should('be.visible');
|
|
459
470
|
|
|
@@ -522,7 +533,7 @@ describe('TTYG create new agent', () => {
|
|
|
522
533
|
// When I open agent settings dialog and make all steps so the create button became enabled.
|
|
523
534
|
TTYGStubs.stubChatsListGetNoResults();
|
|
524
535
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
525
|
-
|
|
536
|
+
TTYGStubs.getSimilarityIndexesForRepo();
|
|
526
537
|
TTYGViewSteps.visit();
|
|
527
538
|
cy.wait('@get-all-repositories');
|
|
528
539
|
TTYGViewSteps.createFirstAgent();
|
|
@@ -47,9 +47,10 @@ describe('TTYG create chat', () => {
|
|
|
47
47
|
ChatPanelSteps.getAskButtonElement().should('be.enabled');
|
|
48
48
|
|
|
49
49
|
// When I click on "Ask" button.
|
|
50
|
-
TTYGStubs.
|
|
50
|
+
TTYGStubs.stubCreateNewChat();
|
|
51
51
|
ChatPanelSteps.getAskButtonElement().scrollIntoView().click();
|
|
52
52
|
cy.wait('@create-chat');
|
|
53
|
+
cy.wait('@ask-first-chat-question');
|
|
53
54
|
|
|
54
55
|
// Then I expect new chat to be created in a new group "Today" and be selected
|
|
55
56
|
TTYGViewSteps.getChatGroup(0).should('contain', 'Today');
|
|
@@ -43,11 +43,11 @@ describe('TTYG edit an agent', () => {
|
|
|
43
43
|
// and save the agent.
|
|
44
44
|
TTYGStubs.stubAgentEdit();
|
|
45
45
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
46
|
-
cy.wait('@edit-agent')
|
|
46
|
+
cy.wait('@edit-agent').then((interception) => {
|
|
47
|
+
expect(interception.request.body.additionalExtractionMethods[0].method).to.equal('iri_discovery_search');
|
|
48
|
+
});
|
|
47
49
|
// Then I expect the agent to be saved
|
|
48
50
|
ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
|
|
49
|
-
TTYGViewSteps.editCurrentAgent();
|
|
50
|
-
TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('be.checked');
|
|
51
51
|
});
|
|
52
52
|
|
|
53
53
|
|
|
@@ -76,13 +76,16 @@ describe('TTYG edit an agent', () => {
|
|
|
76
76
|
// When I save the agent
|
|
77
77
|
TTYGStubs.stubAgentEdit();
|
|
78
78
|
TtygAgentSettingsModalSteps.saveAgent();
|
|
79
|
-
cy.wait('@edit-agent')
|
|
79
|
+
cy.wait('@edit-agent').then((interception) => {
|
|
80
|
+
const additionalMethod = interception.request.body.additionalExtractionMethods[0];
|
|
81
|
+
expect(additionalMethod).to.not.be.undefined;
|
|
82
|
+
expect(additionalMethod.method).to.equal('autocomplete_iri_discovery_search');
|
|
83
|
+
expect(additionalMethod.limit).to.equal(2);
|
|
84
|
+
});
|
|
80
85
|
// Then I expect the agent to be saved
|
|
81
86
|
ToasterSteps.verifySuccess('The agent \'Test autocomplete extraction agent\' was saved successfully.');
|
|
82
87
|
TTYGViewSteps.editCurrentAgent();
|
|
83
|
-
TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('be.checked');
|
|
84
88
|
TtygAgentSettingsModalSteps.toggleAutocompleteSearchPanel();
|
|
85
|
-
TtygAgentSettingsModalSteps.getAutocompleteMaxResults().should('have.value', '2');
|
|
86
89
|
|
|
87
90
|
// When: I select a repository with disabled autocomplete
|
|
88
91
|
AutocompleteStubs.stubAutocompleteEnabled(false);
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
import pluginJs from '@eslint/js';
|
|
3
|
+
import pluginCypress from 'eslint-plugin-cypress/flat';
|
|
4
|
+
|
|
5
|
+
export default [
|
|
6
|
+
{
|
|
7
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
8
|
+
plugins: { js: pluginJs },
|
|
9
|
+
languageOptions: { globals: globals.browser },
|
|
10
|
+
rules: {
|
|
11
|
+
...pluginJs.configs.recommended.rules,
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
files: ['**/*.{js,mjs,cjs}'],
|
|
16
|
+
plugins: { cypress: pluginCypress },
|
|
17
|
+
languageOptions: {
|
|
18
|
+
globals: {
|
|
19
|
+
...globals.browser,
|
|
20
|
+
cy: 'readonly',
|
|
21
|
+
Cypress: 'readonly',
|
|
22
|
+
describe: 'readonly',
|
|
23
|
+
it: 'readonly',
|
|
24
|
+
beforeEach: 'readonly',
|
|
25
|
+
afterEach: 'readonly',
|
|
26
|
+
before: 'readonly',
|
|
27
|
+
after: 'readonly',
|
|
28
|
+
expect: 'readonly',
|
|
29
|
+
|
|
30
|
+
// Node.js globals for scripts
|
|
31
|
+
process: 'readonly',
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
rules: {
|
|
35
|
+
...pluginJs.configs.recommended.rules,
|
|
36
|
+
...pluginCypress.configs.recommended.rules,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
];
|
|
@@ -25,9 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"method": "similarity_search",
|
|
28
|
-
"similarityIndex":
|
|
28
|
+
"similarityIndex": null,
|
|
29
29
|
"similarityIndexThreshold": 0.6,
|
|
30
|
-
"maxNumberOfTriplesPerCall": 0
|
|
30
|
+
"maxNumberOfTriplesPerCall": 0,
|
|
31
|
+
"connectorType": "similarity"
|
|
31
32
|
},
|
|
32
33
|
{
|
|
33
34
|
"method": "retrieval_search",
|
|
@@ -39,6 +40,10 @@
|
|
|
39
40
|
"additionalExtractionMethods": [
|
|
40
41
|
{
|
|
41
42
|
"method": "iri_discovery_search"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"method": "autocomplete_iri_discovery_search",
|
|
46
|
+
"limit": 0
|
|
42
47
|
}
|
|
43
48
|
]
|
|
44
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"runStatus":"cancelled","message":"Request cancelled by the user."}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id":
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"timestamp": "creationDate",
|
|
13
|
-
"name": null
|
|
14
|
-
}
|
|
15
|
-
]
|
|
2
|
+
"id": null,
|
|
3
|
+
"conversationId": "thread_new_created_chat",
|
|
4
|
+
"agentId": null,
|
|
5
|
+
"role": null,
|
|
6
|
+
"message": null,
|
|
7
|
+
"timestamp": 0,
|
|
8
|
+
"name": "New chat",
|
|
9
|
+
"usage": null,
|
|
10
|
+
"isTerminalState": false,
|
|
11
|
+
"terminalStatusCode": null
|
|
16
12
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "thread_tpv1izmd9bIjxkhUiCd5x2Xz",
|
|
3
|
+
"name": "Hello! How can I assist you today?",
|
|
4
|
+
"messages": [
|
|
5
|
+
{
|
|
6
|
+
"id": "msg_drDW9OTkPkY0oGoXSdPD5qEx",
|
|
7
|
+
"conversationId": "thread_tpv1izmd9bIjxkhUiCd5x2Xz",
|
|
8
|
+
"agentId": "asst_0llP8yAJlFY2yCWrz8Ovfzjs",
|
|
9
|
+
"role": "assistant",
|
|
10
|
+
"message": "Hello! How can I assist you today?",
|
|
11
|
+
"timestamp": "creationDate",
|
|
12
|
+
"name": null,
|
|
13
|
+
"usage": {
|
|
14
|
+
"completionTokens": 11,
|
|
15
|
+
"promptTokens": 374,
|
|
16
|
+
"totalTokens": 385
|
|
17
|
+
},
|
|
18
|
+
"isTerminalState": false,
|
|
19
|
+
"terminalStatusCode": null
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"timestamp": "creationDate",
|
|
23
|
+
"continueRunId": null,
|
|
24
|
+
"usage": {
|
|
25
|
+
"completionTokens": 11,
|
|
26
|
+
"promptTokens": 374,
|
|
27
|
+
"totalTokens": 385
|
|
28
|
+
}
|
|
29
|
+
}
|