graphdb-workbench-tests 2.8.0-Test → 2.8.1-RC1
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.config.js +4 -1
- package/fixtures/cluster/2-nodes-cluster-group-status-deleted.json +30 -0
- package/fixtures/cluster/2-nodes-cluster-group-status.json +30 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-after-replace.json +44 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-building-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-sending-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-waiting-for-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-with-tag.json +47 -0
- package/fixtures/cluster/3-nodes-cluster-group-status.json +12 -3
- package/fixtures/cluster/4-nodes-cluster-group-status.json +58 -0
- package/fixtures/cluster/cluster-config.json +1 -0
- package/fixtures/cluster/cluster-node-status.json +4 -1
- package/fixtures/cluster/no-cluster-group-status.json +2 -1
- package/fixtures/cluster/no-cluster-node-status.json +2 -1
- package/fixtures/cluster/save-cluster-configuration-response.json +10 -0
- package/fixtures/connectors/get-retrieval-connector.json +1 -1
- package/fixtures/connectors/get-ttyg-chatgpt-connectors.json +188 -0
- package/fixtures/locale-en.json +386 -103
- package/fixtures/remote-location/get-0-remote-locations.json +1 -2
- package/fixtures/remote-location/get-1-remote-locations.json +2 -4
- package/fixtures/remote-location/get-2-remote-locations.json +3 -6
- package/fixtures/remote-location/get-3-remote-locations.json +4 -8
- package/fixtures/remote-location/get-4-remote-locations.json +54 -0
- package/fixtures/remote-location/remote-location-status-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-location-status-not-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-locations-filter.json +1 -2
- package/fixtures/repositories/get-locations.json +5 -10
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/fixtures/repositories/get-ttyg-repositories.json +28 -0
- package/fixtures/security/get-admin-user.json +22 -0
- package/fixtures/similarity/get-ttyg-similarity-connectors.json +46 -0
- package/fixtures/ttyg/agent/create-agent.json +2 -1
- package/fixtures/ttyg/agent/get-agent-defaults.json +42 -0
- package/fixtures/ttyg/agent/get-agent-list-after-deleted.json +1 -1
- package/fixtures/ttyg/agent/get-agent-list-new-agent.json +2 -73
- package/fixtures/ttyg/agent/get-agent-list.json +1 -1
- package/fixtures/ttyg/agent/get-agent.json +25 -0
- package/fixtures/ttyg/chats/ask-question.json +25 -0
- package/fixtures/ttyg/chats/create/create-chat-response.json +16 -0
- package/fixtures/ttyg/chats/create/get-chats-after-create.json +12 -0
- package/fixtures/ttyg/chats/create/get-chats-before-create.json +7 -0
- package/fixtures/ttyg/chats/explain-response-1.json +59 -0
- package/fixtures/ttyg/chats/explain-response-2.json +59 -0
- package/fixtures/ttyg/chats/get-chat.json +199 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +97 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +70 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-properties.spec.js +95 -0
- package/integration/cluster/cluster-configuration/cluster-configuration.spec.js +38 -0
- package/integration/cluster/cluster-legend.spec.js +1 -0
- package/integration/cluster/edit-cluster-nodes-modal.spec.js +425 -0
- package/integration/explore/graphs.overview.spec.js +4 -0
- package/integration/explore/{similariti-index-create.spec.js → similarity-index/similarity-index-create.spec.js} +4 -4
- package/integration/explore/{similarity-index.spec.js → similarity-index/similarity-index.spec.js} +6 -6
- package/integration/explore/{similarity.spec.js → similarity-index/similarity.spec.js} +7 -8
- package/integration/explore/visual-graph/visual.graph.spec.js +34 -35
- package/integration/home/cookie-policy.spec.js +83 -0
- package/integration/home/create-repository.spec.js +35 -0
- package/integration/home/documentation-link.spec.js +60 -0
- package/integration/home/google-analytics.spec.js +60 -0
- package/integration/home/language-selector.spec.js +19 -0
- package/integration/home/rdf-resource-search.spec.js +192 -0
- package/integration/home/view-resource-autocomplete.spec.js +52 -0
- package/integration/home/workbench.home.spec.js +1 -277
- package/integration/import/import-user-data-file-upload.spec.js +13 -0
- package/integration/import/import-user-data.spec.js +6 -1
- package/integration/import/import-view.spec.js +6 -1
- package/integration/license/license.spec.js +26 -0
- package/integration/repository/attach-remote-location.spec.js +94 -40
- package/integration/repository/repositories.spec.js +40 -7
- package/integration/setup/autocomplete.spec.js +21 -70
- package/integration/setup/{jdbc-create.spec.js → jdbc/jdbc-create.spec.js} +9 -10
- package/integration/setup/{jdbc.spec.js → jdbc/jdbc.spec.js} +56 -25
- package/integration/setup/my-settings.spec.js +13 -21
- package/integration/setup/namespaces.spec.js +132 -264
- package/integration/setup/plugins.spec.js +22 -51
- package/integration/setup/rdf-rank.spec.js +42 -138
- package/integration/ttyg/agent-list.spec.js +27 -25
- package/integration/ttyg/agent-select-menu.spec.js +18 -16
- package/integration/ttyg/chat-list.spec.js +72 -9
- package/integration/ttyg/chat-panel.spec.js +106 -10
- package/integration/ttyg/clone-agent.spec.js +8 -4
- package/integration/ttyg/create-agent.spec.js +303 -51
- package/integration/ttyg/create-chat.spec.js +68 -0
- package/integration/ttyg/delete-agent.spec.js +6 -5
- package/integration/ttyg/edit-agent.spec.js +16 -5
- package/integration/ttyg/ttyg-permission.spec.js +66 -0
- package/integration/ttyg/ttyg-view.spec.js +8 -4
- package/npm-shrinkwrap.json +215 -220
- package/package.json +5 -6
- package/steps/alert-dialog-steps.js +25 -0
- package/steps/cluster/cluster-configuration-steps.js +173 -5
- package/steps/cluster/cluster-page-steps.js +8 -0
- package/steps/cluster/custer-nodes-configuration-steps.js +107 -0
- package/steps/guides/guide-steps.js +1 -1
- package/steps/home-steps.js +48 -5
- package/steps/import/import-steps.js +11 -7
- package/steps/license-steps.js +25 -0
- package/steps/repositories/attach-repository-steps.js +33 -0
- package/steps/repository-steps.js +40 -11
- package/steps/setup/autocomplete-steps.js +59 -0
- package/steps/setup/namespace-steps.js +211 -0
- package/steps/setup/plugins-steps.js +37 -0
- package/steps/setup/rdf-rank-steps.js +106 -0
- package/steps/setup/settings-steps.js +17 -0
- package/steps/ttyg/chat-panel-steps.js +31 -6
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +82 -4
- package/steps/ttyg/ttyg-view-steps.js +77 -3
- package/steps/visual-graph-steps.js +29 -1
- package/steps/yasgui/yasqe-steps.js +3 -0
- package/stubs/cluster/cluster-stubs.js +162 -7
- package/stubs/cluster/remote-location-stubs.js +46 -0
- package/stubs/connector-stubs.js +24 -0
- package/stubs/environment-stubs.js +27 -0
- package/stubs/jdbc/jdbc-stubs.js +19 -0
- package/stubs/license-stubs.js +112 -0
- package/stubs/namespace-stubs.js +5 -0
- package/stubs/repositories/repositories-stubs.js +11 -8
- package/stubs/repositories-stub.js +15 -0
- package/stubs/security-stubs.js +29 -0
- package/stubs/setup/plugins-stubs.js +5 -0
- package/stubs/similarity-index-stubs.js +25 -0
- package/stubs/stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +79 -40
- package/support/commands.js +2 -0
- package/support/index.js +18 -0
- package/support/security-command.js +25 -0
- package/support/settings-commands.js +4 -5
- package/support/user-commands.js +31 -0
- package/fixtures/ttyg/chats/get-chat-1.json +0 -43
- package/integration/cluster/cluster-management.spec.js +0 -220
- package/steps/autocomplete-steps.js +0 -10
- package/steps/cluster/add-remote-location-dialog-steps.js +0 -11
- package/steps/cluster/create-cluster-dialog-steps.js +0 -39
- package/steps/cluster/replace-nodes-dialog-steps.js +0 -39
|
@@ -3,7 +3,7 @@ import {REPOSITORIES_URL} from "../support/repository-commands";
|
|
|
3
3
|
export class RepositorySteps {
|
|
4
4
|
|
|
5
5
|
static visit() {
|
|
6
|
-
cy.intercept('/rest/locations
|
|
6
|
+
cy.intercept('/rest/locations').as('getLocations');
|
|
7
7
|
cy.intercept(REPOSITORIES_URL + 'all').as('getRepositories');
|
|
8
8
|
cy.visit('/repository');
|
|
9
9
|
RepositorySteps.waitLoader();
|
|
@@ -85,6 +85,16 @@ export class RepositorySteps {
|
|
|
85
85
|
RepositorySteps.clickRepositoryIcon(repositoryId, '.repository-actions .restart-repository-btn');
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
static getEditViewRestartButton() {
|
|
89
|
+
return cy.get('#restartRepo');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static getRepositoryRestartButton(repositoryId) {
|
|
93
|
+
return RepositorySteps.getRepositoryFromList(repositoryId)
|
|
94
|
+
.should('be.visible')
|
|
95
|
+
.find('.repository-actions .restart-repository-btn');
|
|
96
|
+
}
|
|
97
|
+
|
|
88
98
|
static createRepository() {
|
|
89
99
|
RepositorySteps.getCreateRepositoryButton().click();
|
|
90
100
|
}
|
|
@@ -227,26 +237,48 @@ export class RepositorySteps {
|
|
|
227
237
|
.and('contain', 'Local');
|
|
228
238
|
}
|
|
229
239
|
|
|
230
|
-
static
|
|
231
|
-
return cy.get('#wb-repositories-ontopic-repositoryInGetRepositories');
|
|
240
|
+
static getSparqlOntopicTable() {
|
|
241
|
+
return cy.get('#wb-repositories-ontopic-sparql-repositoryInGetRepositories');
|
|
232
242
|
}
|
|
233
243
|
|
|
234
244
|
static getDeleteOntopicInstanceBtn(url) {
|
|
235
|
-
return RepositorySteps.
|
|
245
|
+
return RepositorySteps.getSparqlOntopicTable().find('tr').contains(url).parent().parent().find('.delete-ontopic-location');
|
|
236
246
|
}
|
|
237
247
|
|
|
238
248
|
static deleteOntopicInstance(url) {
|
|
239
249
|
RepositorySteps.getDeleteOntopicInstanceBtn(url).click();
|
|
240
250
|
}
|
|
241
251
|
|
|
252
|
+
static getDeleteSparqlInstanceBtn(url) {
|
|
253
|
+
return RepositorySteps.getSparqlOntopicTable().find('tr').contains(url).parent().parent().find('.delete-sparql-location');
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
static deleteSparqlLocation(url) {
|
|
257
|
+
RepositorySteps.getDeleteSparqlInstanceBtn(url).click();
|
|
258
|
+
}
|
|
259
|
+
|
|
242
260
|
static getEditOntopicInstanceBtn(url) {
|
|
243
|
-
return RepositorySteps.
|
|
261
|
+
return RepositorySteps.getSparqlOntopicTable().find('tr').contains(url).parent().parent().find('.edit-ontopic-location');
|
|
244
262
|
}
|
|
245
263
|
|
|
246
264
|
static editOntopicInstance(url) {
|
|
247
265
|
RepositorySteps.getEditOntopicInstanceBtn(url).click();
|
|
248
266
|
}
|
|
249
267
|
|
|
268
|
+
static getEditSparqlInstanceBtn(row) {
|
|
269
|
+
return cy.get('#wb-repositories-ontopic-sparql-repositoryInGetRepositories tbody tr')
|
|
270
|
+
.eq(row)
|
|
271
|
+
.find('.edit-sparql-location');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static editSparqlInstance(row) {
|
|
275
|
+
RepositorySteps.getEditSparqlInstanceBtn(row).click();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
static getRestartRemoteRepoButton(row) {
|
|
279
|
+
return this.getRemoteGraphDBTable().eq(row).find('.repository-actions .restart-repository-btn');
|
|
280
|
+
}
|
|
281
|
+
|
|
250
282
|
static getRemoteGraphDBTable() {
|
|
251
283
|
return cy.get('#wb-locations-locationInGetRemoteLocations');
|
|
252
284
|
}
|
|
@@ -268,11 +300,8 @@ export class RepositorySteps {
|
|
|
268
300
|
}
|
|
269
301
|
|
|
270
302
|
static assertRepositoryStatus(repositoryId, status) {
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
.find('.repository-status .text-secondary')
|
|
275
|
-
.then(($el) => $el)
|
|
276
|
-
.then(($el) => $el && $el.text() === status));
|
|
303
|
+
RepositorySteps.getRepositoryFromList(repositoryId).as('repo');
|
|
304
|
+
cy.get('@repo').should('be.visible');
|
|
305
|
+
cy.get('@repo').find('.repository-status .text-secondary').contains(status);
|
|
277
306
|
}
|
|
278
307
|
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export class AutocompleteSteps {
|
|
2
|
+
|
|
3
|
+
static visit() {
|
|
4
|
+
cy.visit('/autocomplete');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static waitUntilAutocompletePageIsLoaded() {
|
|
8
|
+
// Workbench loading screen should not be visible
|
|
9
|
+
cy.get('.ot-splash').should('not.be.visible');
|
|
10
|
+
|
|
11
|
+
// No active loader
|
|
12
|
+
cy.get('.ot-loader').should('not.exist');
|
|
13
|
+
|
|
14
|
+
// No warnings should be present
|
|
15
|
+
this.getAutocompletePage().find('.alert-warning').should('not.be.visible');
|
|
16
|
+
|
|
17
|
+
this.getAutocompleteIndex().should('be.visible');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static getAutocompletePage() {
|
|
21
|
+
return cy.get('#autocomplete');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getAutocompleteIndex() {
|
|
25
|
+
return this.getAutocompletePage().find('#toggleIndex');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static getAutocompleteHeader() {
|
|
29
|
+
return this.getAutocompleteIndex().find('.autocomplete-header');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getAutocompleteSwitch() {
|
|
33
|
+
return this.getAutocompleteIndex().find('.autocomplete-switch');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getAutocompleteStatus() {
|
|
37
|
+
return this.getAutocompleteIndex().find('.autocomplete-status');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getBuildButton() {
|
|
41
|
+
return this.getAutocompleteIndex().find('.build-index-btn');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static getToggleIRIButton() {
|
|
45
|
+
return this.getAutocompletePage().find('#toggleIRIs');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static getAddLabelButton() {
|
|
49
|
+
return this.getAutocompletePage().find('#wb-autocomplete-addLabel');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static getAutocompleteLabels() {
|
|
53
|
+
return this.getAutocompletePage().find('#wb-autocomplete-labels');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static getSuccessStatusElement() {
|
|
57
|
+
return cy.get('.autocomplete-status').find('.tag.tag-success.ng-binding');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
export class NamespaceSteps {
|
|
2
|
+
static visit() {
|
|
3
|
+
cy.visit('/namespaces');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
static getNamespacesView() {
|
|
7
|
+
return cy.get('#wb-namespaces');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// ------ Generic ------
|
|
11
|
+
|
|
12
|
+
static waitUntilPageIsLoaded() {
|
|
13
|
+
// Workbench loading screen should not be visible
|
|
14
|
+
cy.get('.ot-splash').should('not.be.visible');
|
|
15
|
+
|
|
16
|
+
// No active loader
|
|
17
|
+
cy.get('.ot-loader').should('not.be.visible');
|
|
18
|
+
|
|
19
|
+
this.getAddNamespaceForm().should('be.visible');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getNoNamespacesAlert() {
|
|
23
|
+
return this.getNamespacesView().find('.no-namespaces-alert');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static getNoNamespacesMatchAlert() {
|
|
27
|
+
return this.getNamespacesView().find('.no-namespaces-match-alert');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// ------ Add namespaces ------
|
|
31
|
+
|
|
32
|
+
static getAddNamespaceForm() {
|
|
33
|
+
return this.getNamespacesView().find('.add-namespace-form');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getNamespacePrefixField() {
|
|
37
|
+
return this.getAddNamespaceForm().find('#wb-namespaces-prefix');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static typeNamespacePrefix(prefix) {
|
|
41
|
+
this.getNamespacePrefixField().type(prefix);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static getNamespaceValueField() {
|
|
45
|
+
return this.getAddNamespaceForm().find('#wb-namespaces-namespace');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static typeNamespaceURI(uri) {
|
|
49
|
+
this.getNamespaceValueField().type(uri);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static getAddNamespaceButton() {
|
|
53
|
+
return this.getAddNamespaceForm().find('#wb-namespaces-addNamespace');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static addNamespace() {
|
|
57
|
+
this.getAddNamespaceButton().click();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// ------ Namespaces per page ------
|
|
61
|
+
|
|
62
|
+
static getNamespacesPerPageMenu() {
|
|
63
|
+
return cy.get('.namespaces-per-page-menu');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// ------ Namespaces results header ------
|
|
67
|
+
|
|
68
|
+
static getNamespacesResultHeader() {
|
|
69
|
+
return cy.get('.namespaces-result-header');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static getNamespacesFilterField() {
|
|
73
|
+
return this.getNamespacesResultHeader().find('.namespaces-filter');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static getNamespacesHeaderPagination() {
|
|
77
|
+
return this.getNamespacesResultHeader().find('.namespaces-header-pagination .pagination');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static getNamespacesHeaderPaginationInfo() {
|
|
81
|
+
return this.getNamespacesResultHeader().find('.showing-info-namespaces');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ------ Namespaces results ------
|
|
85
|
+
|
|
86
|
+
static getNamespacesTable() {
|
|
87
|
+
return cy.get('#wb-namespaces-namespaceInNamespaces');
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static getSelectAllNamespacesCheckbox() {
|
|
91
|
+
return this.getNamespacesTable().find('.select-all-namespaces');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static getDeleteNamespacesButton() {
|
|
95
|
+
return this.getNamespacesTable().get('[data-cy="delete-several-prefixes"]');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static getNamespaces() {
|
|
99
|
+
return this.getNamespacesTable().find('.namespace');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static getNamespacePrefix(index) {
|
|
103
|
+
return this.getNamespaces().eq(index).find('.namespace-prefix').invoke('text');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static getNamespaceValue(index) {
|
|
107
|
+
return this.getNamespaces().eq(index).find('.namespaceURI').invoke('text');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static getRefreshedTableNamespaces() {
|
|
111
|
+
cy.get('[data-cy="namespaces-per-page-menu"]').click()
|
|
112
|
+
.get('[data-cy="all-label"]').click();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static getNamespace(prefix) {
|
|
116
|
+
return this.getNamespacesTable().find('.namespace')
|
|
117
|
+
.should('be.visible')
|
|
118
|
+
.find('.namespace-prefix')
|
|
119
|
+
.should('be.visible')
|
|
120
|
+
.contains(prefix)
|
|
121
|
+
.should('be.visible')
|
|
122
|
+
.parentsUntil('tbody')
|
|
123
|
+
.last();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static getSelectNamespaceCheckbox(prefix) {
|
|
127
|
+
return this.getNamespace(prefix)
|
|
128
|
+
.should('be.visible')
|
|
129
|
+
.find('.select-namespace');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static selectNamespace(prefix) {
|
|
133
|
+
this.getSelectNamespaceCheckbox(prefix).click();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
static getEditNamespaceButton(prefix) {
|
|
137
|
+
return this.getNamespace(prefix)
|
|
138
|
+
.should('be.visible')
|
|
139
|
+
.find('.edit-namespace-btn');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static editNamespaceByIndex(index) {
|
|
143
|
+
this.getNamespaces().eq(index).find('.edit-namespace-btn').click();
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static getInlineNamespacePrefix(index) {
|
|
147
|
+
return this.getNamespaces().eq(index).find('.namespace-prefix').siblings('.editable-text').find('input');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
static typeInlineNamespacePrefix(index, prefix) {
|
|
151
|
+
this.getInlineNamespacePrefix(index).clear().type(prefix);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
static getInlineNamespaceValue(index) {
|
|
155
|
+
return this.getNamespaces().eq(index).find('.namespaceURI').siblings('.editable-url').find('input');
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
static typeInlineNamespaceValue(index, namespace) {
|
|
159
|
+
this.getInlineNamespaceValue(index).clear().type(namespace);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
static getSaveInlineNamespaceButton(index) {
|
|
163
|
+
return this.getNamespaces().eq(index).find('button[type="submit"]');
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static saveInlineNamespace(index) {
|
|
167
|
+
this.getSaveInlineNamespaceButton(index).click();
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// TODO: Not used yet
|
|
171
|
+
static editNamespace(prefix) {
|
|
172
|
+
this.getEditNamespaceButton(prefix).click();
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
static getDeleteNamespaceButton(prefix) {
|
|
176
|
+
return this.getNamespace(prefix)
|
|
177
|
+
.should('be.visible')
|
|
178
|
+
.get(`[data-cy="delete-pref_${prefix}"]`)
|
|
179
|
+
.should('be.visible');
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static deleteNamespace(prefix) {
|
|
183
|
+
this.getDeleteNamespaceButton(prefix).should('be.visible').click();
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ------ Namespaces pagination ------
|
|
187
|
+
|
|
188
|
+
static getNamespacesPagination() {
|
|
189
|
+
return this.getNamespacesView().find('.namespaces-pagination .pagination');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
static getDefaultNamespacesLength(namespacesObject) {
|
|
193
|
+
return Object.keys(namespacesObject).length;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
static getPagingCount(namespacesObject) {
|
|
197
|
+
const count = this.getDefaultNamespacesLength(namespacesObject);
|
|
198
|
+
if (count <= 10) {
|
|
199
|
+
return 1;
|
|
200
|
+
}
|
|
201
|
+
if (count <= 20) {
|
|
202
|
+
return 2;
|
|
203
|
+
}
|
|
204
|
+
if (count <= 50) {
|
|
205
|
+
return 3;
|
|
206
|
+
}
|
|
207
|
+
if (count <= 100) {
|
|
208
|
+
return 4;
|
|
209
|
+
} else return 5;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export class PluginsSteps {
|
|
2
|
+
static visit() {
|
|
3
|
+
cy.visit('/plugins');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
static getPluginsView() {
|
|
7
|
+
return cy.get('#plugins');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static waitUntilPluginsPageIsLoaded() {
|
|
11
|
+
// Workbench loading screen should not be visible
|
|
12
|
+
cy.get('.ot-splash').should('not.be.visible');
|
|
13
|
+
|
|
14
|
+
// No active loader
|
|
15
|
+
cy.get('.ot-loader').should('not.exist');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static getPluginByName(name) {
|
|
19
|
+
return this.getPluginsView().find('.plugin').contains(name).parent();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getPluginStatus(name) {
|
|
23
|
+
return this.getPluginByName(name).find('.tag-primary');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static getPluginSwitch(name) {
|
|
27
|
+
return this.getPluginByName(name).find('.plugins-switch');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static getPluginSwitchField(name) {
|
|
31
|
+
return this.getPluginSwitch(name).find('input');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static togglePlugin(name) {
|
|
35
|
+
this.getPluginSwitch(name).click();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
|
|
2
|
+
export class RdfRankSteps {
|
|
3
|
+
static visit() {
|
|
4
|
+
cy.visit('/rdfrank');
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static getRdfRankView() {
|
|
8
|
+
return cy.get('#rdfRank');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static waitUntilRdfRankPageIsLoaded() {
|
|
12
|
+
// Workbench loading screen should not be visible
|
|
13
|
+
cy.get('.ot-splash').should('not.be.visible');
|
|
14
|
+
|
|
15
|
+
// No active loader
|
|
16
|
+
cy.get('.ot-loader').should('not.exist');
|
|
17
|
+
|
|
18
|
+
this.getRdfRankPage().find('.alert-warning').should('not.be.visible');
|
|
19
|
+
|
|
20
|
+
this.getFilteringSwitch().scrollIntoView().should('be.visible');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getRdfRankPage() {
|
|
24
|
+
return cy.get('#rdfRank');
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getRdfStatusHeader() {
|
|
28
|
+
return this.getRdfRankPage().find('#toggleIndex');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static getRdfStatusTags() {
|
|
32
|
+
return this.getRdfStatusHeader().find('.tag');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getComputeFullButton() {
|
|
36
|
+
return this.getRdfStatusHeader().find('.compute-rdf-rank-btn');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static computeRdfRank() {
|
|
40
|
+
this.getComputeFullButton().click();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getFilteringMode() {
|
|
44
|
+
return this.getRdfRankPage().find('#toggleFilterMode');
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getFilteringSwitch() {
|
|
48
|
+
return this.getFilteringMode().find('.rdf-rank-filter-switch');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getFilteringSwitchInput() {
|
|
52
|
+
return this.getFilteringSwitch().find('input');
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static enableFiltering() {
|
|
56
|
+
this.getFilteringSwitch().click();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static getFilteringConfig() {
|
|
60
|
+
return this.getRdfRankPage().find('#filterConfig');
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static getIncludeExplicitSwitch() {
|
|
64
|
+
return this.getFilteringConfig().find('#toggleIncludeExplicit');
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static getIncludeImplicitSwitch() {
|
|
68
|
+
return this.getFilteringConfig().find('#toggleIncludeImplicit');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static getFilteringConfigTabs() {
|
|
72
|
+
return this.getFilteringConfig().find('.nav li');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static getGraphsConfigTab() {
|
|
76
|
+
return this.getFilteringConfigTabs().eq(0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static getPredicatesConfigTab() {
|
|
80
|
+
return this.getFilteringConfigTabs().eq(1);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static openPredicatesConfigTab() {
|
|
84
|
+
this.getPredicatesConfigTab().find('.nav-item').click();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static getIncludedGraphsFilter() {
|
|
88
|
+
return this.getFilteringConfig().find('.included-graphs-filter');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static getExcludedGraphsFilter() {
|
|
92
|
+
return this.getFilteringConfig().find('.excluded-graphs-filter');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static getIncludedPredicatesFilter() {
|
|
96
|
+
return this.getFilteringConfig().find('.included-predicates-filter');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static getExcludedPredicatesFilter() {
|
|
100
|
+
return this.getFilteringConfig().find('.excluded-predicates-filter');
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static getToast() {
|
|
104
|
+
return cy.get('#toast-container');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class SettingsSteps {
|
|
2
|
+
static visit() {
|
|
3
|
+
cy.visit('/settings');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
static getCookiePolicyButton() {
|
|
7
|
+
return cy.get('.show-cookie-policy-btn');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static clickCookiePolicyLink() {
|
|
11
|
+
return SettingsSteps.getCookiePolicyButton().click();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static getCookiePolicyModal() {
|
|
15
|
+
return cy.get('.cookie-policy-modal');
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -12,8 +12,8 @@ export class ChatPanelSteps {
|
|
|
12
12
|
return ChatPanelSteps.getChatDetailsElements().eq(index).scrollIntoView();
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
static getChatDetailActions(
|
|
16
|
-
return ChatPanelSteps.getChatDetailElement(
|
|
15
|
+
static getChatDetailActions(chatDetailIndex = 0, answerIndex = 0) {
|
|
16
|
+
return ChatPanelSteps.getChatDetailElement(chatDetailIndex).find('.actions').eq(answerIndex);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
static getQuestionInputElement() {
|
|
@@ -28,10 +28,35 @@ export class ChatPanelSteps {
|
|
|
28
28
|
return ChatPanelSteps.getChatDetailElement(index).find('.question');
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
static regenerateQuestion(index) {
|
|
32
|
-
ChatPanelSteps.getChatDetailActions(index).find('.regenerate-question-btn').scrollIntoView().click();
|
|
31
|
+
static regenerateQuestion(index, answerIndex = 0) {
|
|
32
|
+
ChatPanelSteps.getChatDetailActions(index, answerIndex).find('.regenerate-question-btn').scrollIntoView().click();
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
|
|
35
|
+
static copyAnswer(index, answerIndex = 0) {
|
|
36
|
+
ChatPanelSteps.getChatDetailActions(index, answerIndex).find('.copy-answer-btn').click({force: true});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getAgentInfoMessages() {
|
|
40
|
+
return ChatPanelSteps.getChatPanel().find('.agent-changed-info');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getAgentInfoMessage(index = 0) {
|
|
44
|
+
return ChatPanelSteps.getAgentInfoMessages().eq(index);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getOpenInSparqlEditorElements() {
|
|
48
|
+
return ChatPanelSteps.getChatPanel().find('open-in-sparql-editor');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getOpenInSparqlEditorElement(index = 0) {
|
|
52
|
+
return ChatPanelSteps.getOpenInSparqlEditorElements().eq(index);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static getCopyToClipboardElements() {
|
|
56
|
+
return ChatPanelSteps.getChatPanel().find('copy-to-clipboard');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static getCopyToClipboardElement(index = 0) {
|
|
60
|
+
return ChatPanelSteps.getCopyToClipboardElements().eq(index);
|
|
36
61
|
}
|
|
37
62
|
}
|