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,196 @@
|
|
|
1
|
+
import {GraphqlStubs} from "../../stubs/graphql/graphql-stubs";
|
|
2
|
+
import {GraphqlEndpointManagementSteps} from "../../steps/graphql/graphql-endpoint-management-steps";
|
|
3
|
+
import {EditGraphqlEndpointSteps} from "../../steps/graphql/edit-graphql-endpoint-steps";
|
|
4
|
+
import {ApplicationSteps} from "../../steps/application-steps";
|
|
5
|
+
|
|
6
|
+
describe('Graphql: edit endpoint settings', () => {
|
|
7
|
+
let repositoryId;
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
repositoryId = 'create-graphql-endpoint-' + Date.now();
|
|
11
|
+
cy.createRepository({id: repositoryId});
|
|
12
|
+
cy.presetRepository(repositoryId);
|
|
13
|
+
// TODO: remove stubs and enable next imports when REST API is ready
|
|
14
|
+
// cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
|
|
15
|
+
// cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
|
|
16
|
+
GraphqlStubs.stubGetEndpointsInfo(repositoryId);
|
|
17
|
+
GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
|
|
18
|
+
GraphqlStubs.stubGetEndpointConfiguration(repositoryId, 'swapi', undefined, 1000);
|
|
19
|
+
|
|
20
|
+
// Visit the endpoint management view
|
|
21
|
+
GraphqlEndpointManagementSteps.visit();
|
|
22
|
+
// Ensure the endpoints list is loaded
|
|
23
|
+
GraphqlEndpointManagementSteps.getEndpointsInfo().should('have.length.at.least', 1);
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
afterEach(() => {
|
|
27
|
+
cy.deleteRepository(repositoryId);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
it('should display and edit different types dynamic form fields', () => {
|
|
31
|
+
GraphqlStubs.stubGetEndpointConfiguration(repositoryId, 'swapi', 'graphql-endpoint-configuration-types.json');
|
|
32
|
+
GraphqlEndpointManagementSteps.editEndpointConfiguration(0);
|
|
33
|
+
EditGraphqlEndpointSteps.getDialog().should('be.visible');
|
|
34
|
+
|
|
35
|
+
EditGraphqlEndpointSteps.getInputField(0).should('have.value', 'strValue');
|
|
36
|
+
EditGraphqlEndpointSteps.fillInputField(0, 'Foo')
|
|
37
|
+
|
|
38
|
+
EditGraphqlEndpointSteps.getBooleanField(0).should('not.be.checked');
|
|
39
|
+
EditGraphqlEndpointSteps.toggleBooleanField(0);
|
|
40
|
+
|
|
41
|
+
EditGraphqlEndpointSteps.getSelectField(0).should('have.value', 'Two');
|
|
42
|
+
EditGraphqlEndpointSteps.selectOption(0, 'One');
|
|
43
|
+
|
|
44
|
+
EditGraphqlEndpointSteps.verifyMultiSelectOptionSelected(0, 'Angular', 'JavaScript');
|
|
45
|
+
EditGraphqlEndpointSteps.toggleMultiSelectOption(0, 'Angular');
|
|
46
|
+
EditGraphqlEndpointSteps.verifyMultiSelectOptionSelected(0, 'JavaScript');
|
|
47
|
+
|
|
48
|
+
EditGraphqlEndpointSteps.getJsonField(0).should('have.value', '{"foo": "bar"}');
|
|
49
|
+
EditGraphqlEndpointSteps.clearJsonField(0);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('should allow saving the configuration changes successfully', () => {
|
|
53
|
+
GraphqlStubs.stubSaveEndpointConfiguration(repositoryId, 'swapi', 1000);
|
|
54
|
+
// Open the modal
|
|
55
|
+
GraphqlEndpointManagementSteps.editEndpointConfiguration(0);
|
|
56
|
+
EditGraphqlEndpointSteps.getDialog().should('be.visible');
|
|
57
|
+
|
|
58
|
+
// Then the save button is disabled
|
|
59
|
+
EditGraphqlEndpointSteps.getOKButton().should('be.disabled');
|
|
60
|
+
|
|
61
|
+
// When I change some fields
|
|
62
|
+
EditGraphqlEndpointSteps.fillInputField(0, 'ANY');
|
|
63
|
+
EditGraphqlEndpointSteps.fillInputField(2, 'bg');
|
|
64
|
+
EditGraphqlEndpointSteps.toggleBooleanField(0);
|
|
65
|
+
EditGraphqlEndpointSteps.toggleBooleanField(1);
|
|
66
|
+
|
|
67
|
+
// Then the save button is enabled
|
|
68
|
+
EditGraphqlEndpointSteps.getOKButton().should('be.enabled');
|
|
69
|
+
|
|
70
|
+
// Submit the form
|
|
71
|
+
EditGraphqlEndpointSteps.clickOKButton();
|
|
72
|
+
EditGraphqlEndpointSteps.getSavingLoader().should('be.visible');
|
|
73
|
+
cy.wait('@save-endpoint-configuration').then((interception) => {
|
|
74
|
+
expect(interception.request.body).to.deep.equal([
|
|
75
|
+
{
|
|
76
|
+
"key": "enable_mutations",
|
|
77
|
+
"value": true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"key": "lang.fetch",
|
|
81
|
+
"value": "ANY"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"key": "lang.validate",
|
|
85
|
+
"value": "UNIQ"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"key": "lang.implicit",
|
|
89
|
+
"value": "bg"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"key": "lang.defaultNameFetch",
|
|
93
|
+
"value": "ANY"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"key": "lang.appendDefaultNameFetch",
|
|
97
|
+
"value": false
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"key": "queryPfx",
|
|
101
|
+
"value": null
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"key": "mutationPfx",
|
|
105
|
+
"value": null
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"key": "search",
|
|
109
|
+
"value": null
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"key": "repository",
|
|
113
|
+
"value": null
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"key": "includeInferred",
|
|
117
|
+
"value": true
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"key": "expandOwlSameAs",
|
|
121
|
+
"value": true
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"key": "disabledChecks",
|
|
125
|
+
"value": []
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"key": "defaultRole",
|
|
129
|
+
"value": "defaultRole"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"key": "defaultIntegrationRole",
|
|
133
|
+
"value": "Federation_SystemRole"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"key": "exposeSomlInGraphQL",
|
|
137
|
+
"value": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"key": "enableCollectionCount",
|
|
141
|
+
"value": false
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"key": "enableTypeCount",
|
|
145
|
+
"value": false
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"key": "compactErrorMessages",
|
|
149
|
+
"value": false
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"key": "enableGraphQlExplain",
|
|
153
|
+
"value": true
|
|
154
|
+
}
|
|
155
|
+
]);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Modal should close after successful save
|
|
159
|
+
EditGraphqlEndpointSteps.getDialog().should('not.exist');
|
|
160
|
+
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('should show an error message if saving configuration fails', () => {
|
|
164
|
+
// Force the stub for save configuration to fail
|
|
165
|
+
GraphqlStubs.stubSaveEndpointConfiguration(repositoryId, 'swapi', 1000, true);
|
|
166
|
+
|
|
167
|
+
// Open the modal
|
|
168
|
+
GraphqlEndpointManagementSteps.editEndpointConfiguration(0);
|
|
169
|
+
EditGraphqlEndpointSteps.getDialog().should('be.visible');
|
|
170
|
+
|
|
171
|
+
// Fill in a field to allow form submission
|
|
172
|
+
EditGraphqlEndpointSteps.fillInputField(0, 'ANY');
|
|
173
|
+
|
|
174
|
+
// Submit the form
|
|
175
|
+
EditGraphqlEndpointSteps.clickOKButton();
|
|
176
|
+
EditGraphqlEndpointSteps.getSavingLoader().should('be.visible');
|
|
177
|
+
|
|
178
|
+
// I see a toast error
|
|
179
|
+
ApplicationSteps.getErrorNotifications().should('be.visible');
|
|
180
|
+
|
|
181
|
+
// The modal remains open after failure
|
|
182
|
+
EditGraphqlEndpointSteps.getSavingLoader().should('not.exist');
|
|
183
|
+
EditGraphqlEndpointSteps.getDialog().should('be.visible');
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
it.only('should close the modal when cancel is clicked', () => {
|
|
187
|
+
GraphqlEndpointManagementSteps.editEndpointConfiguration(0);
|
|
188
|
+
EditGraphqlEndpointSteps.getDialog().should('be.visible');
|
|
189
|
+
|
|
190
|
+
// Click cancel
|
|
191
|
+
EditGraphqlEndpointSteps.cancel();
|
|
192
|
+
|
|
193
|
+
// Verify that the modal is dismissed
|
|
194
|
+
EditGraphqlEndpointSteps.getDialog().should('not.exist');
|
|
195
|
+
});
|
|
196
|
+
});
|
|
@@ -10,7 +10,7 @@ describe('GraphQL endpoints filtering', () => {
|
|
|
10
10
|
cy.presetRepository(repositoryId);
|
|
11
11
|
// TODO: remove stubs and enable next imports when REST API is ready
|
|
12
12
|
// cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
|
|
13
|
-
// cy.uploadGraphqlSchema(repositoryId, 'graphql/
|
|
13
|
+
// cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
|
|
14
14
|
GraphqlStubs.stubGetEndpointsInfo(repositoryId);
|
|
15
15
|
GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
|
|
16
16
|
});
|
|
@@ -12,7 +12,7 @@ describe('GraphQL endpoints management', () => {
|
|
|
12
12
|
cy.presetRepository(repositoryId);
|
|
13
13
|
// TODO: remove stubs and enable next imports when REST API is ready
|
|
14
14
|
// cy.importServerFile(repositoryId, 'swapi-dataset.ttl');
|
|
15
|
-
// cy.uploadGraphqlSchema(repositoryId, 'graphql/
|
|
15
|
+
// cy.uploadGraphqlSchema(repositoryId, 'graphql/soml/swapi-schema.yaml', 'swapi');
|
|
16
16
|
GraphqlStubs.stubGetEndpointsInfo(repositoryId);
|
|
17
17
|
GraphqlStubs.stubGetEndpoints(repositoryId, 'graphql-swapi-endpoints.json');
|
|
18
18
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
|
|
2
2
|
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
3
|
+
import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
|
|
3
4
|
|
|
4
5
|
describe('Import server files - Batch operations', () => {
|
|
5
6
|
|
|
@@ -11,7 +12,7 @@ describe('Import server files - Batch operations', () => {
|
|
|
11
12
|
repositoryId = 'server-import-' + Date.now();
|
|
12
13
|
cy.createRepository({id: repositoryId});
|
|
13
14
|
ImportServerFilesSteps.visitServerImport(repositoryId);
|
|
14
|
-
ImportServerFilesSteps.getResources().should('have.length',
|
|
15
|
+
ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
afterEach(() => {
|
|
@@ -48,7 +49,7 @@ describe('Import server files - Batch operations', () => {
|
|
|
48
49
|
// When I select All files from the menu
|
|
49
50
|
ImportServerFilesSteps.selectAllResources();
|
|
50
51
|
// Then I should see all files selected
|
|
51
|
-
ImportServerFilesSteps.getSelectedResources().should('have.length',
|
|
52
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', SERVER_FILES_COUNT);
|
|
52
53
|
// When I select None from the menu
|
|
53
54
|
ImportServerFilesSteps.deselectAllResources();
|
|
54
55
|
// Then I should see no files selected
|
|
@@ -65,7 +66,7 @@ describe('Import server files - Batch operations', () => {
|
|
|
65
66
|
// When I select Not Imported from the menu
|
|
66
67
|
ImportServerFilesSteps.selectNotImportedResources();
|
|
67
68
|
// Then I should see only not imported files selected
|
|
68
|
-
ImportServerFilesSteps.getSelectedResources().should('have.length',
|
|
69
|
+
ImportServerFilesSteps.getSelectedResources().should('have.length', SERVER_FILES_COUNT - 1);
|
|
69
70
|
// Deselect all for the next step
|
|
70
71
|
ImportServerFilesSteps.deselectAllResources();
|
|
71
72
|
ImportServerFilesSteps.getSelectedResources().should('have.length', 0);
|
|
@@ -2,7 +2,7 @@ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
|
|
|
2
2
|
import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
|
|
3
3
|
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
4
4
|
import {ImportResourceMessageDialog} from "../../steps/import/import-resource-message-dialog";
|
|
5
|
-
import {
|
|
5
|
+
import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
|
|
6
6
|
|
|
7
7
|
describe('Import server files', () => {
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ describe('Import server files', () => {
|
|
|
14
14
|
repositoryId = 'server-import-' + Date.now();
|
|
15
15
|
cy.createRepository({id: repositoryId});
|
|
16
16
|
ImportServerFilesSteps.visitServerImport(repositoryId);
|
|
17
|
-
ImportServerFilesSteps.getResources().should('have.length',
|
|
17
|
+
ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
afterEach(() => {
|
|
@@ -66,7 +66,7 @@ describe('Import server files', () => {
|
|
|
66
66
|
// When the server files tab is loaded
|
|
67
67
|
// Then I should see all the files and folders by default
|
|
68
68
|
ImportServerFilesSteps.getShowAllResourceTypesButton().should('have.class', 'active');
|
|
69
|
-
ImportServerFilesSteps.getResources().should('have.length',
|
|
69
|
+
ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
|
|
70
70
|
// When I select the folders only filter
|
|
71
71
|
ImportServerFilesSteps.selectFoldersOnlyFilter();
|
|
72
72
|
// Then I should see only the folders
|
|
@@ -75,7 +75,7 @@ describe('Import server files', () => {
|
|
|
75
75
|
// When I select the files only filter
|
|
76
76
|
ImportServerFilesSteps.selectFilesOnlyFilter();
|
|
77
77
|
// Then I should see only the files
|
|
78
|
-
ImportServerFilesSteps.getResources().should('have.length',
|
|
78
|
+
ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT - 2);
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
it('should be able to import the whole directory', () => {
|
|
@@ -180,8 +180,8 @@ describe('Import server files', () => {
|
|
|
180
180
|
ImportServerFilesSteps.getResource(5).should('contain', "rdfxml.rdf");
|
|
181
181
|
ImportServerFilesSteps.getResource(6).should('contain', "jsonld-file.jsonld");
|
|
182
182
|
// checks files in root
|
|
183
|
-
ImportServerFilesSteps.getResource(
|
|
184
|
-
ImportServerFilesSteps.getResource(
|
|
185
|
-
ImportServerFilesSteps.getResource(
|
|
183
|
+
ImportServerFilesSteps.getResource(17).should('contain', "0007-import-file.jsonld");
|
|
184
|
+
ImportServerFilesSteps.getResource(18).should('contain', "test_turtlestar.ttls");
|
|
185
|
+
ImportServerFilesSteps.getResource(19).should('contain', "bnodes.ttl");
|
|
186
186
|
});
|
|
187
187
|
});
|
|
@@ -3,6 +3,7 @@ import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
|
|
|
3
3
|
import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
|
|
4
4
|
import ImportSteps from "../../steps/import/import-steps";
|
|
5
5
|
import HomeSteps from "../../steps/home-steps";
|
|
6
|
+
import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
|
|
6
7
|
|
|
7
8
|
const bnodes = `_:node0 <http://purl.org/dc/elements/1.1/title> "A new book" ;
|
|
8
9
|
\t<http://purl.org/dc/elements/1.1/creator> "A.N.Other" .`;
|
|
@@ -39,7 +40,7 @@ describe('Import view', () => {
|
|
|
39
40
|
// When I switch to the server files tab
|
|
40
41
|
ImportUserDataSteps.openServerFilesTab();
|
|
41
42
|
// Then I should see the server files only
|
|
42
|
-
ImportServerFilesSteps.getResources().should('have.length',
|
|
43
|
+
ImportServerFilesSteps.getResources().should('have.length', SERVER_FILES_COUNT);
|
|
43
44
|
// When I switch back to the user data tab
|
|
44
45
|
ImportServerFilesSteps.openUserDataTab();
|
|
45
46
|
// Then I should see the uploaded file
|
|
@@ -277,4 +277,23 @@ describe('Namespaces', () => {
|
|
|
277
277
|
NamespaceSteps.getNamespacesTable().should('not.be.visible');
|
|
278
278
|
NamespaceSteps.getNoNamespacesAlert().should('be.visible');
|
|
279
279
|
});
|
|
280
|
+
|
|
281
|
+
it('Should got to the second page when click on second page button', () => {
|
|
282
|
+
// Given: I visited the namespaces view, and there is more than one page.
|
|
283
|
+
NamespaceSteps.getNamespacesPageElements()
|
|
284
|
+
// First page + three-page buttons + Last page.
|
|
285
|
+
.should('have.length', 5);
|
|
286
|
+
// The table with namespaces should contain the "geoext" namespace because it is among the first 10 namespaces (the paginator is set to 10 namespaces per page).
|
|
287
|
+
NamespaceSteps.getNamespace('geoext').should('be.visible');
|
|
288
|
+
// The namespace with the prefix "omgeo" should not exist because it is the fourteenth namespace and is only visible on the second page.
|
|
289
|
+
NamespaceSteps.verifyNamespaceNotExist('omgeo');
|
|
290
|
+
|
|
291
|
+
// When I go to the second page.
|
|
292
|
+
NamespaceSteps.getNamespacePageElement(2).click()
|
|
293
|
+
|
|
294
|
+
// Then I expect the "geoext" namespace to no longer be visible, as it is part of the first 10 namespaces.
|
|
295
|
+
NamespaceSteps.verifyNamespaceNotExist('geoext');
|
|
296
|
+
// The namespace with the prefix "omgeo" should now be visible because it appears on the second page.
|
|
297
|
+
NamespaceSteps.getNamespace('omgeo').should('be.visible');
|
|
298
|
+
});
|
|
280
299
|
});
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-TR7",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.0.0-
|
|
9
|
+
"version": "3.0.0-TR7",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"cypress": "^13.3.1",
|
package/package.json
CHANGED
|
@@ -19,6 +19,10 @@ export class CreateGraphqlEndpointSteps {
|
|
|
19
19
|
return this.getView().find('.wizard-step.active');
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// ===================================
|
|
23
|
+
// Schema source view
|
|
24
|
+
// ===================================
|
|
25
|
+
|
|
22
26
|
static getSelectSchemaSourceView() {
|
|
23
27
|
return this.getView().find('.select-schema-source-view');
|
|
24
28
|
}
|
|
@@ -31,7 +35,231 @@ export class CreateGraphqlEndpointSteps {
|
|
|
31
35
|
return this.getSelectSchemaSourceView().find('.schema-source-type input[type=radio]:checked');
|
|
32
36
|
}
|
|
33
37
|
|
|
38
|
+
static selectOntologiesAndShaclShapesOption() {
|
|
39
|
+
this.getSelectSchemaSourceView().find(`.schema-source-type input[type=radio]`).eq(1).click();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// ===================================
|
|
43
|
+
// Graphql schema shapes view
|
|
44
|
+
// ===================================
|
|
45
|
+
|
|
46
|
+
static getGraphqlSchemaShapesView() {
|
|
47
|
+
return this.getView().find('.graphql-schema-shapes');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static getGraphqlSchemaShapesNotFound() {
|
|
51
|
+
return this.getGraphqlSchemaShapesView().find('.no-shapes');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static getGraphqlSchemaSelector() {
|
|
55
|
+
return this.getGraphqlSchemaShapesView().find('.graphql-shapes-selector .shuttle-multiselect');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static getSelectedGraphqlShapesCountBanner() {
|
|
59
|
+
return this.getGraphqlSchemaSelector().find('.toolbar-right .selected-items-message');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static getAvailableGraphqlShapes() {
|
|
63
|
+
return this.getGraphqlSchemaSelector().find('.available-options .option-item');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static getAvailableGraphqlShape(index) {
|
|
67
|
+
return this.getAvailableGraphqlShapes().eq(index);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static getSelectedGraphqlShapes() {
|
|
71
|
+
return this.getGraphqlSchemaSelector().find('.selected-options .option-item');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static getSelectedGraphqlShape(index) {
|
|
75
|
+
return this.getSelectedGraphqlShapes().eq(index);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static selectAllGraphqlShapes() {
|
|
79
|
+
this.getGraphqlSchemaSelector().find('.add-all-btn').click();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static deselectAllGraphqlShapes() {
|
|
83
|
+
this.getGraphqlSchemaSelector().find('.remove-all-btn').click();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static selectGraphqlShape(index) {
|
|
87
|
+
this.getAvailableGraphqlShapes().eq(index).find('.add-btn').click();
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static deselectAllGraphqlShape(index) {
|
|
91
|
+
this.getSelectedGraphqlShapes().eq(index).find('.remove-btn').click();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static filterSelectedGraphqlShapes(term) {
|
|
95
|
+
this.getGraphqlSchemaSelector().find('.toolbar-left .filter-selected').clear().type(term);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static clearSelectedGraphqlShapesFilter() {
|
|
99
|
+
this.getGraphqlSchemaSelector().find('.toolbar-left .filter-selected').clear();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ===================================
|
|
103
|
+
// Ontologies and SHACL shapes view
|
|
104
|
+
// ===================================
|
|
105
|
+
|
|
106
|
+
static getOntologiesAndShaclShapesView() {
|
|
107
|
+
return this.getView().find('.ontologies-and-shacl-shapes');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static getGraphSourceTypes() {
|
|
111
|
+
return this.getOntologiesAndShaclShapesView().find('.graph-source-type input[type=radio]');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static getSelectedGraphSource() {
|
|
115
|
+
return this.getOntologiesAndShaclShapesView().find('.graph-source-type input[type=radio]:checked');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static selectUseAllGraphsOption() {
|
|
119
|
+
this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(0).click();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static selectUseShaclShapeGraphsOption() {
|
|
123
|
+
this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(1).click();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static selectPickGraphsOption() {
|
|
127
|
+
this.getOntologiesAndShaclShapesView().find(`.graph-source-type input[type=radio]`).eq(2).click();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static getGraphsNotFound() {
|
|
131
|
+
return this.getOntologiesAndShaclShapesView().find('.use-all-graphs .no-graphs');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static getAllGraphsWillBeUsedMessage() {
|
|
135
|
+
return this.getOntologiesAndShaclShapesView().find('.use-all-graphs .all-graphs-selected');
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static getPickGraphsNoGraphsFound() {
|
|
139
|
+
return this.getOntologiesAndShaclShapesView().find('.select-graphs .no-graphs');
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static getShaclShapeGraphsNotFound() {
|
|
143
|
+
return this.getOntologiesAndShaclShapesView().find('.use-all-shacl-shape-graphs .no-shacl-shapes');
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
static getEndpointParamsForm() {
|
|
147
|
+
return this.getView().find('.endpoint-params-form');
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Endpoint ID field
|
|
151
|
+
static getEndpointIdField() {
|
|
152
|
+
return this.getEndpointParamsForm().find('.endpoint-id');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static getEndpointIdFieldInput() {
|
|
156
|
+
return this.getEndpointIdField().find('input');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static typeEndpointId(endpointId) {
|
|
160
|
+
this.getEndpointIdFieldInput().clear().type(endpointId);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Endpoint label field
|
|
164
|
+
static getEndpointLabelField() {
|
|
165
|
+
return this.getEndpointParamsForm().find('.endpoint-label');
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
static getEndpointLabelFieldInput() {
|
|
169
|
+
return this.getEndpointLabelField().find('input');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static typeEndpointLabel(endpointLabel) {
|
|
173
|
+
this.getEndpointLabelFieldInput().clear().type(endpointLabel);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// Vocabulary prefix select
|
|
177
|
+
static getVocabularyPrefixSelectField() {
|
|
178
|
+
return this.getEndpointParamsForm().find('.vocabulary-prefix');
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
static getVocabularyPrefixSelect() {
|
|
182
|
+
return this.getVocabularyPrefixSelectField().find('select');
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
static getVocabularyPrefixSelectOptions() {
|
|
186
|
+
return this.getVocabularyPrefixSelect().find('option');
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
static getVocabularyPrefixSelectSelectedOption() {
|
|
190
|
+
return this.getVocabularyPrefixSelect().find('option:selected');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static selectVocabularyPrefix(prefix) {
|
|
194
|
+
this.getVocabularyPrefixSelect().select(prefix);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
// Graphs selector
|
|
198
|
+
static getGraphsSelector() {
|
|
199
|
+
return this.getOntologiesAndShaclShapesView().find('.graphs-selector .shuttle-multiselect');
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
static getAvailableGraphs() {
|
|
203
|
+
return this.getGraphsSelector().find('.available-options .option-item');
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static getSelectedGraphs() {
|
|
207
|
+
return this.getGraphsSelector().find('.selected-options .option-item');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
static getSelectedGraphsCountBanner() {
|
|
211
|
+
return this.getGraphsSelector().find('.toolbar-right .selected-items-message');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static selectAllGraphs() {
|
|
215
|
+
this.getGraphsSelector().find('.add-all-btn').click();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// ===================================
|
|
219
|
+
// Configure endpoint view
|
|
220
|
+
// ===================================
|
|
221
|
+
|
|
222
|
+
static getConfigureEndpointView() {
|
|
223
|
+
return this.getView().find('.endpoint-configuration-view');
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static getGenerationSettingsForm() {
|
|
227
|
+
return this.getConfigureEndpointView().find('.generation-settings-form');
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// ===================================
|
|
231
|
+
// Generate endpoint view
|
|
232
|
+
// ===================================
|
|
233
|
+
|
|
234
|
+
static getGenerateEndpointView() {
|
|
235
|
+
return this.getView().find('.generate-endpoint-view');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// ===================================
|
|
239
|
+
// Wizard actions
|
|
240
|
+
// ===================================
|
|
241
|
+
|
|
242
|
+
static getCancelButton() {
|
|
243
|
+
return this.getView().find('.cancel-btn');
|
|
244
|
+
}
|
|
245
|
+
|
|
34
246
|
static cancelEndpointCreation() {
|
|
35
|
-
this.
|
|
247
|
+
this.getCancelButton().click();
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
static getNextStepButton() {
|
|
251
|
+
return this.getView().find('.next-btn');
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
static next() {
|
|
255
|
+
this.getNextStepButton().click();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
static getBackButton() {
|
|
259
|
+
return this.getView().find('.back-btn');
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
static back() {
|
|
263
|
+
this.getBackButton().click();
|
|
36
264
|
}
|
|
37
265
|
}
|