graphdb-workbench-tests 3.2.0 → 3.3.0-TR2
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-security.config.js +12 -5
- package/e2e-legacy/explore/class-relationships/class-relationships.spec.js +1 -1
- package/e2e-legacy/home/cookie-policy.spec.js +8 -8
- package/e2e-legacy/home/rdf-resource-search.spec.js +12 -0
- package/e2e-legacy/setup/rdf-rank/rdf-rank.spec.js +2 -4
- package/e2e-legacy/setup/settings/my-settings.spec.js +46 -58
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +8 -3
- package/e2e-legacy/sparql-editor/actions/inferred-sameas.spec.js +3 -3
- package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +13 -16
- package/e2e-legacy/sparql-editor/yasqe-themes.spec.js +54 -0
- package/e2e-legacy/ttyg/agent-list.spec.js +1 -2
- package/e2e-legacy/ttyg/agent-select-menu.spec.js +1 -2
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
- package/e2e-legacy/ttyg/chat-panel.spec.js +1 -2
- package/e2e-legacy/ttyg/clone-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/create-agent.spec.js +2 -3
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -2
- package/e2e-legacy/ttyg/delete-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/edit-agent.spec.js +1 -2
- package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -6
- package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -2
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +16 -7
- package/e2e-security/setup/users-and-access/graphql-user.spec.js +6 -3
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -0
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +3 -3
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +8 -8
- package/fixtures/ttyg/agent/get-similarity-indexes-for-another-repo.json +5 -3
- package/fixtures/ttyg/agent/get-similarity-indexes.json +17 -8
- package/npm-shrinkwrap.json +47 -47
- package/package.json +1 -1
- package/steps/application-steps.js +7 -5
- package/steps/class-views-steps.js +2 -3
- package/steps/home-steps.js +37 -29
- package/steps/login-steps.js +13 -4
- package/steps/repository-steps.js +4 -0
- package/steps/setup/rdf-rank-steps.js +0 -4
- package/steps/setup/user-and-access-steps.js +6 -10
- package/steps/sparql-editor-steps.js +5 -0
- package/steps/toaster-steps.js +18 -6
- package/steps/yasgui/yasqe-steps.js +6 -0
- package/stubs/repositories/repositories-stubs.js +151 -76
- package/support/e2e.js +3 -0
- package/support/repository-commands.js +9 -0
- package/support/settings-commands.js +16 -0
- package/stubs/repositories-stub.js +0 -73
- /package/e2e-legacy/graphql/{graphql-endpoint-management-with-selected-repository.spec.jsx → graphql-endpoint-management-with-selected-repository.spec.js} +0 -0
|
@@ -20,6 +20,8 @@ Cypress.Commands.add('createRepository', (options = {}) => {
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
Cypress.Commands.add('deleteRepository', (id, secured = false) => {
|
|
23
|
+
// unset the repository before delete to avoid missing repo errors
|
|
24
|
+
unsetRepository();
|
|
23
25
|
// Note: Going through /rest/repositories because it would not fail if the repo is missing
|
|
24
26
|
const url = REPOSITORIES_URL + '/' + id;
|
|
25
27
|
|
|
@@ -94,6 +96,8 @@ Cypress.Commands.add('getNamespaces', (id) => {
|
|
|
94
96
|
});
|
|
95
97
|
});
|
|
96
98
|
|
|
99
|
+
Cypress.Commands.add('unsetRepository', () => unsetRepository())
|
|
100
|
+
|
|
97
101
|
const toggleAutocomplete = (repositoryId, enable) => {
|
|
98
102
|
cy.request({
|
|
99
103
|
method: 'POST',
|
|
@@ -117,3 +121,8 @@ const waitAutocomplete = function (repositoryId) {
|
|
|
117
121
|
}
|
|
118
122
|
}).then((response) => response.status === 200 && (response.body === 'READY' || response.body === 'NONE')));
|
|
119
123
|
};
|
|
124
|
+
|
|
125
|
+
const unsetRepository = () => {
|
|
126
|
+
cy.removeLocalStorage(PRESET_REPO);
|
|
127
|
+
cy.log('Unset repository');
|
|
128
|
+
}
|
|
@@ -18,3 +18,19 @@ Cypress.Commands.add('setDefaultUserData', (cookieConsent = true) => {
|
|
|
18
18
|
cy.waitUntil(() => response && response.status === 200); // 201 Created
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
+
|
|
22
|
+
Cypress.Commands.add('setCookieConsent', (cookieConsent) => {
|
|
23
|
+
const defaultUserSettings = {
|
|
24
|
+
'COOKIE_CONSENT': cookieConsent
|
|
25
|
+
};
|
|
26
|
+
cy.request({
|
|
27
|
+
method: 'PATCH',
|
|
28
|
+
url: `rest/security/users/${encodeURIComponent('admin')}`,
|
|
29
|
+
body: {
|
|
30
|
+
"appSettings": defaultUserSettings,
|
|
31
|
+
'password': 'root'
|
|
32
|
+
}
|
|
33
|
+
}).then((response) => {
|
|
34
|
+
cy.waitUntil(() => response && response.status === 200); // 201 Created
|
|
35
|
+
});
|
|
36
|
+
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import {GlobalOperationsStatusesStub} from "./global-operations-statuses-stub";
|
|
2
|
-
|
|
3
|
-
export class RepositoriesStub {
|
|
4
|
-
|
|
5
|
-
static stubOntopRepository(repositoryId) {
|
|
6
|
-
const alRepositoryResponse = {
|
|
7
|
-
"":[{
|
|
8
|
-
"id": repositoryId,
|
|
9
|
-
"title": "",
|
|
10
|
-
"uri": `http://b:9000/repositories/${repositoryId}`,
|
|
11
|
-
"externalUrl": `http://b:9000/repositories/${repositoryId}`,
|
|
12
|
-
"local": true,
|
|
13
|
-
"type": "ontop",
|
|
14
|
-
"sesameType": "graphdb:OntopRepository",
|
|
15
|
-
"location": "",
|
|
16
|
-
"readable": true,
|
|
17
|
-
"writable": true,
|
|
18
|
-
"unsupported": false,
|
|
19
|
-
"state": "RUNNING"
|
|
20
|
-
}]};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
cy.intercept('GET', '/rest/repositories/all', {
|
|
24
|
-
statusCode: 200,
|
|
25
|
-
body: alRepositoryResponse
|
|
26
|
-
}).as('all-repositories');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @param {string} repositoryId
|
|
31
|
-
* @param {[]}namespaces - An instance of array object have to be:
|
|
32
|
-
* {
|
|
33
|
-
* "prefix" : {
|
|
34
|
-
* "type" : "literal",
|
|
35
|
-
* "value" : "agg"
|
|
36
|
-
* },
|
|
37
|
-
* "namespace" : {
|
|
38
|
-
* "type" : "literal",
|
|
39
|
-
* "value" : "http://jena.apache.org/ARQ/function/aggregate#"
|
|
40
|
-
* }
|
|
41
|
-
* }
|
|
42
|
-
*/
|
|
43
|
-
static stubNameSpaces(repositoryId, namespaces = []) {
|
|
44
|
-
const namespacesResponse = `{
|
|
45
|
-
"head" : {
|
|
46
|
-
"vars" : [
|
|
47
|
-
"prefix",
|
|
48
|
-
"namespace"
|
|
49
|
-
]
|
|
50
|
-
},
|
|
51
|
-
"results" : {
|
|
52
|
-
"bindings" : ${JSON.stringify(namespaces)}
|
|
53
|
-
}
|
|
54
|
-
}`;
|
|
55
|
-
cy.intercept('GET', `/repositories/${repositoryId}/namespaces`, {
|
|
56
|
-
statusCode: 200,
|
|
57
|
-
body: namespacesResponse
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
static stubAutocomplete() {
|
|
62
|
-
cy.intercept(`/rest/autocomplete/enabled`, {
|
|
63
|
-
statusCode: 200,
|
|
64
|
-
body: {}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
static stubBaseEndpoints(repositoryId, namespaces) {
|
|
69
|
-
RepositoriesStub.stubNameSpaces(repositoryId, namespaces);
|
|
70
|
-
RepositoriesStub.stubAutocomplete();
|
|
71
|
-
GlobalOperationsStatusesStub.stubNoOperationsResponse('starwars');
|
|
72
|
-
}
|
|
73
|
-
}
|