graphdb-workbench-tests 3.1.0-WBM-8 → 3.1.0-plugins1
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/.nycrc +10 -0
- package/cypress-legacy.config.js +9 -1
- package/cypress-security.config.js +40 -0
- package/cypress.config.js +3 -1
- package/e2e-flaky/import/import-user-data-url.spec.js +63 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +44 -0
- package/e2e-legacy/explore/class-hierarchy/class.hierarchy.spec.js +1 -2
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +2 -3
- package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +5 -18
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +1 -2
- package/e2e-legacy/graphql/activate-deactivate-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/create-graphql-endpoint.spec.js +1 -3
- package/e2e-legacy/graphql/delete-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/edit-graphql-enpoint.spec.js +1 -1
- package/e2e-legacy/graphql/export-graphql-endpoint-definition.spec.js +1 -1
- package/e2e-legacy/graphql/filter-graphql-endpoints-on-management-view.spec.js +2 -2
- package/e2e-legacy/graphql/graphql-endpoint-management-view.spec.js +5 -5
- package/e2e-legacy/graphql/graphql-playground.spec.js +1 -1
- package/e2e-legacy/graphql/import-graphql-endpoint-definitions.spec.js +1 -7
- package/e2e-legacy/graphql/set-default-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
- package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
- package/e2e-legacy/{guides → help/guides}/movies-interactive-guide.spec.js +2 -2
- package/e2e-legacy/{guides → help/guides}/star-wars-interactive-guide.js +2 -2
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
- package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
- package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
- package/e2e-legacy/home/cookie-policy.spec.js +78 -59
- package/e2e-legacy/home/create-repository.spec.js +2 -6
- package/e2e-legacy/home/documentation-link.spec.js +31 -33
- package/e2e-legacy/home/google-analytics.spec.js +4 -6
- package/e2e-legacy/home/rdf-resource-search.spec.js +106 -138
- package/e2e-legacy/home/view-resource-autocomplete.spec.js +30 -21
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +1 -2
- package/e2e-legacy/import/import-server-files.spec.js +1 -2
- package/e2e-legacy/import/import-user-data-url.spec.js +1 -25
- package/e2e-legacy/import/import-user-data.spec.js +4 -2
- package/e2e-legacy/import/import-view.spec.js +1 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -9
- package/e2e-legacy/repository/attach-remote-location.spec.js +2 -5
- package/e2e-legacy/repository/ontop-repository.spec.js +3 -12
- package/e2e-legacy/repository/repositories.spec.js +35 -46
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/scopes.spec.js +1 -2
- package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
- package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{autocomplete.spec.js → autocomplete/autocomplete.spec.js} +5 -6
- package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
- package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
- package/e2e-legacy/setup/connectors-lucene.spec.js +1 -2
- package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +2 -2
- package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
- package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{namespaces.spec.js → namespaces/namespaces.spec.js} +4 -4
- package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
- package/e2e-legacy/setup/{plugins.spec.js → plugins/plugins.spec.js} +3 -3
- package/e2e-legacy/setup/sparql-template/sparql-template-create.js +10 -3
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +38 -9
- package/e2e-legacy/sparql-editor/saved-query/edit-query.spec.js +3 -6
- package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +7 -13
- package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +2 -4
- package/e2e-legacy/sparql-editor/sparql-editor.spec.js +1 -4
- package/e2e-legacy/ttyg/agent-list.spec.js +38 -6
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
- package/e2e-legacy/ttyg/clone-agent.spec.js +1 -0
- package/e2e-legacy/ttyg/create-agent.spec.js +10 -16
- package/e2e-legacy/ttyg/edit-agent.spec.js +69 -9
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +45 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
- package/e2e-legacy/ttyg/ttyg-permission.spec.js +28 -20
- package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -1
- package/e2e-security/setup/home/cookie-policy.spec.js +64 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +184 -0
- package/e2e-security/setup/users-and-access/graphql-user.spec.js +123 -0
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +69 -0
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +87 -0
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +87 -0
- package/e2e-security/setup/users-and-access/users-and-access-initial-state.spec.js +38 -0
- package/fixtures/repositories/free-access.json +13 -0
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/fixtures/ttyg/agent/get-agent-defaults-assistant-api.json +44 -0
- package/fixtures/ttyg/agent/get-agent-defaults.json +2 -0
- package/npm-shrinkwrap.json +7633 -1817
- package/package.json +13 -7
- package/plugins/index.js +3 -2
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-page-steps.js +12 -2
- package/steps/error-steps.js +4 -7
- package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
- package/steps/guides/guide-steps.js +20 -1
- package/steps/home-steps.js +59 -37
- package/steps/import/import-steps.js +8 -3
- package/steps/login-steps.js +14 -3
- package/steps/main-menu-steps.js +76 -6
- package/steps/operations-statuses-component-steps.js +5 -10
- package/steps/rdf-resource-search-steps.js +55 -0
- package/steps/repository-steps.js +17 -17
- package/steps/rest-api-documentation-steps.js +15 -0
- package/steps/setup/autocomplete-steps.js +17 -3
- package/steps/setup/namespace-steps.js +8 -2
- package/steps/setup/plugins-steps.js +11 -1
- package/steps/setup/settings-steps.js +18 -0
- package/steps/setup/user-and-access-steps.js +28 -2
- package/steps/system-information-steps.js +70 -0
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +74 -11
- package/steps/ttyg/ttyg-view-steps.js +39 -6
- package/steps/widgets/active-repository-widget-steps.js +4 -0
- package/steps/yasgui/yasr-steps.js +4 -0
- package/stubs/browser-stubs.js +21 -0
- package/stubs/environment-stubs.js +9 -1
- package/stubs/repositories/repositories-stubs.js +4 -0
- package/stubs/security-stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +18 -2
- package/support/e2e.js +2 -1
- package/support/repository-commands.js +14 -1
- package/e2e-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -57
- package/e2e-flaky/ttyg/ttyg-permission.spec.js +0 -67
- package/fixtures/locale-en.json +0 -3361
- /package/e2e-legacy/help/{system-information.spec.js → system-information/system-information.spec.js} +0 -0
|
@@ -5,11 +5,9 @@ import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
|
|
|
5
5
|
import {ToasterSteps} from "../../../steps/toaster-steps";
|
|
6
6
|
import HomeSteps from "../../../steps/home-steps";
|
|
7
7
|
import {LoginSteps} from "../../../steps/login-steps";
|
|
8
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
8
9
|
|
|
9
10
|
|
|
10
|
-
/**
|
|
11
|
-
* TODO: Fix me. Broken due to migration (Error: unknown)
|
|
12
|
-
*/
|
|
13
11
|
describe('User and Access', () => {
|
|
14
12
|
|
|
15
13
|
const PASSWORD = "password";
|
|
@@ -87,22 +85,22 @@ describe('User and Access', () => {
|
|
|
87
85
|
// Then the 'create' button should be disabled
|
|
88
86
|
UserAndAccessSteps.getConfirmUserCreateButton().should('be.disabled');
|
|
89
87
|
// And the field should show an error
|
|
90
|
-
UserAndAccessSteps.
|
|
88
|
+
UserAndAccessSteps.getCustomRoleFieldError().should('contain.text', 'Must be at least 2 symbols long');
|
|
91
89
|
// When I add more text to the custom role tag
|
|
92
90
|
UserAndAccessSteps.addTextToCustomRoleField('A{enter}');
|
|
93
91
|
// Then the 'create' button should be enabled
|
|
94
92
|
UserAndAccessSteps.getConfirmUserCreateButton().should('be.enabled');
|
|
95
93
|
// And the field error should not exist
|
|
96
|
-
UserAndAccessSteps.
|
|
94
|
+
UserAndAccessSteps.getCustomRoleFieldError().should('not.be.visible');
|
|
97
95
|
|
|
98
96
|
// When I type an invalid tag
|
|
99
97
|
UserAndAccessSteps.addTextToCustomRoleField('B{enter}');
|
|
100
98
|
// And the field shows an error
|
|
101
|
-
UserAndAccessSteps.
|
|
99
|
+
UserAndAccessSteps.getCustomRoleFieldError().should('contain.text', 'Must be at least 2 symbols long');
|
|
102
100
|
// When I delete the invalid text
|
|
103
101
|
UserAndAccessSteps.addTextToCustomRoleField('{backspace}');
|
|
104
102
|
// Then the error should not be visible
|
|
105
|
-
UserAndAccessSteps.
|
|
103
|
+
UserAndAccessSteps.getCustomRoleFieldError().should('not.be.visible');
|
|
106
104
|
});
|
|
107
105
|
|
|
108
106
|
it('Adding a role with a CUSTOM_ prefix shows a warning message', () => {
|
|
@@ -120,6 +118,36 @@ describe('User and Access', () => {
|
|
|
120
118
|
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
121
119
|
UserAndAccessSteps.getSplashLoader().should('not.be.visible');
|
|
122
120
|
});
|
|
121
|
+
|
|
122
|
+
it('should toggle free access after Admin has logged in', () => {
|
|
123
|
+
// Given I have available repositories to allow Free Access for
|
|
124
|
+
RepositoriesStubs.stubRepositories();
|
|
125
|
+
RepositoriesStubs.stubFreeAccess();
|
|
126
|
+
// When I enable security
|
|
127
|
+
UserAndAccessSteps.toggleSecurity();
|
|
128
|
+
// When I log in as an Admin
|
|
129
|
+
LoginSteps.loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
|
|
130
|
+
// Then the page should load
|
|
131
|
+
UserAndAccessSteps.getSplashLoader().should('not.be.visible');
|
|
132
|
+
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
133
|
+
// The Free Access toggle should be OFF
|
|
134
|
+
UserAndAccessSteps.getFreeAccessSwitchInput().should('not.be.checked');
|
|
135
|
+
// When I toggle Free Access ON
|
|
136
|
+
UserAndAccessSteps.toggleFreeAccess();
|
|
137
|
+
// And I allow free access to a repository
|
|
138
|
+
ModalDialogSteps.getDialog().should('be.visible');
|
|
139
|
+
// Then I click OK in the modal
|
|
140
|
+
ModalDialogSteps.clickOKButton();
|
|
141
|
+
// Then the toggle button should be ON
|
|
142
|
+
UserAndAccessSteps.getFreeAccessSwitchInput().should('be.checked');
|
|
143
|
+
// And I should see a success message
|
|
144
|
+
ToasterSteps.verifySuccess('Free access has been enabled.');
|
|
145
|
+
UserAndAccessSteps.getUsersTable().should('be.visible');
|
|
146
|
+
// When I toggle Free Access OFF
|
|
147
|
+
UserAndAccessSteps.toggleFreeAccess();
|
|
148
|
+
// Then I should see a success message
|
|
149
|
+
ToasterSteps.verifySuccess('Free access has been disabled.');
|
|
150
|
+
});
|
|
123
151
|
})
|
|
124
152
|
|
|
125
153
|
context('GraphQL only', () => {
|
|
@@ -149,6 +177,7 @@ describe('User and Access', () => {
|
|
|
149
177
|
cy.deleteRepository(repositoryId2, true);
|
|
150
178
|
cy.deleteRepository(repositoryId3, true);
|
|
151
179
|
cy.deleteUser(graphqlUser, true);
|
|
180
|
+
cy.switchOffFreeAccess(true);
|
|
152
181
|
cy.switchOffSecurity(true);
|
|
153
182
|
});
|
|
154
183
|
|
|
@@ -424,9 +453,9 @@ describe('User and Access', () => {
|
|
|
424
453
|
function navigateMenuPath(pathArray, expectedUrl, expectedTitle) {
|
|
425
454
|
pathArray.forEach((label, index) => {
|
|
426
455
|
if (index === 0) {
|
|
427
|
-
|
|
456
|
+
MainMenuSteps.clickOnMenu(label);
|
|
428
457
|
} else {
|
|
429
|
-
|
|
458
|
+
MainMenuSteps.clickOnSubMenu(label);
|
|
430
459
|
const title = expectedTitle ? expectedTitle : label;
|
|
431
460
|
cy.get('h1').should('contain', title);
|
|
432
461
|
}
|
|
@@ -4,10 +4,8 @@ import {QueryStubs} from "../../../stubs/yasgui/query-stubs";
|
|
|
4
4
|
import {SavedQuery} from "../../../steps/yasgui/saved-query";
|
|
5
5
|
import {SavedQueriesDialog} from "../../../steps/yasgui/saved-queries-dialog";
|
|
6
6
|
import {SaveQueryDialog} from "../../../steps/yasgui/save-query-dialog";
|
|
7
|
+
import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
|
|
7
8
|
|
|
8
|
-
/**
|
|
9
|
-
* TODO: Fix me. Broken due to migration (Error: beforeEach)
|
|
10
|
-
*/
|
|
11
9
|
describe('Edit saved queries', () => {
|
|
12
10
|
|
|
13
11
|
let repositoryId;
|
|
@@ -22,7 +20,7 @@ describe('Edit saved queries', () => {
|
|
|
22
20
|
QueryStubs.stubDefaultQueryResponse(repositoryId);
|
|
23
21
|
|
|
24
22
|
SparqlEditorSteps.visitSparqlEditorPage();
|
|
25
|
-
|
|
23
|
+
RepositorySelectorSteps.getSelectedRepository().should('contain', repositoryId);
|
|
26
24
|
});
|
|
27
25
|
|
|
28
26
|
afterEach(() => {
|
|
@@ -57,8 +55,7 @@ describe('Edit saved queries', () => {
|
|
|
57
55
|
SaveQueryDialog.closeSaveQueryDialog();
|
|
58
56
|
});
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
it.skip('should allow renaming saved query', () => {
|
|
58
|
+
it('should allow renaming saved query', () => {
|
|
62
59
|
// Given I have created a query
|
|
63
60
|
SavedQuery.create(savedQueryName);
|
|
64
61
|
// When I open the saved queries popup
|
|
@@ -10,13 +10,7 @@ const USER_NAME = 'saved_query_user';
|
|
|
10
10
|
const USER_ADMINISTRATOR = 'admin';
|
|
11
11
|
const PASSWORD = 'root';
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
* Skipped because this type of implementation is not ideal. If the test fails and the `afterEach` hook
|
|
15
|
-
* fails to toggle security, all remaining tests will fail because security remains enabled.
|
|
16
|
-
*
|
|
17
|
-
* Tests like this should be refactored to use stubs or other alternative implementations.
|
|
18
|
-
*/
|
|
19
|
-
describe.skip('Readonly saved query', () => {
|
|
13
|
+
describe('Readonly saved query', () => {
|
|
20
14
|
|
|
21
15
|
let repositoryId;
|
|
22
16
|
|
|
@@ -32,17 +26,18 @@ describe.skip('Readonly saved query', () => {
|
|
|
32
26
|
});
|
|
33
27
|
|
|
34
28
|
afterEach(() => {
|
|
35
|
-
|
|
29
|
+
cy.loginAsAdmin().then(()=> {
|
|
30
|
+
cy.switchOffSecurity(true);
|
|
31
|
+
cy.deleteUser(USER_NAME, true);
|
|
36
32
|
cy.deleteRepository(repositoryId);
|
|
37
|
-
|
|
38
|
-
LoginSteps.loginWithUser(USER_ADMINISTRATOR, PASSWORD);
|
|
39
|
-
UserAndAccessSteps.toggleSecurity();
|
|
40
|
-
cy.deleteUser(USER_NAME);
|
|
33
|
+
});
|
|
41
34
|
});
|
|
42
35
|
|
|
43
36
|
it('Should not allow modifying a saved query if it is readonly', () => {
|
|
44
37
|
// Given: There is a public saved query created by a user.
|
|
45
38
|
LoginSteps.loginWithUser(USER_NAME, PASSWORD);
|
|
39
|
+
// Wait for the users page to be loaded, before changing the URL to ensure the user is logged in successfully
|
|
40
|
+
UserAndAccessSteps.isUsersUrlLoaded();
|
|
46
41
|
SparqlEditorSteps.visitSparqlEditorPage();
|
|
47
42
|
YasguiSteps.getYasgui().should('be.visible');
|
|
48
43
|
const savedQueryName = SavedQuery.generateQueryName();
|
|
@@ -52,7 +47,6 @@ describe.skip('Readonly saved query', () => {
|
|
|
52
47
|
// When: I log in with another user
|
|
53
48
|
LoginSteps.loginWithUser(USER_ADMINISTRATOR, PASSWORD);
|
|
54
49
|
// and open the popup with the saved query.
|
|
55
|
-
SparqlEditorSteps.visitSparqlEditorPage();
|
|
56
50
|
YasguiSteps.showSavedQueries();
|
|
57
51
|
|
|
58
52
|
// Then: I expect:
|
|
@@ -7,10 +7,7 @@ import {SavedQueriesDialog} from "../../../steps/yasgui/saved-queries-dialog";
|
|
|
7
7
|
import {ShareSavedQueryDialog} from "../../../steps/yasgui/share-saved-query-dialog";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
* TODO: Fix me. Broken due to migration (Error: beforeEach)
|
|
12
|
-
*/
|
|
13
|
-
describe.skip('Share saved queries', () => {
|
|
10
|
+
describe('Share saved queries', () => {
|
|
14
11
|
|
|
15
12
|
let repositoryId;
|
|
16
13
|
|
|
@@ -48,6 +45,7 @@ describe.skip('Share saved queries', () => {
|
|
|
48
45
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
49
46
|
});
|
|
50
47
|
|
|
48
|
+
// FIX: Skipped because the functionality is not working. There is a bug in the application https://graphwise.atlassian.net/browse/GDB-12633
|
|
51
49
|
it('Should be able to open a share link in a new editor tab', () => {
|
|
52
50
|
// Given I have created a query
|
|
53
51
|
YasguiSteps.getTabs().should('have.length', 1);
|
|
@@ -32,10 +32,7 @@ describe('Sparql editor', () => {
|
|
|
32
32
|
YasrSteps.getResults().should('be.visible').and('have.length.gt', 0);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
* TODO: Fix me. Broken due to migration (Repository selector changed)
|
|
37
|
-
*/
|
|
38
|
-
it.skip('Should reset yasgui state when repository is changed', () => {
|
|
35
|
+
it('Should reset yasgui state when repository is changed', () => {
|
|
39
36
|
// create second repository
|
|
40
37
|
secondRepositoryId = repositoryId + '-second';
|
|
41
38
|
cy.createRepository({id: secondRepositoryId});
|
|
@@ -2,6 +2,7 @@ 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 {RepositoriesStub} from "../../stubs/repositories-stub";
|
|
5
|
+
import {TtygAgentSettingsModalSteps} from "../../steps/ttyg/ttyg-agent-settings-modal.steps";
|
|
5
6
|
|
|
6
7
|
describe('TTYG agent list', () => {
|
|
7
8
|
beforeEach(() => {
|
|
@@ -10,10 +11,7 @@ describe('TTYG agent list', () => {
|
|
|
10
11
|
cy.presetRepository('starwars');
|
|
11
12
|
});
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
* TODO: Fix me, broken due to migration (Error: unknown)
|
|
15
|
-
*/
|
|
16
|
-
it.skip('Should be able to toggle agents panel', () => {
|
|
14
|
+
it('Should be able to toggle agents panel', () => {
|
|
17
15
|
TTYGStubs.stubAgentListGet();
|
|
18
16
|
TTYGStubs.stubChatsListGet();
|
|
19
17
|
TTYGStubs.stubChatGet();
|
|
@@ -83,14 +81,48 @@ describe('TTYG agent list', () => {
|
|
|
83
81
|
TTYGViewSteps.visit();
|
|
84
82
|
// Then: Only the delete action should be available for incompatible agents
|
|
85
83
|
TTYGViewSteps.expandAgentsSidebar();
|
|
86
|
-
TTYGViewSteps.
|
|
84
|
+
TTYGViewSteps.getAgentsPanel(0).should('be.visible');
|
|
85
|
+
TTYGViewSteps.getOpenAgentActionsButton(0).should('be.visible');
|
|
86
|
+
TTYGViewSteps.toggleAgentActionMenu(0);
|
|
87
87
|
TTYGViewSteps.getDeleteAgentButton(0).should('be.visible');
|
|
88
88
|
TTYGViewSteps.getCloneAgentButton(0).should('not.exist');
|
|
89
89
|
TTYGViewSteps.getEditAgentButton(0).should('not.exist');
|
|
90
|
+
TTYGViewSteps.toggleAgentActionMenu(0);
|
|
90
91
|
// And: All actions should be available for compatible agents
|
|
91
|
-
TTYGViewSteps.
|
|
92
|
+
TTYGViewSteps.toggleAgentActionMenu(1);
|
|
92
93
|
TTYGViewSteps.getDeleteAgentButton(1).should('be.visible');
|
|
93
94
|
TTYGViewSteps.getCloneAgentButton(1).should('be.visible');
|
|
94
95
|
TTYGViewSteps.getEditAgentButton(1).should('be.visible');
|
|
95
96
|
});
|
|
97
|
+
|
|
98
|
+
it('should allow copy of External integration configuration from agent list', () => {
|
|
99
|
+
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-autocomplete-query.json');
|
|
100
|
+
TTYGStubs.getExternalUrl();
|
|
101
|
+
// Given I have opened the ttyg page
|
|
102
|
+
TTYGViewSteps.visit();
|
|
103
|
+
cy.wait('@get-agent-list');
|
|
104
|
+
// When I select an agent from the sidebar
|
|
105
|
+
TTYGViewSteps.expandAgentsSidebar();
|
|
106
|
+
TTYGViewSteps.toggleAgentActionMenu(0);
|
|
107
|
+
TTYGViewSteps.getExternalIntegrationConfigButton(0).should('be.visible');
|
|
108
|
+
TTYGViewSteps.openExternalIntegrationConfigButton(0);
|
|
109
|
+
cy.wait('@external-url');
|
|
110
|
+
// The url dialog should open
|
|
111
|
+
TtygAgentSettingsModalSteps.getExternalIntegrationModal().should('be.visible');
|
|
112
|
+
// The dialog should have all the fields
|
|
113
|
+
TtygAgentSettingsModalSteps.getAgentUrlField().invoke('val')
|
|
114
|
+
.then((val) => {
|
|
115
|
+
expect(val).to.equal('asst_G8EtHyT8kAGeDmCa3Nh6y74v');
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
TtygAgentSettingsModalSteps.getMethodUrlField().invoke('val')
|
|
119
|
+
.then((val) => {
|
|
120
|
+
expect(val).to.equal('http://user-pc:7200/rest/llm/tool/ttyg/asst_G8EtHyT8kAGeDmCa3Nh6y74v');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
TtygAgentSettingsModalSteps.getDifyUrlField().invoke('val')
|
|
124
|
+
.then((val) => {
|
|
125
|
+
expect(val).to.equal('http://user-pc:7200/rest/llm/ttyg/asst_G8EtHyT8kAGeDmCa3Nh6y74v/dify');
|
|
126
|
+
});
|
|
127
|
+
});
|
|
96
128
|
});
|
|
@@ -8,8 +8,7 @@ import {ChatPanelSteps} from "../../steps/ttyg/chat-panel-steps";
|
|
|
8
8
|
import {AlertDialogSteps} from "../../steps/alert-dialog-steps";
|
|
9
9
|
import {RepositoriesStub} from "../../stubs/repositories-stub";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
describe.skip('TTYG chat list', () => {
|
|
11
|
+
describe('TTYG chat list', () => {
|
|
13
12
|
|
|
14
13
|
beforeEach(() => {
|
|
15
14
|
RepositoriesStubs.stubRepositories(0, '/repositories/get-ttyg-repositories.json');
|
|
@@ -8,8 +8,7 @@ import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
|
8
8
|
import {RepositoriesStub} from "../../stubs/repositories-stub";
|
|
9
9
|
import {AlertDialogSteps} from "../../steps/alert-dialog-steps";
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
describe.skip('TTYG create new agent', () => {
|
|
11
|
+
describe('TTYG create new agent', () => {
|
|
13
12
|
const repositoryId = 'starwars';
|
|
14
13
|
|
|
15
14
|
beforeEach(() => {
|
|
@@ -106,12 +105,12 @@ describe.skip('TTYG create new agent', () => {
|
|
|
106
105
|
|
|
107
106
|
// Validate the other agent settings
|
|
108
107
|
|
|
109
|
-
//
|
|
110
|
-
TtygAgentSettingsModalSteps.
|
|
111
|
-
TtygAgentSettingsModalSteps.
|
|
108
|
+
// LLM model
|
|
109
|
+
TtygAgentSettingsModalSteps.getLLMModelField().should('have.value', 'gpt-4o');
|
|
110
|
+
TtygAgentSettingsModalSteps.clearLLMModel();
|
|
112
111
|
TtygAgentSettingsModalSteps.getSaveAgentButton().should('be.disabled');
|
|
113
|
-
TtygAgentSettingsModalSteps.
|
|
114
|
-
TtygAgentSettingsModalSteps.
|
|
112
|
+
TtygAgentSettingsModalSteps.getLLMModelError().should('be.visible').and('contain', 'This field is required');
|
|
113
|
+
TtygAgentSettingsModalSteps.typeLLMModel('gpt-4o');
|
|
115
114
|
|
|
116
115
|
// temperature
|
|
117
116
|
TtygAgentSettingsModalSteps.setTemperature('0.2');
|
|
@@ -149,6 +148,7 @@ describe.skip('TTYG create new agent', () => {
|
|
|
149
148
|
"name": "Test Agent",
|
|
150
149
|
"repositoryId": "starwars",
|
|
151
150
|
"model": "gpt-4o",
|
|
151
|
+
"contextSize": 128000,
|
|
152
152
|
"temperature": "0.2",
|
|
153
153
|
"topP": "0.2",
|
|
154
154
|
"seed": 0,
|
|
@@ -390,10 +390,7 @@ describe.skip('TTYG create new agent', () => {
|
|
|
390
390
|
TTYGViewSteps.getAgent(0).should('contain', 'Test Agent').and('contain', 'starwars');
|
|
391
391
|
});
|
|
392
392
|
|
|
393
|
-
|
|
394
|
-
* TODO: Fix me. Broken due to migration (Repository selector changed)
|
|
395
|
-
*/
|
|
396
|
-
it.skip('Should updates the ChatGPT form field when the repository is changed', () => {
|
|
393
|
+
it('Should updates the ChatGPT form field when the repository is changed', () => {
|
|
397
394
|
TTYGStubs.stubChatsListGetNoResults();
|
|
398
395
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
399
396
|
ConnectorStubs.stubGetConnectors();
|
|
@@ -431,10 +428,7 @@ describe.skip('TTYG create new agent', () => {
|
|
|
431
428
|
ModalDialogSteps.getDialogBody().contains('If you proceed with creating the ChatGPT Retrieval connector, GraphDB will open in a new tab and switch to the ttyg-repo-1725518186812 repository.');
|
|
432
429
|
});
|
|
433
430
|
|
|
434
|
-
|
|
435
|
-
* TODO: Fix me. Broken due to migration (Repository selector changed)
|
|
436
|
-
*/
|
|
437
|
-
it.skip('Should updates the similarity form field when the repository is changed', () => {
|
|
431
|
+
it('Should updates the similarity form field when the repository is changed', () => {
|
|
438
432
|
TTYGStubs.stubChatsListGetNoResults();
|
|
439
433
|
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-0.json');
|
|
440
434
|
ConnectorStubs.stubGetConnectors();
|
|
@@ -487,7 +481,7 @@ describe.skip('TTYG create new agent', () => {
|
|
|
487
481
|
TtygAgentSettingsModalSteps.setTemperature('1.2');
|
|
488
482
|
TtygAgentSettingsModalSteps.getTemperatureSliderField().should('have.value', '1.2');
|
|
489
483
|
// Then I should see a warning message
|
|
490
|
-
TtygAgentSettingsModalSteps.
|
|
484
|
+
TtygAgentSettingsModalSteps.scrollToTemperatureWarning().should('be.visible');
|
|
491
485
|
TtygAgentSettingsModalSteps.getTemperatureField().should('have.class', 'has-warning');
|
|
492
486
|
// When I change the temperature to value below 1.0
|
|
493
487
|
TtygAgentSettingsModalSteps.setTemperature('0.9');
|
|
@@ -32,10 +32,7 @@ describe('TTYG edit an agent', () => {
|
|
|
32
32
|
cy.wait('@get-agent-list');
|
|
33
33
|
cy.wait('@get-chat');
|
|
34
34
|
// When I select an agent that don't have activated additional extraction method
|
|
35
|
-
TTYGViewSteps.
|
|
36
|
-
TTYGViewSteps.openAgentsMenu();
|
|
37
|
-
TTYGViewSteps.selectAgent(0);
|
|
38
|
-
TTYGViewSteps.editCurrentAgent();
|
|
35
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
39
36
|
|
|
40
37
|
// Then I expect that the iri discovery checkbox is not checked
|
|
41
38
|
TtygAgentSettingsModalSteps.getIriDiscoverySearchCheckbox().should('not.be.checked');
|
|
@@ -54,7 +51,7 @@ describe('TTYG edit an agent', () => {
|
|
|
54
51
|
});
|
|
55
52
|
|
|
56
53
|
|
|
57
|
-
it
|
|
54
|
+
it('should be able to edit Autocomplete extraction method option', {
|
|
58
55
|
retries: {
|
|
59
56
|
runMode: 1,
|
|
60
57
|
openMode: 0
|
|
@@ -65,10 +62,7 @@ describe('TTYG edit an agent', () => {
|
|
|
65
62
|
TTYGViewSteps.visit();
|
|
66
63
|
cy.wait('@get-agent-list');
|
|
67
64
|
// When I select an agent that don't have activated additional extraction method
|
|
68
|
-
TTYGViewSteps.
|
|
69
|
-
TTYGViewSteps.openAgentsMenu();
|
|
70
|
-
TTYGViewSteps.selectAgent(0);
|
|
71
|
-
TTYGViewSteps.editCurrentAgent();
|
|
65
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
72
66
|
|
|
73
67
|
// Then I expect that the autocomplete iri discovery checkbox is not checked
|
|
74
68
|
TtygAgentSettingsModalSteps.getAutocompleteSearchCheckbox().should('not.be.checked');
|
|
@@ -106,4 +100,70 @@ describe('TTYG edit an agent', () => {
|
|
|
106
100
|
// Then: I expect the dialog be disappeared and the disabled message still visible
|
|
107
101
|
TtygAgentSettingsModalSteps.getAutocompleteDisabledMessage().should('be.visible');
|
|
108
102
|
});
|
|
103
|
+
|
|
104
|
+
it('should allow copy of External integration configuration', () => {
|
|
105
|
+
TTYGStubs.stubAgentListGet('/ttyg/agent/get-agent-list-autocomplete-query.json');
|
|
106
|
+
TTYGStubs.getExternalUrl();
|
|
107
|
+
// Given I have opened the ttyg page
|
|
108
|
+
TTYGViewSteps.visit();
|
|
109
|
+
cy.wait('@get-agent-list');
|
|
110
|
+
// When I select an agent
|
|
111
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
112
|
+
|
|
113
|
+
// Then I should see the External integration configuration button
|
|
114
|
+
TtygAgentSettingsModalSteps.getExtIntegrationConfigBtn().should('be.visible');
|
|
115
|
+
// When I click the button
|
|
116
|
+
TtygAgentSettingsModalSteps.openExtIntegrationConfig();
|
|
117
|
+
cy.wait('@external-url');
|
|
118
|
+
// The url dialog should open
|
|
119
|
+
TtygAgentSettingsModalSteps.getExternalIntegrationModal().should('be.visible');
|
|
120
|
+
// The dialog should have all the fields
|
|
121
|
+
TtygAgentSettingsModalSteps.getAgentUrlField().invoke('val')
|
|
122
|
+
.then((val) => {
|
|
123
|
+
expect(val).to.equal('asst_G8EtHyT8kAGeDmCa3Nh6y74v');
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
TtygAgentSettingsModalSteps.getMethodUrlField().invoke('val')
|
|
127
|
+
.then((val) => {
|
|
128
|
+
expect(val).to.equal('http://user-pc:7200/rest/llm/tool/ttyg/asst_G8EtHyT8kAGeDmCa3Nh6y74v');
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
TtygAgentSettingsModalSteps.getDifyUrlField().invoke('val')
|
|
132
|
+
.then((val) => {
|
|
133
|
+
expect(val).to.equal('http://user-pc:7200/rest/llm/ttyg/asst_G8EtHyT8kAGeDmCa3Nh6y74v/dify');
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
it('should show Context size if not openai-assistants API', () => {
|
|
138
|
+
// Open TTYG page and select first agent
|
|
139
|
+
TTYGViewSteps.visit();
|
|
140
|
+
TTYGStubs.stubForApiType('default');
|
|
141
|
+
cy.wait('@get-agent-list');
|
|
142
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
143
|
+
|
|
144
|
+
// Then I should see the Context size field
|
|
145
|
+
TtygAgentSettingsModalSteps.getContextSizeField().should('be.visible');
|
|
146
|
+
// When I clear the value
|
|
147
|
+
TtygAgentSettingsModalSteps.clearContextSize();
|
|
148
|
+
// And click another field
|
|
149
|
+
TtygAgentSettingsModalSteps.clickLLMModelField();
|
|
150
|
+
// Then the error for required should appear
|
|
151
|
+
TtygAgentSettingsModalSteps.getContextSizeError().should('be.visible');
|
|
152
|
+
// When I type a value
|
|
153
|
+
TtygAgentSettingsModalSteps.enterContextSize('120000');
|
|
154
|
+
// Then the error disappears
|
|
155
|
+
TtygAgentSettingsModalSteps.getContextSizeError().should('not.exist');
|
|
156
|
+
// I should be allowed to reset the value of the Context size
|
|
157
|
+
TtygAgentSettingsModalSteps.resetContextSizeValue();
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
it('should NOT show Context size if openai-assistants API', () => {
|
|
161
|
+
// Open TTYG page and select first agent
|
|
162
|
+
TTYGViewSteps.visit();
|
|
163
|
+
TTYGStubs.stubForApiType('assistants');
|
|
164
|
+
cy.wait('@get-agent-list');
|
|
165
|
+
TTYGViewSteps.openAgentSettingsModalForAgent(0);
|
|
166
|
+
// Then I should see the Context size field
|
|
167
|
+
TtygAgentSettingsModalSteps.getContextSizeField().should('not.exist');
|
|
168
|
+
});
|
|
109
169
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
|
|
2
|
+
import {MainMenuSteps} from "../../steps/main-menu-steps";
|
|
3
|
+
import HomeSteps from "../../steps/home-steps";
|
|
4
|
+
import {TTYGStubs} from "../../stubs/ttyg/ttyg-stubs";
|
|
5
|
+
|
|
6
|
+
function verifyStateWithApiKey() {
|
|
7
|
+
TTYGViewSteps.getChatListComponent().should('be.visible');
|
|
8
|
+
TTYGViewSteps.getChatPanel().should('be.visible');
|
|
9
|
+
TTYGViewSteps.getAgentsMenu().should('be.visible');
|
|
10
|
+
TTYGViewSteps.getEditCurrentAgentButton().should('be.visible');
|
|
11
|
+
TTYGViewSteps.getHelpButton().should('be.visible');
|
|
12
|
+
TTYGViewSteps.getCreateAgentButton().should('be.visible');
|
|
13
|
+
TTYGViewSteps.getToggleAgentsSidebarButton().should('be.visible');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
describe('TTYG initial state with API key', () => {
|
|
17
|
+
let repositoryId;
|
|
18
|
+
|
|
19
|
+
beforeEach(() => {
|
|
20
|
+
repositoryId = 'ttyg-api-key-init-' + Date.now();
|
|
21
|
+
cy.createRepository({id: repositoryId});
|
|
22
|
+
cy.presetRepository(repositoryId);
|
|
23
|
+
TTYGStubs.stubAgentListGet();
|
|
24
|
+
TTYGStubs.stubChatsListGet();
|
|
25
|
+
TTYGStubs.stubChatGet();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
afterEach(() => {
|
|
29
|
+
cy.deleteRepository(repositoryId);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
it('Should display the correct initial state when navigating via URL', () => {
|
|
33
|
+
// Given, I visit the TTYG page via URL
|
|
34
|
+
TTYGViewSteps.visit();
|
|
35
|
+
// Then,
|
|
36
|
+
verifyStateWithApiKey();
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
40
|
+
// Given, I visit the TTYG page via the navigation menu
|
|
41
|
+
HomeSteps.visit();
|
|
42
|
+
MainMenuSteps.clickOnTTYG();
|
|
43
|
+
// Then,
|
|
44
|
+
verifyStateWithApiKey();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
|
|
2
|
+
import {MainMenuSteps} from "../../steps/main-menu-steps";
|
|
3
|
+
import HomeSteps from "../../steps/home-steps";
|
|
4
|
+
|
|
5
|
+
function verifyStateWithSelectedRepository() {
|
|
6
|
+
TTYGViewSteps.getNoAgentsView().should('be.visible');
|
|
7
|
+
TTYGViewSteps.getCreateFirstAgentButton().should('be.visible');
|
|
8
|
+
TTYGViewSteps.getTtygInfoMessage().should('be.visible');
|
|
9
|
+
TTYGViewSteps.getTtygagentMessage().should('be.visible');
|
|
10
|
+
TTYGViewSteps.getApiKeyMessage().should('be.visible');
|
|
11
|
+
TTYGViewSteps.getMissingApiKeyToastMessage()
|
|
12
|
+
.should('be.visible')
|
|
13
|
+
.and('contain', 'Set the config property \'graphdb.llm.api-key\' to your LLM API key.');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// TODO: skipped until BE releases an updated version with the new API key.
|
|
17
|
+
// https://graphwise.atlassian.net/browse/GDB-12738
|
|
18
|
+
describe.skip('TTYG initial state with selected repository', () => {
|
|
19
|
+
let repositoryId;
|
|
20
|
+
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
repositoryId = 'ttyg-init-' + Date.now();
|
|
23
|
+
cy.createRepository({id: repositoryId});
|
|
24
|
+
cy.presetRepository(repositoryId);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
afterEach(() => {
|
|
28
|
+
cy.deleteRepository(repositoryId);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
it('Should display the correct initial state when navigating via URL', () => {
|
|
32
|
+
// Given, I visit the TTYG page via URL with a repository selected
|
|
33
|
+
TTYGViewSteps.visit();
|
|
34
|
+
// Then,
|
|
35
|
+
verifyStateWithSelectedRepository();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
39
|
+
// Given, I visit the TTYG page via the navigation menu with a repository selected
|
|
40
|
+
HomeSteps.visit();
|
|
41
|
+
MainMenuSteps.clickOnTTYG();
|
|
42
|
+
// Then,
|
|
43
|
+
verifyStateWithSelectedRepository();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {MainMenuSteps} from "../../steps/main-menu-steps";
|
|
2
|
+
import HomeSteps from "../../steps/home-steps";
|
|
3
|
+
import {TTYGViewSteps} from "../../steps/ttyg/ttyg-view-steps";
|
|
4
|
+
import {ErrorSteps} from "../../steps/error-steps";
|
|
5
|
+
|
|
6
|
+
describe('TTYG initial state without selected repository', () => {
|
|
7
|
+
it('Should display the correct initial state when navigating via URL', () => {
|
|
8
|
+
// Given, I visit the TTYG page via URL without a repository selected
|
|
9
|
+
TTYGViewSteps.visit();
|
|
10
|
+
// Then,
|
|
11
|
+
ErrorSteps.verifyNoConnectedRepoMessage();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
15
|
+
// Given, I visit the TTYG page via the navigation menu without a repository selected
|
|
16
|
+
HomeSteps.visit();
|
|
17
|
+
MainMenuSteps.clickOnTTYG();
|
|
18
|
+
// Then,
|
|
19
|
+
ErrorSteps.verifyNoConnectedRepoMessage();
|
|
20
|
+
});
|
|
21
|
+
});
|