graphdb-workbench-tests 2.8.0-TR5 → 2.8.0-TR6

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.
@@ -280,6 +280,14 @@
280
280
  "messages": {
281
281
  "answer_copy_successful": "The answer was successfully copied to the clipboard.",
282
282
  "answer_copy_failed": "Failed to copy the answer to the clipboard."
283
+ },
284
+ "dialog": {
285
+ "confirm_repository_change_before_open_similarity": {
286
+ "body": "If you proceed with creating the similarity index, GraphDB will open in a new tab and switch to the <b>{{repositoryId}}</b> repository."
287
+ },
288
+ "confirm_repository_change_before_open_connectors": {
289
+ "body": "If you proceed with creating the ChatGPT retrieval connector, GraphDB will open in a new tab and switch to the <b>{{repositoryId}}</b> repository."
290
+ }
283
291
  }
284
292
  },
285
293
  "agent": {
@@ -289,7 +297,8 @@
289
297
  "create_agent_modal": {
290
298
  "title": {
291
299
  "create": "Create Agent",
292
- "edit": "Edit Agent"
300
+ "edit": "Edit Agent",
301
+ "clone": "Clone Agent"
293
302
  },
294
303
  "advanced_settings": {
295
304
  "show": "Show advanced settings",
@@ -297,7 +306,7 @@
297
306
  },
298
307
  "form": {
299
308
  "agent_name": {
300
- "label": "GraphAgent name",
309
+ "label": "Agent name",
301
310
  "placeholder": "Enter user friendly name"
302
311
  },
303
312
  "repository": {
@@ -323,7 +332,7 @@
323
332
  },
324
333
  "fts_search": {
325
334
  "label": "Full-text search",
326
- "fts_disabled_message": "To use this method, you must enable the full-text search (FTS) index on chosen repository and then restart it.<br/>Enable the index: <a href=\"{{repositoryEditPage}}\" target=\"_blank\">here</a>",
335
+ "fts_disabled_message": "You must <a href=\"{{repositoryEditPage}}\" target=\"_blank\">enable the full-text search (FTS) index</a> to use this method.",
327
336
  "missing_repository_id": "Repository ID must be selected"
328
337
  },
329
338
  "sparql_search": {
@@ -342,14 +351,22 @@
342
351
  "similarity_index": {
343
352
  "label": "Similarity index name",
344
353
  "loading_indexes": "Loading similarity indexes...",
345
- "no_similarity_index_message": "To use this method, you must have a similarity index created.<br/>Create similarity text index <a href=\"{{similarityIndexPage}}\" target=\"_blank\">here</a>."
354
+ "no_similarity_index": {
355
+ "message_1": "You must",
356
+ "message_2": "create a similarity index",
357
+ "message_3": "to use this method"
358
+ }
346
359
  },
347
360
  "similarity_threshold": {
348
361
  "label": "Similarity threshold"
349
362
  },
350
363
  "retrieval_search": {
351
364
  "label": "ChatGPT retrieval connector",
352
- "no_retrieval_connectors_message": "No connector instances.<br/>Create ChatGPT retrieval connector <a href=\"{{retrievalConnectorPage}}\" target=\"_blank\">here</a>."
365
+ "no_retrieval_connectors": {
366
+ "message_1": "You must",
367
+ "message_2": "create ChatGPT retrieval connector",
368
+ "message_3": "to use this method"
369
+ }
353
370
  },
354
371
  "connector_id": {
355
372
  "label": "ChatGPT retrieval connector"
@@ -2,6 +2,15 @@
2
2
  "id": "{chatId}",
3
3
  "name": "Han Solo is a fictional character in the...",
4
4
  "messages": [
5
+ {
6
+ "id": "msg_YbtWCL64HPu9Kf7SbsssseRlrwCc",
7
+ "conversationId": "thread_gy2K7D3efStfchq2v5VvpEvn",
8
+ "agentId": "asst_uoKp5kgnPlyZHhRXY7P2r9D7",
9
+ "role": "assistant",
10
+ "message": "Han Solo is a fictional character in the Star ",
11
+ "timestamp": "1725875332",
12
+ "name": null
13
+ },
5
14
  {
6
15
  "id": "msg_1niL7yYidTfiGZynCiryiMMd",
7
16
  "conversationId": "thread_gy2K7D3efStfchq2v5VvpEvn",
@@ -16,7 +25,7 @@
16
25
  "conversationId": "thread_gy2K7D3efStfchq2v5VvpEvn",
17
26
  "agentId": "asst_uoKp5kgnPlyZHhRXY7P2r9D7",
18
27
  "role": "assistant",
19
- "message": "Han Solo is a fictional character in the Star Wars franchise. He is a Human male with fair skin and brown eyes. Han Solo is portrayed by Harrison Ford in the original Star Wars trilogy and in \"The Force Awakens.\" The character also appears in several other films and media within the Star Wars universe.\n\n**Key Details:**\n- **Gender:** Male\n- **Height:** 180 cm\n- **Mass:** 80 kg\n- **Birth Year:** 29BBY\n- **Eye Color:** Brown\n- **Hair Color:** Brown\n- **Homeworld:** Corellia (Planet 22)\n\n**Description:**\nHan Solo is a character in the Star Wars franchise. In the original film trilogy, Han and his co-pilot, Chewbacca, became involved in the Rebel Alliance's struggle against the Galactic Empire. During the course of the Star Wars narrative, he becomes a chief figure in the Alliance and succeeding galactic governments. Star Wars creator George Lucas described the character as \"a ",
28
+ "message": "Han Solo is a fictional character in the Star Wars franchise.",
20
29
  "timestamp": "1725875332",
21
30
  "name": null
22
31
  },
@@ -52,15 +52,15 @@ describe('Class relations screen validation', () => {
52
52
  });
53
53
 
54
54
  it('Search for a class', function () {
55
- // Expect 10 rows initially to be visible
56
- verifyListLength(10);
55
+ // Expect 39 rows initially to be visible
56
+ verifyListLength(39);
57
57
  // Filter by partial name
58
58
  filterByClass(':Wine');
59
59
  // Expecting 6 rows to be present
60
60
  verifyListLength(6);
61
61
  // Clear the filter and expect all rows to be visible again
62
62
  getFilterField().clear();
63
- verifyListLength(10);
63
+ verifyListLength(39);
64
64
  });
65
65
 
66
66
  it('Test class relationships for given graph', () => {
@@ -13,6 +13,7 @@ describe('TTYG agent list', () => {
13
13
  TTYGStubs.stubChatsListGet();
14
14
  // Given I have opened the ttyg page
15
15
  TTYGViewSteps.visit();
16
+ cy.wait('@get-agent-list-0');
16
17
  // When the ttyg page is loaded
17
18
  // Then I should see the agent list with agents filtered by the current repository
18
19
  TTYGViewSteps.getAgentsPanel().should('be.visible');
@@ -24,9 +25,11 @@ describe('TTYG agent list', () => {
24
25
 
25
26
  it('Should be able to toggle agents panel', () => {
26
27
  TTYGStubs.stubChatsListGet();
28
+ TTYGStubs.stubChatGet();
27
29
  TTYGStubs.stubAgentListGet();
28
30
  // Given I have opened the ttyg page
29
31
  TTYGViewSteps.visit();
32
+ cy.wait('@get-chat');
30
33
  // When the ttyg page is loaded
31
34
  // Then I should see the agent list
32
35
  TTYGViewSteps.getAgents().should('have.length', 2);
@@ -43,9 +46,11 @@ describe('TTYG agent list', () => {
43
46
 
44
47
  it('Should be able to filter the agent list by repository', () => {
45
48
  TTYGStubs.stubAgentListGet();
49
+ TTYGStubs.stubChatGet();
46
50
  TTYGStubs.stubChatsListGet();
47
51
  // Given I have opened the ttyg page
48
52
  TTYGViewSteps.visit();
53
+ cy.wait('@get-chat');
49
54
  // When the ttyg page is loaded
50
55
  TTYGViewSteps.getAgents().should('have.length', 2);
51
56
  // Then Agent list filter should be set to All
@@ -3,8 +3,8 @@ import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
3
3
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
4
4
  import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
5
5
  import {ApplicationSteps} from "../../steps/application-steps";
6
+ import HomeSteps from "../../steps/home-steps";
6
7
 
7
- // TODO: This test is skipped because it fails on CI. For some reason the chat list panel is not visible.
8
8
  describe('TTYG chat list', () => {
9
9
 
10
10
  beforeEach(() => {
@@ -14,6 +14,7 @@ describe('TTYG chat list', () => {
14
14
 
15
15
  it('Should render chat list', () => {
16
16
  TTYGStubs.stubChatsListGet();
17
+ TTYGStubs.stubChatGet();
17
18
  TTYGStubs.stubAgentListGet();
18
19
  TTYGStubs.stubChatGet();
19
20
  // Given I have opened the ttyg page
@@ -29,9 +30,9 @@ describe('TTYG chat list', () => {
29
30
  // And the first chat group should have 3 chats
30
31
  verifyChatList([
31
32
  [
32
- {name: 'Very long chat name which does not fit in the sidebar'},
33
+ {name: 'Test chat 3'},
33
34
  {name: 'Test chat 2'},
34
- {name: 'Test chat 3'}
35
+ {name: 'Very long chat name which does not fit in the sidebar'}
35
36
  ],
36
37
  [{name: 'Test chat 4'}]
37
38
  ]);
@@ -53,8 +54,14 @@ describe('TTYG chat list', () => {
53
54
  TTYGViewSteps.getChatByDayGroups().should('have.length', 0);
54
55
  });
55
56
 
56
- it('Should be able to edit an existing chat name by double click on the chat in the list', () => {
57
+ it('Should be able to edit an existing chat name by double click on the chat in the list', {
58
+ retries: {
59
+ runMode: 1,
60
+ openMode: 0
61
+ }
62
+ }, () => {
57
63
  TTYGStubs.stubChatsListGet();
64
+ TTYGStubs.stubChatGet();
58
65
  TTYGStubs.stubAgentListGet();
59
66
  TTYGStubs.stubChatUpdate();
60
67
  TTYGStubs.stubChatGet();
@@ -74,8 +81,14 @@ describe('TTYG chat list', () => {
74
81
  TTYGViewSteps.getChatFromGroup(1, 0).should('contain', 'New chat name');
75
82
  });
76
83
 
77
- it('Should be able to edit an existing chat name through the action menu', () => {
84
+ it('Should be able to edit an existing chat name through the action menu', {
85
+ retries: {
86
+ runMode: 1,
87
+ openMode: 0
88
+ }
89
+ }, () => {
78
90
  TTYGStubs.stubChatsListGet();
91
+ TTYGStubs.stubChatGet();
79
92
  TTYGStubs.stubAgentListGet();
80
93
  TTYGStubs.stubChatUpdate();
81
94
  TTYGStubs.stubChatGet();
@@ -84,7 +97,6 @@ describe('TTYG chat list', () => {
84
97
  cy.wait('@get-chat');
85
98
  // And I open the action menu for the chat I want to rename
86
99
  TTYGViewSteps.selectChat(1, 0);
87
- cy.wait('@get-chat');
88
100
  TTYGViewSteps.triggerEditChatActionMenu(1, 0);
89
101
  // Then I should see the chat name input
90
102
  TTYGViewSteps.getChatNameInput(1, 0).should('be.visible').and('have.value', 'Test chat 4');
@@ -99,6 +111,7 @@ describe('TTYG chat list', () => {
99
111
 
100
112
  it('Should be able to cancel a chat name editing', () => {
101
113
  TTYGStubs.stubChatsListGet();
114
+ TTYGStubs.stubChatGet();
102
115
  TTYGStubs.stubAgentListGet();
103
116
  TTYGStubs.stubChatGet();
104
117
  // Given I have opened the ttyg page and there are chats loaded
@@ -107,17 +120,18 @@ describe('TTYG chat list', () => {
107
120
  // And I double-click on the first chat
108
121
  TTYGViewSteps.editChatName(0, 0);
109
122
  // Then I should see the chat name input
110
- TTYGViewSteps.getChatNameInput(0, 0).should('be.visible').and('have.value', 'Very long chat name which does not fit in the sidebar');
123
+ TTYGViewSteps.getChatNameInput(0, 0).should('be.visible').and('have.value', 'Test chat 3');
111
124
  // When I change the chat name
112
125
  TTYGViewSteps.writeChatName(0, 0, 'New chat name');
113
126
  // And I hit [esc] key
114
127
  TTYGViewSteps.cancelChatNameSaving(0, 0);
115
128
  // Then I should see the old chat name
116
- TTYGViewSteps.getChatFromGroup(0, 0).should('contain', 'Very long chat name which does not fit in the sidebar');
129
+ TTYGViewSteps.getChatFromGroup(0, 0).should('contain', 'Test chat 3');
117
130
  });
118
131
 
119
132
  it('Should be able to delete a chat', () => {
120
133
  TTYGStubs.stubChatsListGet();
134
+ TTYGStubs.stubChatGet();
121
135
  TTYGStubs.stubAgentListGet();
122
136
  TTYGStubs.stubChatDelete();
123
137
  TTYGStubs.stubChatGet();
@@ -156,21 +170,6 @@ describe('TTYG chat list', () => {
156
170
  TTYGViewSteps.verifyFileExists('chat-export.json')
157
171
  });
158
172
 
159
- it('Should be able to export chat from chat panel toolbar export action', () => {
160
- TTYGStubs.stubAgentListGet();
161
- TTYGStubs.stubChatsListGet();
162
- TTYGStubs.stubChatExport();
163
- TTYGStubs.stubChatGet();
164
- // Given I have opened the ttyg page and there are chats loaded
165
- TTYGViewSteps.visit();
166
- cy.wait('@get-chat');
167
- // When I select the export chat action chat panel toolbar
168
- TTYGViewSteps.exportCurrentChat();
169
- cy.wait('@export-chat');
170
- // Then I expect to download the chat as a file
171
- TTYGViewSteps.verifyFileExists('chat-export.json')
172
- });
173
-
174
173
  it('Should show error notification if chat list fails to load', () => {
175
174
  TTYGStubs.stubChatListGetError();
176
175
  TTYGStubs.stubAgentListGet();
@@ -185,6 +184,29 @@ describe('TTYG chat list', () => {
185
184
  // And the chat list should not be visible
186
185
  TTYGViewSteps.getChatsPanel().should('be.hidden');
187
186
  });
187
+
188
+ it('should persist selected chat', () => {
189
+ TTYGStubs.stubChatsListGet();
190
+ TTYGStubs.stubChatGet();
191
+ TTYGStubs.stubAgentListGet();
192
+ // Given I have opened the ttyg page
193
+ TTYGViewSteps.visit();
194
+ cy.wait('@get-chat');
195
+ TTYGViewSteps.getChatFromGroup(0, 0).should('have.class', 'selected');
196
+
197
+ // When I select another chat,
198
+ TTYGViewSteps.selectChat(0, 2);
199
+ TTYGViewSteps.getChatFromGroup(0, 0).should('have.not.class', 'selected');
200
+ TTYGViewSteps.getChatFromGroup(0, 2).should('have.class', 'selected');
201
+ // change the page,
202
+ HomeSteps.visit();
203
+ cy.wait('@get-chat');
204
+ // and came back to the ttyg page
205
+ TTYGViewSteps.visit();
206
+
207
+ // Then I expect to last used chat be selected.
208
+ TTYGViewSteps.getChatFromGroup(0, 2).should('have.class', 'selected');
209
+ });
188
210
  });
189
211
 
190
212
  /**
@@ -0,0 +1,71 @@
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
+
7
+ describe('TTYG clone an agent', () => {
8
+ const repositoryId = 'starwars';
9
+
10
+ beforeEach(() => {
11
+ RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
12
+ cy.presetRepository(repositoryId);
13
+ NamespaceStubs.stubNameSpaceResponse(repositoryId, '/namespaces/get-repository-starwars-namespaces.json');
14
+ });
15
+
16
+ it(' should be able to clone an agent.', () => {
17
+ TTYGStubs.stubAgentListGet();
18
+ TTYGStubs.stubChatsListGet();
19
+ TTYGStubs.stubChatGet();
20
+ // Given I have opened the ttyg page
21
+ TTYGViewSteps.visit();
22
+ cy.wait('@get-chat');
23
+ // When I select to clone an agent
24
+ TTYGViewSteps.triggerCloneAgentActionMenu(0);
25
+ // Then I expect to see the clone agent settings modal
26
+ TtygAgentSettingsModalSteps.getDialog().should('be.visible');
27
+ TtygAgentSettingsModalSteps.getDialogHeader().should('contain', 'Clone Agent');
28
+ // And I expect the agent name to be prefixed with 'clone-'
29
+ TtygAgentSettingsModalSteps.getAgentNameField().should('have.value', 'clone-agent-1');
30
+ // And the FTS search method should be selected
31
+ TtygAgentSettingsModalSteps.getSelectedExtractionMethods().should('have.length', 1);
32
+ TtygAgentSettingsModalSteps.getSelectedExtractionMethod(0).should('contain', 'Full-text search');
33
+ // And the agent save button should be enabled
34
+ TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.enabled').and('contain', 'Save');
35
+ // When I change the agent name
36
+ TtygAgentSettingsModalSteps.clearAgentName();
37
+ TtygAgentSettingsModalSteps.typeAgentName('agent-11');
38
+ // And I select additional extraction method
39
+ TtygAgentSettingsModalSteps.checkIriDiscoverySearchCheckbox();
40
+ // And save the agent
41
+ // We don't verify the response here, we just want to make sure the request is sent with the correct data
42
+ TTYGStubs.stubAgentCreate();
43
+ TtygAgentSettingsModalSteps.saveAgent();
44
+ cy.wait('@create-agent').then((interception) => {
45
+ assert.deepEqual(interception.request.body, {
46
+ "id": "asst_gAPcrHQQ9ZIxD5eXWH2BNFfo",
47
+ "name": "agent-11",
48
+ "repositoryId": "starwars",
49
+ "model": "gpt-4o",
50
+ "temperature": 0,
51
+ "topP": 0,
52
+ "seed": null,
53
+ "assistantsInstructions": {
54
+ "systemInstruction": "",
55
+ "userInstruction": ""
56
+ },
57
+ "assistantExtractionMethods": [
58
+ {
59
+ "method": "fts_search",
60
+ "maxNumberOfTriplesPerCall": 44
61
+ }
62
+ ],
63
+ "additionalExtractionMethods": [
64
+ {
65
+ "method": "iri_discovery_search"
66
+ }
67
+ ]
68
+ });
69
+ });
70
+ });
71
+ });
@@ -31,7 +31,12 @@ describe('TTYG create new agent', () => {
31
31
  TTYGViewSteps.getNoAgentsView().should('be.visible');
32
32
  });
33
33
 
34
- it('Should be able to create a new agent with SPARQL extraction method on the no agents view', () => {
34
+ it('Should be able to create a new agent with SPARQL extraction method on the no agents view', {
35
+ retries: {
36
+ runMode: 1,
37
+ openMode: 0
38
+ }
39
+ }, () => {
35
40
  TTYGStubs.stubChatsListGetNoResults();
36
41
  TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
37
42
  // Given I have opened the ttyg page
@@ -48,9 +53,6 @@ describe('TTYG create new agent', () => {
48
53
  // agent name
49
54
  fillAgentName('Test Agent');
50
55
 
51
- // repository ID
52
- fillRepository(repositoryId);
53
-
54
56
  // SPARQL extraction method settings
55
57
 
56
58
  // At least one extraction method must be selected
@@ -131,28 +133,6 @@ describe('TTYG create new agent', () => {
131
133
  TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
132
134
  });
133
135
 
134
- it('Should require repository ID to be selected to be able to configure the FTS extraction method', () => {
135
- RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-disabled-fts.json');
136
- TTYGStubs.stubChatsListGetNoResults();
137
- TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
138
- // Given I have opened the ttyg page
139
- TTYGViewSteps.visit();
140
- cy.wait('@get-all-repositories');
141
- // When I click on the create agent button
142
- TTYGViewSteps.createFirstAgent();
143
- // When I open the full text search extraction method panel
144
- TtygAgentSettingsModalSteps.toggleFTSExtractionMethodPanel();
145
- // Then I should see an error alert for repository id not selected
146
- TtygAgentSettingsModalSteps.getMissingRepositoryIdErrorInFtsSearchPanel().should('be.visible')
147
- .and('contain', 'Repository ID must be selected');
148
- // And I should not see the max triples field
149
- TtygAgentSettingsModalSteps.getFtsSearchMaxTriplesFormGroup().should('be.hidden');
150
- // When I select a repository
151
- TtygAgentSettingsModalSteps.selectRepository(repositoryId);
152
- // Then the error alert should be hidden
153
- TtygAgentSettingsModalSteps.getMissingRepositoryIdErrorInFtsSearchPanel().should('not.exist');
154
- });
155
-
156
136
  it('Should require FTS to be enabled for selected repository when creating agent with FTS extraction method', () => {
157
137
  RepositoriesStubs.stubGetRepositoryConfig(repositoryId, '/repositories/get-repository-config-starwars-disabled-fts.json');
158
138
  TTYGStubs.stubChatsListGetNoResults();
@@ -299,7 +279,6 @@ describe('TTYG create new agent', () => {
299
279
  TtygAgentSettingsModalSteps.typeAgentName('Test Agent');
300
280
  TtygAgentSettingsModalSteps.selectRepository(repositoryId);
301
281
  // When I select and open the GPT retrieval connector method panel
302
- TtygAgentSettingsModalSteps.toggleRetrievalMethodPanel();
303
282
  TtygAgentSettingsModalSteps.enableRetrievalMethodPanel();
304
283
  // And I select a retrieval connector
305
284
  TtygAgentSettingsModalSteps.getRetrievalConnectorField().should('have.value', '');
@@ -339,10 +318,3 @@ function fillAgentName(name) {
339
318
  TtygAgentSettingsModalSteps.getAgentNameError().should('be.visible').and('contain', 'This field is required');
340
319
  TtygAgentSettingsModalSteps.typeAgentName(name);
341
320
  }
342
-
343
- function fillRepository(repositoryId) {
344
- TtygAgentSettingsModalSteps.getRepositoryIdError().should('be.visible').and('contain', 'This field is required');
345
- TtygAgentSettingsModalSteps.selectRepository(repositoryId);
346
- // the save button should be disabled because there are other required fields that are not filled in yet
347
- TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
348
- }
@@ -5,7 +5,7 @@ import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
5
5
  import {TtygAgentSettingsModalSteps} from "../../steps/ttyg/ttyg-agent-settings-modal.steps";
6
6
  import {ToasterSteps} from "../../steps/toaster-steps";
7
7
 
8
- describe('TTYG create new agent', () => {
8
+ describe('TTYG edit an agent', () => {
9
9
  const repositoryId = 'starwars';
10
10
 
11
11
  beforeEach(() => {
@@ -14,13 +14,13 @@ describe('TTYG view', () => {
14
14
  NamespaceStubs.stubNameSpaceResponse(repositoryId, '/namespaces/get-repository-starwars-namespaces.json');
15
15
  });
16
16
 
17
- // TODO: This test is skipped because it fails on CI. For some reason the chat list panel is not visible.
18
- it.skip('Should load ttyg page and render main components', () => {
17
+ it('Should load ttyg page and render main components', () => {
19
18
  TTYGStubs.stubChatsListGet();
20
19
  TTYGStubs.stubAgentListGet();
21
20
  TTYGStubs.stubChatGet();
22
21
  // Given I have opened the ttyg page
23
22
  TTYGViewSteps.visit();
23
+ cy.wait('@get-chat');
24
24
  // When the ttyg page is loaded
25
25
  // Then I should see the ttyg view
26
26
  TTYGViewSteps.getTtygView().should('exist');
@@ -28,8 +28,8 @@ describe('TTYG view', () => {
28
28
  // Verify the chats sidebar
29
29
  TTYGViewSteps.getChatsPanel().should('be.visible');
30
30
  TTYGViewSteps.getToggleChatsSidebarButton().should('be.visible');
31
- // The create chat button is hidden by default when there are no chats
32
- TTYGViewSteps.getCreateChatButton().should('not.exist');
31
+ // The create chat button is visible when there are chats
32
+ TTYGViewSteps.getCreateChatButton().should('exist');
33
33
  // Verify the agents sidebar
34
34
  TTYGViewSteps.getAgentsPanel().should('be.visible');
35
35
  TTYGViewSteps.getHelpButton().should('be.visible');
@@ -39,7 +39,6 @@ describe('TTYG view', () => {
39
39
  TTYGViewSteps.getChat().should('be.visible');
40
40
  TTYGViewSteps.getChatPanelToolbar().should('be.visible');
41
41
  TTYGViewSteps.getEditCurrentAgentButton().should('be.visible');
42
- TTYGViewSteps.getExportCurrentChatButton().should('be.visible');
43
42
  });
44
43
 
45
44
  it('Should render no agents view if no agent is created yet', () => {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.8.0-TR5",
3
+ "version": "2.8.0-TR6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "graphdb-workbench-tests",
9
- "version": "2.8.0-TR5",
9
+ "version": "2.8.0-TR6",
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-TR5",
3
+ "version": "2.8.0-TR6",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "prepack": "npm shrinkwrap",
@@ -17,7 +17,7 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
17
17
  // Agent name
18
18
 
19
19
  static getAgentNameFormGroup() {
20
- return this.getDialog().find('.agent-name');
20
+ return this.getDialog().find('.agent-name-label');
21
21
  }
22
22
 
23
23
  static getAgentNameField() {
@@ -65,6 +65,14 @@ export class TtygAgentSettingsModalSteps extends ModalDialogSteps {
65
65
  return this.getDialog().find(`#${method}_method_heading`);
66
66
  }
67
67
 
68
+ static getSelectedExtractionMethods() {
69
+ return this.getDialog().find('.extraction-method-heading.selected');
70
+ }
71
+
72
+ static getSelectedExtractionMethod(index) {
73
+ return this.getSelectedExtractionMethods().eq(index);
74
+ }
75
+
68
76
  static getExtractionMethodPanel(method) {
69
77
  return this.getDialog().find(`#${method}_method_content`).find('.extraction-method-options');
70
78
  }
@@ -183,14 +183,6 @@ export class TTYGViewSteps {
183
183
  return this.getEditCurrentAgentButton().click();
184
184
  }
185
185
 
186
- static getExportCurrentChatButton() {
187
- return this.getChatPanelToolbar().find('.export-current-chat-btn');
188
- }
189
-
190
- static exportCurrentChat() {
191
- return this.getExportCurrentChatButton().click();
192
- }
193
-
194
186
  static verifyFileExists(fileName) {
195
187
  cy.readFile('cypress/downloads/' + fileName);
196
188
  }
@@ -203,6 +195,11 @@ export class TTYGViewSteps {
203
195
  this.getAgent(index).realHover().find('.open-agent-actions-btn').click();
204
196
  }
205
197
 
198
+ static triggerCloneAgentActionMenu(index) {
199
+ this.openAgentActionMenu(index);
200
+ this.getAgent(index).find('.agent-actions-menu .clone-agent-btn').click();
201
+ }
202
+
206
203
  static triggerDeleteAgentActionMenu(index) {
207
204
  this.openAgentActionMenu(index);
208
205
  this.getAgent(index).find('.agent-actions-menu .delete-agent-btn').click();