graphdb-workbench-tests 2.8.4 → 3.0.0-NEW-JENKINS-1
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/graph/rdf.txt +130 -0
- package/fixtures/graphdb-import/ontology-and-shapes.ttl +562 -0
- package/fixtures/graphdb-import/swapi-dataset.ttl +4393 -0
- package/fixtures/graphql/endpoints/graphql-endpoints-info.json +49 -0
- package/fixtures/graphql/endpoints/no-graphql-endpoints-info.json +3 -0
- package/fixtures/graphql/soml/big-swapi-schema-broken.yaml +83167 -0
- package/fixtures/graphql/soml/swapi-schema-broken.yaml +880 -0
- package/fixtures/graphql/soml/swapi-schema-broken.zip +0 -0
- package/fixtures/graphql/soml/swapi-schema-film-restricted.yaml +335 -0
- package/fixtures/graphql/soml/swapi-schema-planets.yaml +51 -0
- package/fixtures/graphql/soml/swapi-schema-species.yaml +66 -0
- package/fixtures/graphql/soml/swapi-schema.yaml +857 -0
- package/fixtures/graphql/soml/swapi-schemas.zip +0 -0
- package/fixtures/locale-en.json +666 -37
- package/fixtures/ttyg/agent/get-agent-list-autocomplete-query.json +23 -0
- package/fixtures/ttyg/autocomplete-response.json +154 -0
- package/integration/explore/class.hierarchy.spec.js +131 -184
- package/integration/explore/graphs.overview.spec.js +18 -10
- package/integration/explore/visual-graph/graphs-config.spec.js +17 -1
- package/integration/explore/visual-graph/visual-graph-node-labels.spec.js +68 -0
- package/integration/graphql/activate-deactivate-graphql-endpoint.spec.js +40 -0
- package/integration/graphql/create-graphql-endpoint.spec.js +281 -0
- package/integration/graphql/delete-graphql-endpoint.spec.js +46 -0
- package/integration/graphql/edit-graphql-enpoint.spec.js +160 -0
- package/integration/graphql/export-graphql-endpoint-definition.spec.js +35 -0
- package/integration/graphql/filter-graphql-endpoints-on-management-view.spec.js +66 -0
- package/integration/graphql/graphql-endpoint-management-view.spec.js +142 -0
- package/integration/graphql/graphql-playground.spec.js +110 -0
- package/integration/graphql/import-graphql-endpoint-definitions.spec.js +269 -0
- package/integration/graphql/set-default-graphql-endpoint.spec.js +42 -0
- package/integration/import/import-server-files-batch-operations.spec.js +4 -3
- package/integration/import/import-server-files.spec.js +29 -7
- package/integration/import/import-user-data-url.spec.js +33 -0
- package/integration/import/import-view.spec.js +2 -1
- package/integration/repository/repositories.spec.js +9 -4
- package/integration/setup/user-and-access.spec.js +695 -117
- package/integration/sparql-editor/actions/show-saved-queries.spec.js +1 -1
- package/integration/sparql-editor/saved-query/readonly-query.spec.js +66 -0
- package/integration/ttyg/edit-agent.spec.js +45 -0
- package/integration-flaky/setup/users-and-access/security-and-free-access.spec.js +54 -0
- package/{integration → integration-flaky}/ttyg/ttyg-permission.spec.js +4 -3
- package/npm-shrinkwrap.json +931 -305
- package/package.json +3 -3
- package/steps/class-views-steps.js +139 -0
- package/steps/explore/graphs-overview-steps.js +12 -0
- package/steps/graphql/create-graphql-endpoint-steps.js +277 -0
- package/steps/graphql/edit-graphql-endpoint-steps.js +124 -0
- package/steps/graphql/generation-report-modal-steps.js +34 -0
- package/steps/graphql/graphiql-editor-tools-steps.js +10 -0
- package/steps/graphql/graphiql-playground-steps.js +6 -0
- package/steps/graphql/graphql-endpoint-management-steps.js +147 -0
- package/steps/graphql/graphql-playground-steps.js +90 -0
- package/steps/graphql/import-endpoint-definition-modal-steps.js +80 -0
- package/steps/home-steps.js +1 -1
- package/steps/import/import-settings-dialog-steps.js +12 -0
- package/steps/import/import-steps.js +9 -4
- package/steps/import/import-test-constants.js +1 -0
- package/steps/import/import-user-data-steps.js +8 -0
- package/steps/login-steps.js +20 -0
- package/steps/modal-dialog-steps.js +8 -0
- package/steps/repository-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +165 -11
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +44 -0
- package/steps/visual-graph-steps.js +14 -0
- package/steps/yasgui/saved-queries-dialog.js +19 -3
- package/stubs/global-operations-statuses-stub.js +2 -2
- package/stubs/graphql/graphql-stubs.js +146 -0
- package/stubs/repositories/repositories-stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +7 -0
- package/stubs/yasgui/query-stubs.js +2 -2
- package/support/import-commands.js +28 -0
- package/support/repository-commands.js +10 -3
- package/support/security-command.js +49 -8
- package/support/user-commands.js +10 -2
- package/utils/html-util.js +21 -0
- /package/fixtures/{graphql-editor → queries}/default-query-response.json +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-NEW-JENKINS-1",
|
|
4
4
|
"description": "Cypress tests for GraphDB workbench",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm shrinkwrap",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test:core": "cypress run --spec integration/repository/**,integration/import/**,integration/sparql-editor/**,integration/monitor/**,integration/cluster/**,integration/ttyg/**"
|
|
14
14
|
},
|
|
15
15
|
"author": {
|
|
16
|
-
"name": "
|
|
16
|
+
"name": "Ontotext AD",
|
|
17
17
|
"url": "https://www.ontotext.com/"
|
|
18
18
|
},
|
|
19
19
|
"license": "Apache-2.0",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"url": "git+https://github.com/Ontotext-AD/graphdb-workbench.git"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"cypress": "^
|
|
29
|
+
"cypress": "^14.0.3",
|
|
30
30
|
"cypress-failed-log": "^2.10.0",
|
|
31
31
|
"cypress-file-upload": "^5.0.8",
|
|
32
32
|
"cypress-localstorage-commands": "^2.2.6",
|
|
@@ -7,6 +7,145 @@ export const ALL_GRAPHS = 'All graphs';
|
|
|
7
7
|
export const NEWS_GRAPH = 'http://example.org/news';
|
|
8
8
|
|
|
9
9
|
class ClassViewsSteps {
|
|
10
|
+
static visit() {
|
|
11
|
+
cy.visit('/hierarchy');
|
|
12
|
+
cy.window();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static waitForPageLoad() {
|
|
16
|
+
// Wait for the chart and diagram to be visible, also check if a class is displayed.
|
|
17
|
+
this.getClassChart().scrollIntoView().should('be.visible').within(() => {
|
|
18
|
+
this.getMainGroup().scrollIntoView().should('be.visible');
|
|
19
|
+
this.findClassByName('food:Grape');
|
|
20
|
+
this.getClassInHierarchy().scrollIntoView().should('be.visible');
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getClassChart() {
|
|
25
|
+
return cy.get('#classChart');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static getMainGroup() {
|
|
29
|
+
return cy.get('#main-group');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getMainGroupTextLabel() {
|
|
33
|
+
return this.getMainGroup().find('text.label');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getClassInHierarchy() {
|
|
37
|
+
return cy.get('@classInHierarchy');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getToolbarHolder() {
|
|
41
|
+
return cy.get('.toolbar-holder');
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static getToolbarPrefixToggleButton() {
|
|
45
|
+
return this.getToolbarHolder().find('.prefix-toggle-btn');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static clickPrefixToggleButton() {
|
|
49
|
+
return this.getToolbarPrefixToggleButton().click();
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static getSearchInputDropdown() {
|
|
53
|
+
return cy.get('#search_input_dropdown');
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static getInfoSidePanelCloseButton() {
|
|
57
|
+
return cy.get('[ps-class=rdf-info-side-panel] .close');
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
static closeInfoSidePanel() {
|
|
61
|
+
this.getInfoSidePanelCloseButton().click();
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
static getFocusDiagramButton() {
|
|
65
|
+
return cy.get('.toolbar-holder .focus-diagram-btn');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
static focusDiagram() {
|
|
69
|
+
this.getFocusDiagramButton().click();
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
static getSlider() {
|
|
73
|
+
return cy.get('.class-cnt-slider > .ng-isolate-scope');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
static positionSlider(location) {
|
|
77
|
+
this.getSlider().trigger('click', location);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static getSVGButton() {
|
|
81
|
+
return cy.get('#download-svg');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static mouseOverSVGButton() {
|
|
85
|
+
return this.getSVGButton().trigger('mouseover');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
static getDomainRangeGraphButton() {
|
|
89
|
+
return cy.get('.domain-range-graph-btn');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static openDomainRangeGraph() {
|
|
93
|
+
this.getDomainRangeGraphButton().click();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
static getDomainRangeGraphHeader() {
|
|
97
|
+
return cy.get('h1');
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
static getLegendContainer() {
|
|
101
|
+
return cy.get('.legend-container');
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static getMainDomainRangeDiagram() {
|
|
105
|
+
return cy.get('g');
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
static getReturnButton() {
|
|
109
|
+
return cy.get('.icon-arrow-left');
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static goBack() {
|
|
113
|
+
this.getReturnButton().click();
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
static getCurrentSliderValue() {
|
|
117
|
+
// The count is taken from the rz-pointer's attribute and not from a visible in the UI value
|
|
118
|
+
// as the rz-slider library doesn't provide a reliable way to get this. It just has multiple
|
|
119
|
+
// '.rz-bubble' elements and no appropriate selector for the one which holds the visible
|
|
120
|
+
// value.
|
|
121
|
+
return cy.get('.rz-pointer[role="slider"]');
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
static searchForClass() {
|
|
125
|
+
return cy.get('.toolbar-holder .icon-search').click();
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
static getSearchInput() {
|
|
129
|
+
return cy.get('#search_input_value');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
static searchForClassName(name) {
|
|
133
|
+
this.getSearchInput().type(name).type('{enter}');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
static clickJQueryElement(element) {
|
|
137
|
+
element.click();
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
static findClassByName(className) {
|
|
141
|
+
this.getMainGroupTextLabel()
|
|
142
|
+
.each(($element) => {
|
|
143
|
+
const data = $element.prop('__data__');
|
|
144
|
+
if (data.data.name === className) {
|
|
145
|
+
cy.wrap($element).as('classInHierarchy');
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
}
|
|
10
149
|
|
|
11
150
|
static selectGraphFromDropDown(graph) {
|
|
12
151
|
cy.get('#selectGraphDropdown .dropdown-item')
|
|
@@ -61,4 +61,16 @@ export class GraphsOverviewSteps {
|
|
|
61
61
|
static getPaginations() {
|
|
62
62
|
return cy.get('[paginations]');
|
|
63
63
|
}
|
|
64
|
+
|
|
65
|
+
static verifyFileExists(fileName) {
|
|
66
|
+
cy.readFile('cypress/downloads/' + fileName);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static getDownloadAllButtons() {
|
|
70
|
+
return cy.get('.download-all-graphs-btn');
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static clickOnDownloadAllButton() {
|
|
74
|
+
this.getDownloadAllButtons().click();
|
|
75
|
+
}
|
|
64
76
|
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
export class CreateGraphqlEndpointSteps {
|
|
2
|
+
static visit() {
|
|
3
|
+
return cy.visit('/graphql/endpoint/create');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
static getView() {
|
|
7
|
+
return cy.get('.create-graphql-endpoint-view');
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static getSourceRepositorySelector() {
|
|
11
|
+
return this.getView().find('.source-repository-selector');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static getSelectedSourceRepository() {
|
|
15
|
+
return this.getSourceRepositorySelector().find('option:selected');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static getActiveStep() {
|
|
19
|
+
return this.getView().find('.wizard-step.active');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// ===================================
|
|
23
|
+
// Schema source view
|
|
24
|
+
// ===================================
|
|
25
|
+
|
|
26
|
+
static getSelectSchemaSourceView() {
|
|
27
|
+
return this.getView().find('.select-schema-source-view');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static getSchemaSourceTypes() {
|
|
31
|
+
return this.getSelectSchemaSourceView().find('.schema-source-type input[type=radio]');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static getSelectedSchemaSource() {
|
|
35
|
+
return this.getSelectSchemaSourceView().find('.schema-source-type input[type=radio]:checked');
|
|
36
|
+
}
|
|
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
|
+
static getEndpointDescriptionField() {
|
|
177
|
+
return this.getEndpointParamsForm().find('.endpoint-description');
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
static getEndpointDescriptionFieldInput() {
|
|
181
|
+
return this.getEndpointDescriptionField().find('textarea');
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
static typeEndpointDescription(endpointDescription) {
|
|
185
|
+
this.getEndpointDescriptionFieldInput().clear().type(endpointDescription);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Vocabulary prefix select
|
|
189
|
+
static getVocabularyPrefixSelectField() {
|
|
190
|
+
return this.getEndpointParamsForm().find('.vocabulary-prefix');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static getVocabularyPrefixSelect() {
|
|
194
|
+
return this.getVocabularyPrefixSelectField().find('select');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static getVocabularyPrefixSelectOptions() {
|
|
198
|
+
return this.getVocabularyPrefixSelect().find('option');
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
static getVocabularyPrefixSelectSelectedOption() {
|
|
202
|
+
return this.getVocabularyPrefixSelect().find('option:selected');
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
static selectVocabularyPrefix(prefix) {
|
|
206
|
+
this.getVocabularyPrefixSelect().select(prefix);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
// Graphs selector
|
|
210
|
+
static getGraphsSelector() {
|
|
211
|
+
return this.getOntologiesAndShaclShapesView().find('.graphs-selector .shuttle-multiselect');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static getAvailableGraphs() {
|
|
215
|
+
return this.getGraphsSelector().find('.available-options .option-item');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
static getSelectedGraphs() {
|
|
219
|
+
return this.getGraphsSelector().find('.selected-options .option-item');
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
static getSelectedGraphsCountBanner() {
|
|
223
|
+
return this.getGraphsSelector().find('.toolbar-right .selected-items-message');
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
static selectAllGraphs() {
|
|
227
|
+
this.getGraphsSelector().find('.add-all-btn').click();
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// ===================================
|
|
231
|
+
// Configure endpoint view
|
|
232
|
+
// ===================================
|
|
233
|
+
|
|
234
|
+
static getConfigureEndpointView() {
|
|
235
|
+
return this.getView().find('.endpoint-configuration-view');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
static getGenerationSettingsForm() {
|
|
239
|
+
return this.getConfigureEndpointView().find('.generation-settings-form');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// ===================================
|
|
243
|
+
// Generate endpoint view
|
|
244
|
+
// ===================================
|
|
245
|
+
|
|
246
|
+
static getGenerateEndpointView() {
|
|
247
|
+
return this.getView().find('.generate-endpoint-view');
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ===================================
|
|
251
|
+
// Wizard actions
|
|
252
|
+
// ===================================
|
|
253
|
+
|
|
254
|
+
static getCancelButton() {
|
|
255
|
+
return this.getView().find('.cancel-btn');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
static cancelEndpointCreation() {
|
|
259
|
+
this.getCancelButton().click();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
static getNextStepButton() {
|
|
263
|
+
return this.getView().find('.next-btn');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
static next() {
|
|
267
|
+
this.getNextStepButton().click();
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static getBackButton() {
|
|
271
|
+
return this.getView().find('.back-btn');
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static back() {
|
|
275
|
+
this.getBackButton().click();
|
|
276
|
+
}
|
|
277
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
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 getFormGroup(index) {
|
|
13
|
+
return this.getDynamicForm().find('.form-group').eq(index).scrollIntoView();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static toggleFormGroupHiddenFields(index) {
|
|
17
|
+
this.getFormGroup(index).find('.toggle-hidden-fields').click();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static getFormGroups() {
|
|
21
|
+
return this.getDynamicForm().find('.form-group');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getVisibleFormGroupFields(groupIndex) {
|
|
25
|
+
return this.getFormGroup(groupIndex).find('> dynamic-form-field .form-field');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static getAllFormGroupFields(groupIndex) {
|
|
29
|
+
return this.getFormGroup(groupIndex).find('.form-field');
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static getFormFields() {
|
|
33
|
+
return this.getDynamicForm().find('.form-field');
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
static getInputField(index) {
|
|
37
|
+
return this.getFormFields().find('.input-field input').eq(index);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static getBooleanField(index) {
|
|
41
|
+
return this.getFormFields().find('.boolean-field input').eq(index);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
static getSelectField(index) {
|
|
45
|
+
return this.getFormFields().find('.select-field select').eq(index);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static getMultiSelectField(index) {
|
|
49
|
+
return this.getFormFields().find('.multiselect-field multiselect-dropdown').eq(index);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static toggleMultiSelectOption(index, optionLabel) {
|
|
53
|
+
this.getMultiSelectField(index)
|
|
54
|
+
.within(() => {
|
|
55
|
+
cy.get('button.dropdown-toggle').click();
|
|
56
|
+
cy.get('ul.dropdown-menu li')
|
|
57
|
+
.contains(optionLabel)
|
|
58
|
+
.click();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static verifyMultiSelectOptionSelected(index, optionLabel) {
|
|
63
|
+
this.getModalTitle().click();
|
|
64
|
+
this.getMultiSelectField(index)
|
|
65
|
+
.within(() => {
|
|
66
|
+
cy.get('button.dropdown-toggle')
|
|
67
|
+
.should('contain.text', optionLabel);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static getJsonField(index) {
|
|
72
|
+
return this.getFormFields().find('.json-field textarea').eq(index);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static clearJsonField(index) {
|
|
76
|
+
return this.getJsonField(index).clear();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static setJsonField(index, value) {
|
|
80
|
+
return this.clearJsonField(index).type(value, {parseSpecialCharSequences:false});
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static fillInputField(index, value) {
|
|
84
|
+
return this.getInputField(index).clear().type(value);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static checkBooleanField(index) {
|
|
88
|
+
return this.getBooleanField(index).check();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static uncheckBooleanField(index) {
|
|
92
|
+
return this.getBooleanField(index).uncheck();
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static toggleBooleanField(index) {
|
|
96
|
+
return this.getBooleanField(index).click();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static selectOption(index, option) {
|
|
100
|
+
this.getSelectField(index).select(option);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static getLoader() {
|
|
104
|
+
return this.getDialog().find('.graphql-endpoint-configuration-loader')
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static getSavingLoader() {
|
|
108
|
+
return this.getDialog().find('.saving-endpoint-settings')
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static validateFormGroups(groups) {
|
|
112
|
+
groups.forEach((group, index) => {
|
|
113
|
+
this.getFormGroup(index).should('be.visible')
|
|
114
|
+
.and('contain', group.label);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static validateFormGroupFields(groupIndex, fields) {
|
|
119
|
+
fields.forEach((field, index) => {
|
|
120
|
+
this.getVisibleFormGroupFields(groupIndex).eq(index).should('be.visible')
|
|
121
|
+
.and('contain', field.label);
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {ModalDialogSteps} from "../modal-dialog-steps";
|
|
2
|
+
|
|
3
|
+
export class GenerationReportModalSteps extends ModalDialogSteps {
|
|
4
|
+
/**
|
|
5
|
+
* Overrides the default method to get the dialog by specifying the class name. This is useful when there are multiple
|
|
6
|
+
* modals on the same page.
|
|
7
|
+
*/
|
|
8
|
+
static getDialog() {
|
|
9
|
+
return cy.get('.endpoint-generation-failure-result-modal');
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static getErrorsCount() {
|
|
13
|
+
return this.getDialogBody().find('.errors-count');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
static getWarningsCount() {
|
|
17
|
+
return this.getDialogBody().find('.warnings-count');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
static getErrors() {
|
|
21
|
+
return this.getDialogBody().find('.error-row');
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getWarnings() {
|
|
25
|
+
return this.getDialogBody().find('.warning-row');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* This method closes the report modal when it is opened on top of some other dialog.
|
|
30
|
+
*/
|
|
31
|
+
static closeChildModal() {
|
|
32
|
+
this.getCloseButton().eq(1).click();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export class GraphiQLEditorToolsSteps {
|
|
2
|
+
|
|
3
|
+
static getGraphiQLEditorTools() {
|
|
4
|
+
return cy.get(".graphiql-editor-tools");
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
static getGraphiQLEditorTabButton(index) {
|
|
8
|
+
return GraphiQLEditorToolsSteps.getGraphiQLEditorTools().find('button').eq(index);
|
|
9
|
+
}
|
|
10
|
+
}
|