graphdb-workbench-tests 2.3.1 → 2.4.0-TR1
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/resource-test-data.ttl +99 -0
- package/fixtures/graphql-editor/default-query-response.json +517 -0
- package/fixtures/locale-en.json +18 -5
- package/fixtures/namespaces/ontotext-generated-namespace.json +22 -0
- package/fixtures/queries/empty-query-response.json +11 -0
- package/integration/explore/graphs.overview.spec.js +4 -2
- package/integration/explore/similariti-index-create.spec.js +315 -0
- package/integration/explore/similarity-index.spec.js +88 -0
- package/integration/explore/similarity.spec.js +156 -47
- package/integration/explore/visual-graph/graphs-config.spec.js +452 -0
- package/integration/explore/{visual.graph.spec.js → visual-graph/visual.graph.spec.js} +145 -348
- package/integration/home/language-change.spec.js +3 -3
- package/integration/import/import.user.data.spec.js +4 -4
- package/integration/resource/resource.spec.js +354 -0
- package/integration/setup/jdbc-create.spec.js +316 -0
- package/integration/setup/jdbc.spec.js +99 -178
- package/integration/setup/my-settings.spec.js +9 -41
- package/integration/setup/sparql-template-create.js +141 -0
- package/integration/setup/sparql-templates.spec.js +82 -146
- package/integration/sparql-editor/actions/execute-query.spec.js +44 -0
- package/integration/sparql-editor/actions/expand-results-over-sameas.spec.js +136 -0
- package/integration/sparql-editor/actions/include-inferred-statements.spec.js +100 -0
- package/integration/sparql-editor/actions/save-query.spec.js +70 -0
- package/integration/sparql-editor/actions/show-saved-queries.spec.js +61 -0
- package/integration/sparql-editor/internationalization.spec.js +41 -0
- package/integration/sparql-editor/saved-query/abort-query.spec.js +60 -0
- package/integration/sparql-editor/saved-query/delete-query.spec.js +56 -0
- package/integration/sparql-editor/saved-query/edit-query.spec.js +68 -0
- package/integration/sparql-editor/saved-query/share-query.spec.js +78 -0
- package/integration/sparql-editor/sparql-editor.spec.js +20 -0
- package/integration/sparql-editor/yasgui-tabs.spec.js +107 -0
- package/integration/sparql-editor/yasr/download-as.spec.js +62 -0
- package/integration/sparql-editor/yasr/pagination.spec.js +234 -0
- package/integration/sparql-editor/yasr/table-plugin.spec.js +191 -0
- package/integration/sparql-editor/yasr/toolbar/visual-button.spec.js +56 -0
- package/integration-flaky/setup/sparql-template-create.js +139 -0
- package/integration-flaky/sparql-editor/actions/execute-update-query.spec.js +89 -0
- package/integration-flaky/sparql-editor/actions/share-query.spec.js +84 -0
- package/integration-flaky/sparql-editor/lucene-connector.spec.js +62 -0
- package/package.json +3 -2
- package/steps/application-steps.js +23 -0
- package/steps/error-steps.js +9 -0
- package/steps/explore/graphs-overview-steps.js +24 -0
- package/steps/explore/similarity-index-create-steps.js +113 -0
- package/steps/explore/similarity-indexes-steps.js +18 -0
- package/steps/import-steps.js +8 -1
- package/steps/language-selector-steps.js +22 -0
- package/steps/loader-steps.js +10 -0
- package/steps/lucene-connector-steps.js +43 -0
- package/steps/main-menu-steps.js +39 -0
- package/steps/modal-dialog-steps.js +113 -0
- package/steps/repository-selector-steps.js +26 -0
- package/steps/resource/resource-edit-steps.js +111 -0
- package/steps/resource/resource-steps.js +145 -0
- package/steps/setup/jdbc-create-steps.js +97 -0
- package/steps/setup/jdbc-steps.js +42 -0
- package/steps/setup/sparql-create-update-steps.js +55 -0
- package/steps/setup/sparql-templates-steps.js +34 -0
- package/steps/sparql-editor-steps.js +20 -0
- package/steps/visual-graph-steps.js +340 -3
- package/steps/yasgui/confirmation-dialog-steps.js +13 -0
- package/steps/yasgui/pagination-steps.js +47 -0
- package/steps/yasgui/plugin/error-plugin-steps.js +10 -0
- package/steps/yasgui/save-query-dialog.js +61 -0
- package/steps/yasgui/saved-queries-dialog.js +29 -0
- package/steps/yasgui/saved-query.js +25 -0
- package/steps/yasgui/share-saved-query-dialog.js +25 -0
- package/steps/yasgui/table-plugin-steps.js +29 -0
- package/steps/yasgui/yasgui-steps.js +191 -0
- package/steps/yasgui/yasqe-steps.js +187 -0
- package/steps/yasgui/yasr-steps.js +105 -0
- package/stubs/namespace-stubs.js +10 -0
- package/stubs/security-stubs.js +69 -0
- package/stubs/yasgui/connectors-stubs.js +12 -0
- package/stubs/yasgui/query-stubs.js +258 -0
- package/support/index.js +2 -0
- package/support/repository-commands.js +6 -1
- package/support/sparql-commands.js +1 -1
- package/support/visual-graph-commands.js +25 -0
- package/integration/sparql/main.menu.spec.js +0 -196
- package/integration/sparql/sparql-error-handling.spec.js +0 -74
- package/integration/sparql/sparql-language-change.spec.js +0 -58
- package/integration/sparql/sparql-result-formating.spec.js +0 -84
- package/integration/sparql/sparql.menu.spec.js +0 -1244
- package/integration-flaky/setup/sparql-templates.spec.js +0 -125
- package/integration-flaky/sparql/sparql-language-change.spec.js +0 -45
- package/integration-flaky/sparql/sparql.menu.spec.js +0 -75
- package/steps/sparql-steps.js +0 -227
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
|
|
2
|
+
|
|
1
3
|
const FILE_TO_IMPORT = 'wine.rdf';
|
|
2
4
|
const DRY_GRAPH = "http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Dry";
|
|
3
5
|
|
|
@@ -27,7 +29,7 @@ describe('Visual graph screen validation', () => {
|
|
|
27
29
|
it('Test notification when autocomplete is disabled', () => {
|
|
28
30
|
cy.visit('graphs-visualizations');
|
|
29
31
|
cy.window();
|
|
30
|
-
getSearchField().should('be.visible').type('http://');
|
|
32
|
+
VisualGraphSteps.getSearchField().should('be.visible').type('http://');
|
|
31
33
|
|
|
32
34
|
// Verify that a message with a redirection to the autocomplete section is displayed.
|
|
33
35
|
cy.get('.autocomplete-toast a').should('contain', 'Autocomplete is OFF')
|
|
@@ -47,7 +49,7 @@ describe('Visual graph screen validation', () => {
|
|
|
47
49
|
});
|
|
48
50
|
|
|
49
51
|
it('Test search for an invalid resource', () => {
|
|
50
|
-
getSearchField().should('be.visible').type('.invalid_resource');
|
|
52
|
+
VisualGraphSteps.getSearchField().should('be.visible').type('.invalid_resource');
|
|
51
53
|
// There are two buttons rendered in the DOM where one of them is hidden. We need the visible one.
|
|
52
54
|
cy.get('.autocomplete-visual-btn:visible').click();
|
|
53
55
|
// Verify that an "Invalid IRI" message is displayed
|
|
@@ -55,63 +57,63 @@ describe('Visual graph screen validation', () => {
|
|
|
55
57
|
});
|
|
56
58
|
|
|
57
59
|
it('Test search for a valid resource', () => {
|
|
58
|
-
searchForResource(VALID_RESOURCE);
|
|
60
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
59
61
|
// Verify redirection to existing visual graph
|
|
60
62
|
cy.url().should('match', /USRegion$/);
|
|
61
63
|
});
|
|
62
64
|
|
|
63
65
|
it('Test default graph state', () => {
|
|
64
|
-
searchForResource(VALID_RESOURCE);
|
|
65
|
-
openVisualGraphSettings();
|
|
66
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
67
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
66
68
|
|
|
67
69
|
cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
|
|
68
70
|
// Verify that the default settings are as follows:
|
|
69
71
|
// Maximum links to show: 20
|
|
70
|
-
getLinksNumberField().and('have.value', '20');
|
|
72
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
71
73
|
// Preferred lang: en
|
|
72
74
|
cy.get('.preferred-languages .tag-item').should('have.length', 1)
|
|
73
75
|
.and('contain', 'en');
|
|
74
76
|
// Include inferred: false
|
|
75
|
-
getIncludeInferredStatementsCheckbox().and('be.checked')
|
|
77
|
+
VisualGraphSteps.getIncludeInferredStatementsCheckbox().and('be.checked')
|
|
76
78
|
.and('not.be.disabled');
|
|
77
79
|
// Expand results over owl:sameAs: false
|
|
78
|
-
getSameAsCheckbox().and('be.checked')
|
|
80
|
+
VisualGraphSteps.getSameAsCheckbox().and('be.checked')
|
|
79
81
|
.and('not.be.disabled');
|
|
80
82
|
// Show predicate labels: true
|
|
81
|
-
getShowPredicateLabelsCheckbox().and('be.checked')
|
|
83
|
+
VisualGraphSteps.getShowPredicateLabelsCheckbox().and('be.checked')
|
|
82
84
|
.and('not.be.disabled');
|
|
83
85
|
|
|
84
86
|
// No pre-added preferred/ignored types
|
|
85
|
-
getPreferredTypesField().and('be.empty');
|
|
86
|
-
getShowPreferredTypesOnlyCheckbox().and(('not.be.checked'))
|
|
87
|
+
VisualGraphSteps.getPreferredTypesField().and('be.empty');
|
|
88
|
+
VisualGraphSteps.getShowPreferredTypesOnlyCheckbox().and(('not.be.checked'))
|
|
87
89
|
.and('not.be.disabled');
|
|
88
|
-
getIgnoredTypesField().should('be.empty');
|
|
90
|
+
VisualGraphSteps.getIgnoredTypesField().should('be.empty');
|
|
89
91
|
|
|
90
92
|
// Go to predicates tab
|
|
91
|
-
openPredicatesTab();
|
|
93
|
+
VisualGraphSteps.openPredicatesTab();
|
|
92
94
|
// No pre-added preferred/ignored predicates
|
|
93
|
-
getPreferredPredicatesField().and('be.empty');
|
|
94
|
-
getShowPreferredPredicatesOnlyCheckbox().and('not.be.checked')
|
|
95
|
+
VisualGraphSteps.getPreferredPredicatesField().and('be.empty');
|
|
96
|
+
VisualGraphSteps.getShowPreferredPredicatesOnlyCheckbox().and('not.be.checked')
|
|
95
97
|
.and('not.be.disabled');
|
|
96
|
-
getIgnoredPredicatesField().and('be.empty');
|
|
98
|
+
VisualGraphSteps.getIgnoredPredicatesField().and('be.empty');
|
|
97
99
|
|
|
98
100
|
// Save and rest buttons should be visible and enabled
|
|
99
101
|
cy.get('@sidepanel').scrollIntoView();
|
|
100
|
-
getSaveSettingsButton().and('not.be.disabled');
|
|
101
|
-
getResetSettingsButton().and('not.be.disabled');
|
|
102
|
+
VisualGraphSteps.getSaveSettingsButton().and('not.be.disabled');
|
|
103
|
+
VisualGraphSteps.getResetSettingsButton().and('not.be.disabled');
|
|
102
104
|
});
|
|
103
105
|
});
|
|
104
106
|
|
|
105
107
|
it('Test invalid links limit should show error to user ', () => {
|
|
106
|
-
searchForResource(VALID_RESOURCE);
|
|
107
|
-
openVisualGraphSettings();
|
|
108
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
109
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
108
110
|
|
|
109
111
|
cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
|
|
110
112
|
// Verify that the default settings are as follows:
|
|
111
113
|
// Maximum links to show: 20
|
|
112
|
-
getLinksNumberField().and('have.value', '20');
|
|
114
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
113
115
|
// Update default 20
|
|
114
|
-
updateLinksLimitField('1001')
|
|
116
|
+
VisualGraphSteps.updateLinksLimitField('1001')
|
|
115
117
|
.then(() => {
|
|
116
118
|
// Try to put invalid value such as 1001
|
|
117
119
|
cy.get('.idError')
|
|
@@ -119,13 +121,13 @@ describe('Visual graph screen validation', () => {
|
|
|
119
121
|
.and('contain.text', 'Invalid links limit');
|
|
120
122
|
});
|
|
121
123
|
// Try to save the invalid value
|
|
122
|
-
getSaveSettingsButton().and('not.be.disabled')
|
|
124
|
+
VisualGraphSteps.getSaveSettingsButton().and('not.be.disabled')
|
|
123
125
|
.click();
|
|
124
126
|
// Then reset to default settings
|
|
125
|
-
getResetSettingsButton().and('not.be.disabled')
|
|
127
|
+
VisualGraphSteps.getResetSettingsButton().and('not.be.disabled')
|
|
126
128
|
.click()
|
|
127
129
|
.then(() => {
|
|
128
|
-
getLinksNumberField().and('have.value', '20');
|
|
130
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
129
131
|
cy.get('.idError')
|
|
130
132
|
.should('not.exist');
|
|
131
133
|
});
|
|
@@ -133,63 +135,63 @@ describe('Visual graph screen validation', () => {
|
|
|
133
135
|
});
|
|
134
136
|
|
|
135
137
|
it('Test search for a valid resource with links', () => {
|
|
136
|
-
searchForResource(VALID_RESOURCE);
|
|
138
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
137
139
|
// Check include inferred
|
|
138
|
-
toggleInferredStatements(true);
|
|
140
|
+
VisualGraphSteps.toggleInferredStatements(true);
|
|
139
141
|
// Navigate to Visual graph menu
|
|
140
|
-
openVisualGraphHome();
|
|
142
|
+
VisualGraphSteps.openVisualGraphHome();
|
|
141
143
|
// Search for "USRegion" again
|
|
142
|
-
searchForResource(VALID_RESOURCE);
|
|
144
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
143
145
|
// Verify that 20 links (nodes) are displayed
|
|
144
|
-
getPredicates().should('have.length', 20);
|
|
146
|
+
VisualGraphSteps.getPredicates().should('have.length', 20);
|
|
145
147
|
// Verify that links are counted by nodes and not by triples (predicates)
|
|
146
|
-
getNodes().and('have.length', 21);
|
|
148
|
+
VisualGraphSteps.getNodes().and('have.length', 21);
|
|
147
149
|
});
|
|
148
150
|
|
|
149
151
|
it('Test collapse and expand a node', () => {
|
|
150
|
-
searchForResource(VALID_RESOURCE);
|
|
151
|
-
toggleInferredStatements(false);
|
|
152
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
153
|
+
VisualGraphSteps.toggleInferredStatements(false);
|
|
152
154
|
|
|
153
155
|
// Hover over node with the mouse and collapse it through the menu
|
|
154
|
-
getTargetNode().trigger('mouseover');
|
|
155
|
-
collapseGraph();
|
|
156
|
+
VisualGraphSteps.getTargetNode().trigger('mouseover');
|
|
157
|
+
VisualGraphSteps.collapseGraph();
|
|
156
158
|
|
|
157
159
|
// Verify that all links to the USRegion node are collapsed
|
|
158
|
-
getPredicates().should('have.length', 0);
|
|
160
|
+
VisualGraphSteps.getPredicates().should('have.length', 0);
|
|
159
161
|
// Verify that the USRegion node is the only node left in the graph
|
|
160
|
-
getNodes().and('have.length', 1).and('contain', 'USRegion');
|
|
162
|
+
VisualGraphSteps.getNodes().and('have.length', 1).and('contain', 'USRegion');
|
|
161
163
|
|
|
162
164
|
// Hover over node with the mouse and expand it through the menu
|
|
163
|
-
getTargetNode().trigger('mouseover');
|
|
164
|
-
expandGraph();
|
|
165
|
+
VisualGraphSteps.getTargetNode().trigger('mouseover');
|
|
166
|
+
VisualGraphSteps.expandGraph();
|
|
165
167
|
|
|
166
168
|
// Verify that all links to the USRegion node are expanded
|
|
167
|
-
getPredicates().should('have.length', 3);
|
|
169
|
+
VisualGraphSteps.getPredicates().should('have.length', 3);
|
|
168
170
|
// Verify that the USRegion node is not the only node left in the graph
|
|
169
|
-
getNodes().and('have.length', 4);
|
|
171
|
+
VisualGraphSteps.getNodes().and('have.length', 4);
|
|
170
172
|
});
|
|
171
173
|
|
|
172
174
|
it('Test expand and collapse node info panel with single click', () => {
|
|
173
|
-
searchForResource(VALID_RESOURCE);
|
|
175
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
174
176
|
|
|
175
177
|
// Click once on the node with the mouse to open node's info panel
|
|
176
|
-
getTargetNode().click();
|
|
178
|
+
VisualGraphSteps.getTargetNode().click();
|
|
177
179
|
// Verify that a side panel is displayed containing info about the resource
|
|
178
|
-
getNodeInfoPanel().should('be.visible')
|
|
180
|
+
VisualGraphSteps.getNodeInfoPanel().should('be.visible')
|
|
179
181
|
.find('.uri')
|
|
180
182
|
.should('be.visible')
|
|
181
183
|
.and('contain', VALID_RESOURCE);
|
|
182
184
|
|
|
183
185
|
// Close side panel and verify it's missing
|
|
184
|
-
getTargetNode().click();
|
|
185
|
-
getNodeInfoPanel().should('not.exist');
|
|
186
|
+
VisualGraphSteps.getTargetNode().click();
|
|
187
|
+
VisualGraphSteps.getNodeInfoPanel().should('not.exist');
|
|
186
188
|
});
|
|
187
189
|
|
|
188
190
|
it('Test remove child node', () => {
|
|
189
|
-
searchForResource(VALID_RESOURCE);
|
|
190
|
-
toggleInferredStatements(false);
|
|
191
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
192
|
+
VisualGraphSteps.toggleInferredStatements(false);
|
|
191
193
|
// Verify that before given node is removed there are 4 of them
|
|
192
|
-
getNodes().and('have.length', 4);
|
|
194
|
+
VisualGraphSteps.getNodes().and('have.length', 4);
|
|
193
195
|
// Click once on node different than parent one with the mouse
|
|
194
196
|
cy.get('.node-wrapper circle').eq(1)
|
|
195
197
|
// The wait is needed because mouseover event will result in
|
|
@@ -197,48 +199,48 @@ describe('Visual graph screen validation', () => {
|
|
|
197
199
|
.should('be.visible').wait(5000)
|
|
198
200
|
.trigger('mouseover', {force: true});
|
|
199
201
|
// Select remove function
|
|
200
|
-
removeNode();
|
|
202
|
+
VisualGraphSteps.removeNode();
|
|
201
203
|
// Verify that links between parent node and the child nodes are expanded
|
|
202
|
-
getPredicates().should('have.length', 2);
|
|
204
|
+
VisualGraphSteps.getPredicates().should('have.length', 2);
|
|
203
205
|
// Verify that the nodes left are one less
|
|
204
|
-
getNodes().and('have.length', 3);
|
|
206
|
+
VisualGraphSteps.getNodes().and('have.length', 3);
|
|
205
207
|
});
|
|
206
208
|
|
|
207
209
|
it('Test remove parent node', () => {
|
|
208
|
-
searchForResource(VALID_RESOURCE);
|
|
210
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
209
211
|
|
|
210
212
|
// Verify that search bar isn't visible
|
|
211
|
-
getSearchField().should('not.exist');
|
|
213
|
+
VisualGraphSteps.getSearchField().should('not.exist');
|
|
212
214
|
// Hover over node with the mouse
|
|
213
|
-
getTargetNode().trigger('mouseover');
|
|
215
|
+
VisualGraphSteps.getTargetNode().trigger('mouseover');
|
|
214
216
|
// Select remove function for the parent node
|
|
215
|
-
removeNode();
|
|
217
|
+
VisualGraphSteps.removeNode();
|
|
216
218
|
cy.get('.graph-visualization').should('not.be.visible');
|
|
217
219
|
// Verify that the search bar re-appears on the screen
|
|
218
220
|
cy.get('.incontext-search-rdf-resource input').should('be.visible');
|
|
219
221
|
});
|
|
220
222
|
|
|
221
223
|
it('Test expand collapsed node which has connections with double click', () => {
|
|
222
|
-
searchForResource(VALID_RESOURCE);
|
|
223
|
-
toggleInferredStatements(false);
|
|
224
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
225
|
+
VisualGraphSteps.toggleInferredStatements(false);
|
|
224
226
|
|
|
225
|
-
getTargetNode().trigger('mouseover');
|
|
226
|
-
collapseGraph();
|
|
227
|
+
VisualGraphSteps.getTargetNode().trigger('mouseover');
|
|
228
|
+
VisualGraphSteps.collapseGraph();
|
|
227
229
|
// Verify that all links to the USRegion node are collapsed
|
|
228
|
-
getPredicates().should('not.exist');
|
|
230
|
+
VisualGraphSteps.getPredicates().should('not.exist');
|
|
229
231
|
// Verify that the USRegion node is the only node left in the graph
|
|
230
|
-
getNodes().and('have.length', 1).and('contain', 'USRegion');
|
|
232
|
+
VisualGraphSteps.getNodes().and('have.length', 1).and('contain', 'USRegion');
|
|
231
233
|
|
|
232
234
|
// Double click on collapsed node
|
|
233
235
|
// This is ugly but unfortunately I couldn't make cypress's dblclick to work reliably here
|
|
234
|
-
getTargetNodeElement().click().then(() => {
|
|
235
|
-
getTargetNodeElement().click();
|
|
236
|
+
VisualGraphSteps.getTargetNodeElement().click().then(() => {
|
|
237
|
+
VisualGraphSteps.getTargetNodeElement().click();
|
|
236
238
|
});
|
|
237
239
|
|
|
238
240
|
// Verify that all links to the USRegion node are expanded
|
|
239
|
-
getPredicates().should('have.length', 3);
|
|
241
|
+
VisualGraphSteps.getPredicates().should('have.length', 3);
|
|
240
242
|
// Verify that the USRegion node is not the only node left in the graph
|
|
241
|
-
getNodes().and('have.length', 4);
|
|
243
|
+
VisualGraphSteps.getNodes().and('have.length', 4);
|
|
242
244
|
});
|
|
243
245
|
|
|
244
246
|
it('Test verify mouse/keyboard actions', () => {
|
|
@@ -271,6 +273,7 @@ describe('Visual graph screen validation', () => {
|
|
|
271
273
|
'Right arrow\n \n ' +
|
|
272
274
|
'Rotate the graph to the right\n';
|
|
273
275
|
|
|
276
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
274
277
|
// Click on "mouse and keyboard actions" in the lower right corner of the screen
|
|
275
278
|
cy.get('#keyboardShortcuts').click();
|
|
276
279
|
// Verify all mouse and actions
|
|
@@ -286,63 +289,63 @@ describe('Visual graph screen validation', () => {
|
|
|
286
289
|
});
|
|
287
290
|
|
|
288
291
|
it('Test maximum links to show', () => {
|
|
289
|
-
searchForResource(VALID_RESOURCE);
|
|
292
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
290
293
|
|
|
291
294
|
// Verify that 20 links (nodes) are displayed
|
|
292
|
-
getPredicates().should('have.length', 20);
|
|
295
|
+
VisualGraphSteps.getPredicates().should('have.length', 20);
|
|
293
296
|
|
|
294
|
-
openVisualGraphSettings();
|
|
297
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
295
298
|
// Set maximum links to 2
|
|
296
|
-
updateLinksLimitField('2');
|
|
297
|
-
saveSettings();
|
|
299
|
+
VisualGraphSteps.updateLinksLimitField('2');
|
|
300
|
+
VisualGraphSteps.saveSettings();
|
|
298
301
|
// Verify that the diagram is updated
|
|
299
|
-
getPredicates().should('have.length', 2);
|
|
302
|
+
VisualGraphSteps.getPredicates().should('have.length', 2);
|
|
300
303
|
|
|
301
|
-
openVisualGraphSettings();
|
|
304
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
302
305
|
// Set maximum links to 100
|
|
303
|
-
updateLinksLimitField('100');
|
|
304
|
-
saveSettings();
|
|
306
|
+
VisualGraphSteps.updateLinksLimitField('100');
|
|
307
|
+
VisualGraphSteps.saveSettings();
|
|
305
308
|
// Verify that the diagram is updated
|
|
306
|
-
getPredicates().should('have.length', 36);
|
|
309
|
+
VisualGraphSteps.getPredicates().should('have.length', 36);
|
|
307
310
|
});
|
|
308
311
|
|
|
309
312
|
it('Test include inferred Statements', () => {
|
|
310
|
-
searchForResource(VALID_RESOURCE);
|
|
313
|
+
VisualGraphSteps.searchForResource(VALID_RESOURCE);
|
|
311
314
|
// Check include inferred
|
|
312
|
-
toggleInferredStatements(true);
|
|
315
|
+
VisualGraphSteps.toggleInferredStatements(true);
|
|
313
316
|
|
|
314
317
|
// Verify that many results are displayed
|
|
315
318
|
// Verify that 20 links (nodes) are displayed
|
|
316
|
-
getPredicates().should('have.length', 20);
|
|
319
|
+
VisualGraphSteps.getPredicates().should('have.length', 20);
|
|
317
320
|
// Verify that more than three nodes are displayed
|
|
318
|
-
getNodes().and('have.length', 21);
|
|
321
|
+
VisualGraphSteps.getNodes().and('have.length', 21);
|
|
319
322
|
|
|
320
323
|
// Switch Include Inferred Statements off
|
|
321
|
-
toggleInferredStatements(false);
|
|
324
|
+
VisualGraphSteps.toggleInferredStatements(false);
|
|
322
325
|
|
|
323
326
|
// Verify that 20 links (nodes) are displayed
|
|
324
|
-
getPredicates().should('have.length', 3);
|
|
327
|
+
VisualGraphSteps.getPredicates().should('have.length', 3);
|
|
325
328
|
|
|
326
329
|
// Verify that three nodes are displayed
|
|
327
|
-
getNodes().should('have.length', 4);
|
|
330
|
+
VisualGraphSteps.getNodes().should('have.length', 4);
|
|
328
331
|
|
|
329
332
|
// Verify that only "Texas" and "California" regions are displayed
|
|
330
|
-
getNodes().and('contain', 'Texas').and('contain', 'California');
|
|
333
|
+
VisualGraphSteps.getNodes().and('contain', 'Texas').and('contain', 'California');
|
|
331
334
|
});
|
|
332
335
|
|
|
333
336
|
it('Test preferred types', () => {
|
|
334
337
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
335
338
|
|
|
336
|
-
openVisualGraphSettings();
|
|
339
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
337
340
|
// Set "vin:Chardonnay" as a preferred type
|
|
338
|
-
getPreferredTypesField().clear().type('vin:Chardonnay');
|
|
341
|
+
VisualGraphSteps.getPreferredTypesField().clear().type('vin:Chardonnay');
|
|
339
342
|
// Select "Show preferred types only"
|
|
340
|
-
showPreferredTypes(true);
|
|
343
|
+
VisualGraphSteps.showPreferredTypes(true);
|
|
341
344
|
|
|
342
|
-
saveSettings();
|
|
345
|
+
VisualGraphSteps.saveSettings();
|
|
343
346
|
|
|
344
347
|
// Verify that there are a total of 6 ( 5 children plus one parent nodes ) are connected to the DRY node
|
|
345
|
-
getNodes().and('have.length', 6).each(($el) => {
|
|
348
|
+
VisualGraphSteps.getNodes().and('have.length', 6).each(($el) => {
|
|
346
349
|
// Exclude parent node
|
|
347
350
|
if ($el.text() !== 'Dry') {
|
|
348
351
|
expect($el.text()).to.contain('Chardonnay');
|
|
@@ -354,350 +357,144 @@ describe('Visual graph screen validation', () => {
|
|
|
354
357
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
355
358
|
|
|
356
359
|
// Pick a type that is displayed in the diagram for example "vin:Zinfandel"
|
|
357
|
-
getNodes().and('contain', 'Zinfandel');
|
|
360
|
+
VisualGraphSteps.getNodes().and('contain', 'Zinfandel');
|
|
358
361
|
|
|
359
|
-
openVisualGraphSettings();
|
|
362
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
360
363
|
// Set the connections limit to 10
|
|
361
|
-
updateLinksLimitField('10');
|
|
364
|
+
VisualGraphSteps.updateLinksLimitField('10');
|
|
362
365
|
// Go to Settings and set "vin:Zinfandel" as an ignored type
|
|
363
|
-
getIgnoredTypesField().clear().type('vin:Zinfandel').type('{enter}');
|
|
366
|
+
VisualGraphSteps.getIgnoredTypesField().clear().type('vin:Zinfandel').type('{enter}');
|
|
364
367
|
|
|
365
|
-
saveSettings();
|
|
368
|
+
VisualGraphSteps.saveSettings();
|
|
366
369
|
// Verify that "vin:Zinfandel" has been removed from the diagram
|
|
367
|
-
getNodes().and('not.contain', 'Zinfandel');
|
|
370
|
+
VisualGraphSteps.getNodes().and('not.contain', 'Zinfandel');
|
|
368
371
|
});
|
|
369
372
|
|
|
370
373
|
it('Test preferred predicates', () => {
|
|
371
374
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
372
375
|
|
|
373
|
-
openVisualGraphSettings();
|
|
376
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
374
377
|
// Go to predicates tab
|
|
375
|
-
openPredicatesTab();
|
|
378
|
+
VisualGraphSteps.openPredicatesTab();
|
|
376
379
|
// Set "vin:hasSugar" as a preferred predicate
|
|
377
|
-
getPreferredPredicatesField().clear().type('vin:hasSugar');
|
|
380
|
+
VisualGraphSteps.getPreferredPredicatesField().clear().type('vin:hasSugar');
|
|
378
381
|
// Select "Show preferred predicates only"
|
|
379
|
-
getShowPreferredPredicatesOnlyCheckbox().check();
|
|
382
|
+
VisualGraphSteps.getShowPreferredPredicatesOnlyCheckbox().check();
|
|
380
383
|
|
|
381
|
-
saveSettings();
|
|
384
|
+
VisualGraphSteps.saveSettings();
|
|
382
385
|
// Verify that only the "vin:hasSugar" predicate is displayed between the nodes
|
|
383
|
-
getPredicates().should('contain', 'hasSugar');
|
|
386
|
+
VisualGraphSteps.getPredicates().should('contain', 'hasSugar');
|
|
384
387
|
});
|
|
385
388
|
|
|
386
389
|
it('Test ignored predicates', () => {
|
|
387
390
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
388
|
-
toggleInferredStatements(false);
|
|
391
|
+
VisualGraphSteps.toggleInferredStatements(false);
|
|
389
392
|
|
|
390
393
|
// Pick a type that is displayed in the diagram for example "vin:Zinfandel"
|
|
391
|
-
getPredicates().should('contain', 'hasSugar');
|
|
394
|
+
VisualGraphSteps.getPredicates().should('contain', 'hasSugar');
|
|
392
395
|
|
|
393
|
-
openVisualGraphSettings();
|
|
396
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
394
397
|
// Go to predicates tab
|
|
395
|
-
openPredicatesTab();
|
|
398
|
+
VisualGraphSteps.openPredicatesTab();
|
|
396
399
|
|
|
397
400
|
// Set the connections limit to 10
|
|
398
|
-
updateLinksLimitField('10');
|
|
401
|
+
VisualGraphSteps.updateLinksLimitField('10');
|
|
399
402
|
// Set "vin:hasSugar" as an ignored predicate
|
|
400
|
-
getIgnoredPredicatesField().clear().type('vin:hasSugar').type('{enter}');
|
|
403
|
+
VisualGraphSteps.getIgnoredPredicatesField().clear().type('vin:hasSugar').type('{enter}');
|
|
401
404
|
|
|
402
|
-
saveSettings();
|
|
405
|
+
VisualGraphSteps.saveSettings();
|
|
403
406
|
|
|
404
407
|
// Verify that "vin:hasSugar" has been removed from the diagram
|
|
405
|
-
getPredicates().should('not.contain', 'hasSugar');
|
|
408
|
+
VisualGraphSteps.getPredicates().should('not.contain', 'hasSugar');
|
|
406
409
|
});
|
|
407
410
|
|
|
408
411
|
it('Test reset settings', () => {
|
|
409
412
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
410
413
|
|
|
411
414
|
// Modify the settings first
|
|
412
|
-
openVisualGraphSettings();
|
|
415
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
413
416
|
// Verify that the default settings are as follows:
|
|
414
417
|
// Maximum links to show: 20
|
|
415
|
-
updateLinksLimitField('10')
|
|
418
|
+
VisualGraphSteps.updateLinksLimitField('10')
|
|
416
419
|
.should('have.value', '10');
|
|
417
420
|
// Preferred lang: en
|
|
418
421
|
cy.get('.preferred-languages .tag-item').should('have.length', 1)
|
|
419
422
|
.eq(0).should('contain', 'en');
|
|
420
423
|
// Include inferred: false
|
|
421
|
-
getIncludeInferredStatementsCheckbox().check()
|
|
424
|
+
VisualGraphSteps.getIncludeInferredStatementsCheckbox().check()
|
|
422
425
|
.should('be.checked');
|
|
423
426
|
// Expand results over owl:sameAs: false
|
|
424
|
-
getSameAsCheckbox().check()
|
|
427
|
+
VisualGraphSteps.getSameAsCheckbox().check()
|
|
425
428
|
.should('be.checked');
|
|
426
429
|
// Show predicate labels: true
|
|
427
|
-
getShowPredicateLabelsCheckbox().uncheck()
|
|
430
|
+
VisualGraphSteps.getShowPredicateLabelsCheckbox().uncheck()
|
|
428
431
|
.should('not.be.checked');
|
|
429
432
|
|
|
430
433
|
// No pre-added preferred/ignored types
|
|
431
|
-
getPreferredTypesField().type('vin:PinotNoir')
|
|
434
|
+
VisualGraphSteps.getPreferredTypesField().type('vin:PinotNoir')
|
|
432
435
|
.should('have.value', 'vin:PinotNoir');
|
|
433
|
-
getShowPreferredTypesOnlyCheckbox().check()
|
|
436
|
+
VisualGraphSteps.getShowPreferredTypesOnlyCheckbox().check()
|
|
434
437
|
.should('be.checked');
|
|
435
|
-
getIgnoredTypesField().type('vin:PinotNoir')
|
|
438
|
+
VisualGraphSteps.getIgnoredTypesField().type('vin:PinotNoir')
|
|
436
439
|
.should('have.value', 'vin:PinotNoir');
|
|
437
440
|
|
|
438
441
|
// Go to predicates tab
|
|
439
|
-
openPredicatesTab();
|
|
442
|
+
VisualGraphSteps.openPredicatesTab();
|
|
440
443
|
// No pre-added preferred/ignored predicates
|
|
441
|
-
getPreferredPredicatesField().type('vin:hasSugar')
|
|
444
|
+
VisualGraphSteps.getPreferredPredicatesField().type('vin:hasSugar')
|
|
442
445
|
.should('have.value', 'vin:hasSugar');
|
|
443
|
-
getShowPreferredPredicatesOnlyCheckbox().check()
|
|
446
|
+
VisualGraphSteps.getShowPreferredPredicatesOnlyCheckbox().check()
|
|
444
447
|
.should('be.checked');
|
|
445
|
-
getIgnoredPredicatesField().type('vin:hasSugar')
|
|
448
|
+
VisualGraphSteps.getIgnoredPredicatesField().type('vin:hasSugar')
|
|
446
449
|
.should('have.value', 'vin:hasSugar');
|
|
447
450
|
|
|
448
|
-
saveSettings();
|
|
451
|
+
VisualGraphSteps.saveSettings();
|
|
449
452
|
|
|
450
453
|
// Reset settings and verify everything is reverted to its default
|
|
451
|
-
openVisualGraphSettings();
|
|
452
|
-
resetSettings();
|
|
453
|
-
saveSettings();
|
|
454
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
455
|
+
VisualGraphSteps.resetSettings();
|
|
456
|
+
VisualGraphSteps.saveSettings();
|
|
454
457
|
|
|
455
|
-
openVisualGraphSettings();
|
|
458
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
456
459
|
// Verify that the default settings are as follows:
|
|
457
460
|
// Maximum links to show: 20
|
|
458
|
-
getLinksNumberField().and('have.value', '20');
|
|
461
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
459
462
|
// Preferred lang: en
|
|
460
463
|
cy.get('.preferred-languages .tag-item').should('have.length', 1);
|
|
461
464
|
// Include inferred: false
|
|
462
|
-
getIncludeInferredStatementsCheckbox().and('be.checked')
|
|
465
|
+
VisualGraphSteps.getIncludeInferredStatementsCheckbox().and('be.checked')
|
|
463
466
|
.and('not.be.disabled');
|
|
464
467
|
// Expand results over owl:sameAs: true
|
|
465
|
-
getSameAsCheckbox().and('be.checked')
|
|
468
|
+
VisualGraphSteps.getSameAsCheckbox().and('be.checked')
|
|
466
469
|
.and('not.be.disabled');
|
|
467
470
|
// Show predicate labels: true
|
|
468
|
-
getShowPredicateLabelsCheckbox().and('be.checked')
|
|
471
|
+
VisualGraphSteps.getShowPredicateLabelsCheckbox().and('be.checked')
|
|
469
472
|
.and('not.be.disabled');
|
|
470
473
|
|
|
471
474
|
// No pre-added preferred/ignored types
|
|
472
|
-
getPreferredTypesField().and('be.empty');
|
|
473
|
-
getShowPreferredTypesOnlyCheckbox().and(('not.be.checked'))
|
|
475
|
+
VisualGraphSteps.getPreferredTypesField().and('be.empty');
|
|
476
|
+
VisualGraphSteps.getShowPreferredTypesOnlyCheckbox().and(('not.be.checked'))
|
|
474
477
|
.and('not.be.disabled');
|
|
475
|
-
getIgnoredTypesField().should('be.empty');
|
|
478
|
+
VisualGraphSteps.getIgnoredTypesField().should('be.empty');
|
|
476
479
|
|
|
477
480
|
// Go to predicates tab
|
|
478
|
-
openPredicatesTab();
|
|
481
|
+
VisualGraphSteps.openPredicatesTab();
|
|
479
482
|
// No pre-added preferred/ignored predicates
|
|
480
|
-
getPreferredPredicatesField().and('be.empty');
|
|
481
|
-
getShowPreferredPredicatesOnlyCheckbox().and(('not.be.checked'))
|
|
483
|
+
VisualGraphSteps.getPreferredPredicatesField().and('be.empty');
|
|
484
|
+
VisualGraphSteps.getShowPreferredPredicatesOnlyCheckbox().and(('not.be.checked'))
|
|
482
485
|
.and('not.be.disabled');
|
|
483
|
-
getIgnoredPredicatesField().and('be.empty');
|
|
486
|
+
VisualGraphSteps.getIgnoredPredicatesField().and('be.empty');
|
|
484
487
|
});
|
|
485
488
|
|
|
486
489
|
it('Test include schema statements', () => {
|
|
487
490
|
cy.searchEasyVisualGraph(DRY_GRAPH);
|
|
488
|
-
getPredicates().should('contain', 'type');
|
|
489
|
-
openVisualGraphSettings();
|
|
490
|
-
getSettingsPanel().should('be.visible');
|
|
491
|
+
VisualGraphSteps.getPredicates().should('contain', 'type');
|
|
492
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
493
|
+
VisualGraphSteps.getSettingsPanel().should('be.visible');
|
|
491
494
|
cy.get('.include-schema-statements').should('be.checked');
|
|
492
495
|
cy.get('.include-schema-statements').uncheck();
|
|
493
|
-
saveSettings();
|
|
494
|
-
getPredicates().should('not.exist');
|
|
496
|
+
VisualGraphSteps.saveSettings();
|
|
497
|
+
VisualGraphSteps.getPredicates().should('not.exist');
|
|
495
498
|
});
|
|
496
499
|
});
|
|
497
|
-
|
|
498
|
-
it('Test can create custom visual graph', () => {
|
|
499
|
-
cy.visit('graphs-visualizations');
|
|
500
|
-
getCreateCustomGraphLink().click();
|
|
501
|
-
cy.url().should('include', '/config/save');
|
|
502
|
-
getGraphConfigName().type('configName');
|
|
503
|
-
|
|
504
|
-
cy.get('.page-1-link').should('be.visible')
|
|
505
|
-
.and('contain', 'Starting point')
|
|
506
|
-
.and('have.class', 'active');
|
|
507
|
-
cy.get('.page-2-link').should('be.visible')
|
|
508
|
-
.and('contain', 'Graph expansion');
|
|
509
|
-
cy.get('.page-3-link').should('be.visible')
|
|
510
|
-
.and('contain', 'Node basics');
|
|
511
|
-
cy.get('.page-4-link').should('be.visible')
|
|
512
|
-
.and('contain', 'Edge basics');
|
|
513
|
-
cy.get('.page-5-link').should('be.visible')
|
|
514
|
-
.and('contain', 'Node extra');
|
|
515
|
-
cy.get('.page-2-link').click();
|
|
516
|
-
cy.get('.page-2-link').should('have.class', 'active');
|
|
517
|
-
|
|
518
|
-
cy.get('.expand-samples .list-group-item').first().click();
|
|
519
|
-
getSaveConfig().click();
|
|
520
|
-
cy.url().should('eq', Cypress.config('baseUrl') + '/graphs-visualizations');
|
|
521
|
-
getGraphConfigurationsArea().should('be.visible')
|
|
522
|
-
.and('contain', 'configName');
|
|
523
|
-
getGraphConfigurationsArea().should('be.visible')
|
|
524
|
-
.and('contain', 'No graph configs');
|
|
525
|
-
});
|
|
526
|
-
|
|
527
|
-
// Visual graph home view access
|
|
528
|
-
|
|
529
|
-
function getSearchField() {
|
|
530
|
-
return cy.get('.search-rdf-resources input:visible');
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
function searchForResource(resource) {
|
|
534
|
-
// verify that the easy graph search has occured and a valid resource was input and only
|
|
535
|
-
// after that execute the next operation
|
|
536
|
-
cy.searchEasyVisualGraph(resource)
|
|
537
|
-
.then(() => {
|
|
538
|
-
// Verify redirection to existing visual graph
|
|
539
|
-
cy.waitUntil(() =>
|
|
540
|
-
cy.get('.graph-visualization')
|
|
541
|
-
.find('.nodes-container')
|
|
542
|
-
.then((nodesContainer) => nodesContainer))
|
|
543
|
-
.then(() => {
|
|
544
|
-
getNodes();
|
|
545
|
-
});
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function getTargetNodeElement() {
|
|
550
|
-
return cy.get(`[id="http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#${VALID_RESOURCE}"] circle`).should('be.visible');
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
function getTargetNode() {
|
|
554
|
-
// The wait is needed because mouseover event will result in
|
|
555
|
-
// pop-up of menu icons only if nodes are not moving
|
|
556
|
-
return getTargetNodeElement().wait(5000);
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
function getNodes() {
|
|
560
|
-
return cy.get('.node-wrapper').should('be.visible');
|
|
561
|
-
}
|
|
562
|
-
|
|
563
|
-
function getPredicates() {
|
|
564
|
-
return cy.get('.predicate');
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
function getNodeInfoPanel() {
|
|
568
|
-
return cy.get('.rdf-info-side-panel .tab-content');
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
function getSettingsPanel() {
|
|
572
|
-
return cy.get('.rdf-info-side-panel .filter-sidepanel');
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
// Visual graph settings form field access
|
|
576
|
-
|
|
577
|
-
function openPredicatesTab() {
|
|
578
|
-
cy.get('.predicates-tab').should('be.visible').click();
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
function showPreferredTypes(enable) {
|
|
582
|
-
const command = enable ? 'check' : 'uncheck';
|
|
583
|
-
getShowPreferredTypesOnlyCheckbox()[command]();
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
function toggleInferredStatements(enable) {
|
|
587
|
-
openVisualGraphSettings();
|
|
588
|
-
getSettingsPanel().should('be.visible');
|
|
589
|
-
const command = enable ? 'check' : 'uncheck';
|
|
590
|
-
getIncludeInferredStatementsCheckbox()[command]();
|
|
591
|
-
saveSettings();
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
function getLinksNumberField() {
|
|
595
|
-
// This element could not be checked with 'be.visible' because it has
|
|
596
|
-
// CSS property: 'position: fixed' and its being covered by another element
|
|
597
|
-
return cy.get('.input-number');
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
function getSaveSettingsButton() {
|
|
601
|
-
return cy.get('.save-settings-btn').scrollIntoView().should('be.visible');
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
function saveSettings() {
|
|
605
|
-
getSaveSettingsButton().click();
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
function getResetSettingsButton() {
|
|
609
|
-
return cy.get('.reset-settings').scrollIntoView().should('be.visible');
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
function resetSettings() {
|
|
613
|
-
getResetSettingsButton().click();
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
function getSameAsCheckbox() {
|
|
617
|
-
return cy.get('#sameAsCheck').should('be.visible');
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
function getIncludeInferredStatementsCheckbox() {
|
|
621
|
-
return cy.get('.include-inferred-statements').should('be.visible');
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
function getShowPredicateLabelsCheckbox() {
|
|
625
|
-
return cy.get('.show-predicate-labels').should('be.visible');
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
function getPreferredTypesField() {
|
|
629
|
-
return cy.get('.preferred-types input').scrollIntoView().should('be.visible');
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
function getShowPreferredTypesOnlyCheckbox() {
|
|
633
|
-
return cy.get('.show-preferred-types-only').should('be.visible');
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
function getIgnoredTypesField() {
|
|
637
|
-
// This element could not be checked with 'be.visible' because it has
|
|
638
|
-
// CSS property: 'position: fixed' and its being covered by another element
|
|
639
|
-
return cy.get('.ignored-types input');
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
function getPreferredPredicatesField() {
|
|
643
|
-
return cy.get('.preferred-predicates input').should('be.visible');
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
function getShowPreferredPredicatesOnlyCheckbox() {
|
|
647
|
-
return cy.get('.show-preferred-predicates-only').should('be.visible');
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
function getIgnoredPredicatesField() {
|
|
651
|
-
// This element could not be checked with 'be.visible' because it has
|
|
652
|
-
// CSS property: 'position: fixed' and its being covered by another element
|
|
653
|
-
return cy.get('.ignored-predicates input');
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
function getCreateCustomGraphLink() {
|
|
657
|
-
return cy.get('.create-graph-config').should('be.visible');
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
function getGraphConfigName() {
|
|
661
|
-
return cy.get('.graph-config-name').should('be.visible');
|
|
662
|
-
}
|
|
663
|
-
|
|
664
|
-
function getSaveConfig() {
|
|
665
|
-
return cy.get('.btn-save-config').should('be.visible');
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
function getGraphConfigurationsArea() {
|
|
669
|
-
return cy.get('.graph-configurations');
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
// Node actions
|
|
674
|
-
|
|
675
|
-
function collapseGraph() {
|
|
676
|
-
cy.get('.menu-events .collapse-icon circle').should('be.visible').click();
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
function expandGraph() {
|
|
680
|
-
cy.get('.menu-events .expand-icon circle').should('be.visible').click();
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
function removeNode() {
|
|
684
|
-
cy.get('.menu-events .close-icon circle').click({force: true});
|
|
685
|
-
}
|
|
686
|
-
|
|
687
|
-
// Visual graph toolbar actions
|
|
688
|
-
|
|
689
|
-
function openVisualGraphSettings() {
|
|
690
|
-
return cy.get('.toolbar-holder').should('be.visible')
|
|
691
|
-
.find('.visual-graph-settings-btn')
|
|
692
|
-
.should('be.visible').click();
|
|
693
|
-
}
|
|
694
|
-
|
|
695
|
-
function openVisualGraphHome() {
|
|
696
|
-
cy.get('.toolbar-holder').should('be.visible')
|
|
697
|
-
.find('.return-home-btn').should('be.visible').click();
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
function updateLinksLimitField(value) {
|
|
701
|
-
return getLinksNumberField().invoke('val', value).trigger('change', {force: true});
|
|
702
|
-
}
|
|
703
500
|
});
|