graphdb-workbench-tests 2.8.0-TR2 → 2.8.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.
@@ -287,7 +287,10 @@
287
287
  "deleting_agent": "Deleting agent...",
288
288
  "deleted_repository": "Deleted repository",
289
289
  "create_agent_modal": {
290
- "title": "Create Agent",
290
+ "title": {
291
+ "create": "Create Agent",
292
+ "edit": "Edit Agent"
293
+ },
291
294
  "advanced_settings": {
292
295
  "show": "Show advanced settings",
293
296
  "hide": "Hide advanced settings"
@@ -379,6 +382,9 @@
379
382
  },
380
383
  "cancel": {
381
384
  "label": "Cancel"
385
+ },
386
+ "save": {
387
+ "label": "Save"
382
388
  }
383
389
  }
384
390
  },
@@ -433,7 +439,9 @@
433
439
  "help_2": "The Agent is an AI-powered conversational agent designed to help with a wide range of tasks, from answering questions and providing information to assisting with creative and technical projects. It leverages advanced natural language processing to understand and respond to user inputs in a human-like manner, making interactions intuitive and efficient.",
434
440
  "error_retrieval_connectors_loading": "Error loading retrieval connectors",
435
441
  "error_similarity_indexes_loading": "Error loading similarity indexes",
436
- "error_repository_config_loading": "Error loading repository configurations"
442
+ "error_repository_config_loading": "Error loading repository configurations",
443
+ "agent_save_successfully": "The agent '{{agentName}}' was saved successfully.",
444
+ "agent_save_failure": "Failed to save the agent '{{agentName}}'."
437
445
  }
438
446
  },
439
447
  "help.what.title": "What is this?",
@@ -13,7 +13,8 @@
13
13
  },
14
14
  "assistantExtractionMethods": [
15
15
  {
16
- "ftsMethod": "fts_search"
16
+ "method": "fts_search",
17
+ "maxNumberOfTriplesPerCall": 44
17
18
  }
18
19
  ]
19
20
  },
@@ -31,7 +32,7 @@
31
32
  },
32
33
  "assistantExtractionMethods": [
33
34
  {
34
- "ftsMethod": "fts_search"
35
+ "method": "fts_search"
35
36
  }
36
37
  ]
37
38
  },
@@ -49,7 +50,8 @@
49
50
  },
50
51
  "assistantExtractionMethods": [
51
52
  {
52
- "ftsMethod": "fts_search"
53
+ "method": "fts_search",
54
+ "maxNumberOfTriplesPerCall": 44
53
55
  }
54
56
  ]
55
57
  },
@@ -67,7 +69,8 @@
67
69
  },
68
70
  "assistantExtractionMethods": [
69
71
  {
70
- "ftsMethod": "fts_search"
72
+ "method": "fts_search",
73
+ "maxNumberOfTriplesPerCall": 44
71
74
  }
72
75
  ]
73
76
  }
@@ -0,0 +1,43 @@
1
+ import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
2
+ import {NamespaceStubs} from "../../stubs/namespace-stubs";
3
+ import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
4
+ import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
5
+ import {TtygAgentSettingsModalSteps} from "../../steps/ttyg/ttyg-agent-settings-modal.steps";
6
+ import {ToasterSteps} from "../../steps/toaster-steps";
7
+
8
+ describe('TTYG create new agent', () => {
9
+ const repositoryId = 'starwars';
10
+
11
+ beforeEach(() => {
12
+ RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
13
+ cy.presetRepository(repositoryId);
14
+ NamespaceStubs.stubNameSpaceResponse(repositoryId, '/namespaces/get-repository-starwars-namespaces.json');
15
+ });
16
+
17
+ it(' should be able to edit an agent.', () => {
18
+ TTYGStubs.stubAgentListGet();
19
+ // Given I have opened the ttyg page
20
+ TTYGViewSteps.visit();
21
+
22
+ // When I select an agent that don't have activated additional extraction method
23
+ TTYGViewSteps.openAgentsMenu();
24
+ TTYGViewSteps.selectAgent(0);
25
+ TTYGViewSteps.editCurrentAgent();
26
+
27
+ // Then I expect that the iri discovery checkbox is not checked
28
+ TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('not.be.checked');
29
+
30
+ // When I check the iri discovery checkbox
31
+ TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
32
+
33
+ // and save the agent.
34
+ TTYGStubs.stubAgentEdit();
35
+ TtygAgentSettingsModalSteps.saveAgent();
36
+
37
+ // Then I expect the agent to be saved
38
+ ToasterSteps.verifySuccess('The agent \'agent-1\' was saved successfully.');
39
+ TTYGViewSteps.editCurrentAgent();
40
+ TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('be.checked');
41
+ });
42
+
43
+ });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.8.0-TR2",
3
+ "version": "2.8.0-TR3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "2.8.0-TR2",
9
+ "version": "2.8.0-TR3",
10
10
  "license": "Apache-2.0",
11
11
  "devDependencies": {
12
12
  "cypress": "^13.3.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.8.0-TR2",
3
+ "version": "2.8.0-TR3",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",
@@ -7,7 +7,7 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
7
7
  }
8
8
 
9
9
  static saveAgent() {
10
- this.getSaveAgentButton().click();
10
+ this.getSaveAgentButton().click({force: true});
11
11
  }
12
12
 
13
13
  // =========================
@@ -325,6 +325,19 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
325
325
  return this.getSeedField().type(value);
326
326
  }
327
327
 
328
+ // Additional query methods
329
+ static getIriDiscoverySearchCheckbox() {
330
+ return cy.get('#iri_discovery_search_checkbox');
331
+ }
332
+
333
+ static checkIriDiscoverySearchCheckbox() {
334
+ this.getIriDiscoverySearchCheckbox().check({force: true});
335
+ }
336
+
337
+ static uncheckIriDiscoverySearchCheckbox() {
338
+ this.getIriDiscoverySearchCheckbox().uncheck({force: true});
339
+ }
340
+
328
341
  // System instructions
329
342
 
330
343
  static getSystemInstructionsFormGroup() {
@@ -96,6 +96,19 @@ export class TTYGStubs extends Stubs {
96
96
  }).as('create-agent');
97
97
  }
98
98
 
99
+ static stubAgentEdit() {
100
+ cy.intercept({
101
+ method: 'PUT',
102
+ url: '/rest/chat/agents'
103
+ }, (req) => {
104
+ const requestBody = req.body;
105
+ req.reply({
106
+ statusCode: 200,
107
+ body: requestBody
108
+ });
109
+ }).as('edit-agent');
110
+ }
111
+
99
112
  static stubAgentDelete(delay = 0) {
100
113
  cy.intercept('/rest/chat/agents/**', {
101
114
  method: 'DELETE',