graphdb-workbench-tests 3.2.0-TR5 → 3.2.0-TR7

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.
@@ -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-color)');
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(--gray-color)');
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-color)');
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('be.hidden');
26
+ ImportUserDataSteps.getResourcesTable().should('not.exist');
27
27
  };
28
28
  });
@@ -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
- SimilarityIndexStubs.stubGetSimilarityIndexes('/similarity/get-similarity-indexes-0.json');
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
- SimilarityIndexStubs.stubGetSimilarityIndexes();
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.getSimilarityIndexField().should('have.value', '0');
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
- SimilarityIndexStubs.stubTTYGSimilarityIndexes();
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('similarity_index_starwars_one');
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('similarity_index_biomarkers_one');
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
- SimilarityIndexStubs.stubGetSimilarityIndexes('/similarity/get-similarity-indexes-0.json');
536
+ TTYGStubs.getSimilarityIndexesForRepo();
526
537
  TTYGViewSteps.visit();
527
538
  cy.wait('@get-all-repositories');
528
539
  TTYGViewSteps.createFirstAgent();
@@ -10,7 +10,7 @@ function verifyStateWithSelectedRepository() {
10
10
  TTYGViewSteps.getApiKeyMessage().should('be.visible');
11
11
  TTYGViewSteps.getMissingApiKeyToastMessage()
12
12
  .should('be.visible')
13
- .and('contain', 'Set the config property \'graphdb.llm.api-key\' to your LLM API key.');
13
+ .and('contain', 'Set the config property \'graphdb.llm.api-key\' to your LLM API key');
14
14
  }
15
15
 
16
16
  // TODO: skipped until BE releases an updated version with the new API key.
@@ -25,9 +25,10 @@
25
25
  },
26
26
  {
27
27
  "method": "similarity_search",
28
- "similarityIndex": "similarity-index",
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,6 @@
1
+ {
2
+ "opensearch:biomarkers-vector": [
3
+ "docText1",
4
+ "docText2"
5
+ ]
6
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "opensearch:otkg-vector-new": [
3
+ "docText1"
4
+ ],
5
+ "similarity": [
6
+ "test",
7
+ "test-copy"
8
+ ],
9
+ "elasticsearch:otkg-vector": [
10
+ "docText1",
11
+ "docText2"
12
+ ]
13
+ }