graphdb-workbench-tests 3.0.0-TR5 → 3.0.0-TR7
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/fixtures/graphdb-import/ontology-and-shapes.ttl +562 -0
- package/fixtures/graphql/endpoints/graphql-endpoint-configuration-types.json +46 -0
- package/fixtures/graphql/endpoints/graphql-endpoint-configuration.json +227 -0
- package/fixtures/graphql/endpoints/graphql-endpoints.json +4 -4
- package/fixtures/graphql/endpoints/graphql-swapi-endpoints.json +6 -6
- package/integration/graphql/create-graphql-endpoint.spec.js +213 -5
- package/integration/graphql/delete-graphql-endpoint.spec.js +46 -0
- package/integration/graphql/edit-graphql-enpoint.spec.js +196 -0
- package/integration/graphql/graphql-endpoint-filtering.spec.js +1 -1
- package/integration/graphql/graphql-endpoint-management-view.spec.js +1 -1
- package/integration/import/import-server-files-batch-operations.spec.js +4 -3
- package/integration/import/import-server-files.spec.js +7 -7
- package/integration/import/import-view.spec.js +2 -1
- package/integration/setup/namespaces.spec.js +19 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/graphql/create-graphql-endpoint-steps.js +229 -1
- package/steps/graphql/edit-graphql-endpoint-steps.js +90 -0
- package/steps/graphql/graphql-endpoint-management-steps.js +30 -0
- package/steps/import/import-test-constants.js +1 -0
- package/steps/modal-dialog-steps.js +5 -1
- package/steps/setup/namespace-steps.js +17 -0
- package/stubs/graphql/graphql-stubs.js +17 -0
- /package/fixtures/graphql/{schema → soml}/swapi-schema-film-restricted.yaml +0 -0
- /package/fixtures/graphql/{schema → soml}/swapi-schema.yaml +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {ModalDialogSteps} from "../modal-dialog-steps";
|
|
2
|
+
|
|
3
|
+
export class EditGraphqlEndpointSteps extends ModalDialogSteps {
|
|
4
|
+
static getModalTitle() {
|
|
5
|
+
return this.getDialog().find('.modal-title');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static getDynamicForm() {
|
|
9
|
+
return this.getDialog().find('dynamic-form');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static getFormFields() {
|
|
13
|
+
return this.getDynamicForm().find('.form-field');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getInputField(index) {
|
|
17
|
+
return this.getFormFields().find('.input-field input').eq(index);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static getBooleanField(index) {
|
|
21
|
+
return this.getFormFields().find('.boolean-field input').eq(index);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getSelectField(index) {
|
|
25
|
+
return this.getFormFields().find('.select-field select').eq(index);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static getMultiSelectField(index) {
|
|
29
|
+
return this.getFormFields().find('.multiselect-field multiselect-dropdown').eq(index);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static toggleMultiSelectOption(index, optionLabel) {
|
|
33
|
+
this.getMultiSelectField(index)
|
|
34
|
+
.within(() => {
|
|
35
|
+
cy.get('button.dropdown-toggle').click();
|
|
36
|
+
cy.get('ul.dropdown-menu li')
|
|
37
|
+
.contains(optionLabel)
|
|
38
|
+
.click();
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static verifyMultiSelectOptionSelected(index, optionLabel) {
|
|
43
|
+
this.getModalTitle().click();
|
|
44
|
+
this.getMultiSelectField(index)
|
|
45
|
+
.within(() => {
|
|
46
|
+
cy.get('button.dropdown-toggle')
|
|
47
|
+
.should('contain.text', optionLabel);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getJsonField(index) {
|
|
52
|
+
return this.getFormFields().find('.json-field textarea').eq(index);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static clearJsonField(index) {
|
|
56
|
+
return this.getJsonField(index).clear();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static setJsonField(index, value) {
|
|
60
|
+
return this.clearJsonField(index).type(value, {parseSpecialCharSequences:false});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static fillInputField(index, value) {
|
|
64
|
+
return this.getInputField(index).clear().type(value);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static checkBooleanField(index) {
|
|
68
|
+
return this.getBooleanField(index).check();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static uncheckBooleanField(index) {
|
|
72
|
+
return this.getBooleanField(index).uncheck();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static toggleBooleanField(index) {
|
|
76
|
+
return this.getBooleanField(index).click();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static selectOption(index, option) {
|
|
80
|
+
this.getSelectField(index).select(option);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static getLoader() {
|
|
84
|
+
return this.getDialog().find('.graphql-endpoint-configuration-loader')
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static getSavingLoader() {
|
|
88
|
+
return this.getDialog().find('.saving-endpoint-settings')
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -26,6 +26,10 @@ export class GraphqlEndpointManagementSteps {
|
|
|
26
26
|
return this.getView().find('.endpoints-info-table');
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
static getNoResultsRow() {
|
|
30
|
+
return this.getEndpointTable().find('tbody tr.no-results');
|
|
31
|
+
}
|
|
32
|
+
|
|
29
33
|
static getEndpointsInfo() {
|
|
30
34
|
return this.getEndpointTable().find('tbody tr');
|
|
31
35
|
}
|
|
@@ -42,6 +46,15 @@ export class GraphqlEndpointManagementSteps {
|
|
|
42
46
|
return this.getEndpointsInfo().eq(index).find('.toggle-row a').click();
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
static openActionsMenu(index) {
|
|
50
|
+
this.getEndpointsInfo().eq(index).find('.open-endpoint-actions-btn').click();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static deleteEndpoint(index) {
|
|
54
|
+
this.openActionsMenu(index);
|
|
55
|
+
this.getEndpointsInfo().eq(index).find('.delete-endpoint-btn').click();
|
|
56
|
+
}
|
|
57
|
+
|
|
45
58
|
static filterEndpoints(term) {
|
|
46
59
|
this.getEndpointFilterField().type(term);
|
|
47
60
|
}
|
|
@@ -81,4 +94,21 @@ export class GraphqlEndpointManagementSteps {
|
|
|
81
94
|
this.toggleEndpointRow(index);
|
|
82
95
|
});
|
|
83
96
|
}
|
|
97
|
+
|
|
98
|
+
static getEndpointInfo(index) {
|
|
99
|
+
return this.getEndpointsInfo().eq(index);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static getEndpointActionsButton(index) {
|
|
103
|
+
return this.getEndpointInfo(index).realHover().find('.open-endpoint-actions-btn');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static openEndpointActionMenu(index) {
|
|
107
|
+
return this.getEndpointActionsButton(index).click();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static editEndpointConfiguration(index) {
|
|
111
|
+
this.openEndpointActionMenu(index);
|
|
112
|
+
return cy.get('.configure-endpoint-btn').eq(index).click();
|
|
113
|
+
}
|
|
84
114
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SERVER_FILES_COUNT = 20;
|
|
@@ -39,8 +39,12 @@ export class ModalDialogSteps {
|
|
|
39
39
|
ModalDialogSteps.getConfirmButton().click();
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
static getOKButton() {
|
|
43
|
+
return ModalDialogSteps.getDialogFooter().find('.btn-primary');
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
static clickOKButton() {
|
|
43
|
-
ModalDialogSteps.
|
|
47
|
+
ModalDialogSteps.getOKButton().click();
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
static confirm() {
|
|
@@ -77,6 +77,14 @@ export class NamespaceSteps {
|
|
|
77
77
|
return this.getNamespacesResultHeader().find('.namespaces-header-pagination .pagination');
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
static getNamespacesPageElements() {
|
|
81
|
+
return this.getNamespacesHeaderPagination().find('li ')
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static getNamespacePageElement(index) {
|
|
85
|
+
return this.getNamespacesPageElements().eq(index);
|
|
86
|
+
}
|
|
87
|
+
|
|
80
88
|
static getNamespacesHeaderPaginationInfo() {
|
|
81
89
|
return this.getNamespacesResultHeader().find('.showing-info-namespaces');
|
|
82
90
|
}
|
|
@@ -123,6 +131,15 @@ export class NamespaceSteps {
|
|
|
123
131
|
.last();
|
|
124
132
|
}
|
|
125
133
|
|
|
134
|
+
static verifyNamespaceNotExist(prefix) {
|
|
135
|
+
return this.getNamespacesTable().find('.namespace')
|
|
136
|
+
.should('be.visible')
|
|
137
|
+
.find('.namespace-prefix')
|
|
138
|
+
.should('be.visible')
|
|
139
|
+
.contains(prefix)
|
|
140
|
+
.should('not.exist');
|
|
141
|
+
}
|
|
142
|
+
|
|
126
143
|
static getSelectNamespaceCheckbox(prefix) {
|
|
127
144
|
return this.getNamespace(prefix)
|
|
128
145
|
.should('be.visible')
|
|
@@ -57,6 +57,23 @@ export class GraphqlStubs {
|
|
|
57
57
|
});
|
|
58
58
|
}).as('rickmorty');
|
|
59
59
|
}
|
|
60
|
+
|
|
61
|
+
static stubGetEndpointConfiguration(repositoryId, endpoint, fixture = 'graphql-endpoint-configuration.json', delay = 0) {
|
|
62
|
+
console.log(endpoint)
|
|
63
|
+
console.log(`/rest/repositories/${repositoryId}/manage/graphql/${endpoint}/config`)
|
|
64
|
+
cy.intercept('GET', `/rest/repositories/${repositoryId}/manage/graphql/${endpoint}/config`, {
|
|
65
|
+
fixture: `/graphql/endpoints/${fixture}`,
|
|
66
|
+
statusCode: 200,
|
|
67
|
+
delay: delay
|
|
68
|
+
}).as('get-endpoint-configuration');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static stubSaveEndpointConfiguration(repositoryId, endpoint, delay = 0, shouldFail = false) {
|
|
72
|
+
cy.intercept('PUT', `/rest/repositories//${repositoryId}/manage/graphql/${endpoint}/config`, {
|
|
73
|
+
statusCode: shouldFail ? 400 : 200,
|
|
74
|
+
delay: delay
|
|
75
|
+
}).as('save-endpoint-configuration');
|
|
76
|
+
}
|
|
60
77
|
}
|
|
61
78
|
|
|
62
79
|
const defaultHeaders = {
|
|
File without changes
|
|
File without changes
|