graphdb-workbench-tests 1.11.0 → 1.11.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/repo-template.json +1 -1
- package/integration/explore/visual.graph.spec.js +7 -11
- package/integration/home/workbench.home.spec.js +9 -18
- package/integration/import/onto-refine.spec.js +135 -0
- package/integration/repository/repositories.spec.js +14 -33
- package/integration/setup/connectors-lucene.spec.js +28 -31
- package/integration/setup/rdf-rank.spec.js +1 -1
- package/integration/sparql/main.menu.spec.js +13 -13
- package/integration/sparql/sparql.menu.spec.js +5 -14
- package/package.json +1 -1
- package/support/sparql-commands.js +2 -4
- package/integration/setup/plugins.spec.js +0 -69
|
@@ -537,18 +537,14 @@ describe('Visual graph screen validation', () => {
|
|
|
537
537
|
}
|
|
538
538
|
|
|
539
539
|
function searchForResource(resource) {
|
|
540
|
-
|
|
541
|
-
//
|
|
542
|
-
cy.
|
|
540
|
+
cy.searchEasyVisualGraph(resource);
|
|
541
|
+
// Verify redirection to existing visual graph
|
|
542
|
+
cy.waitUntil(() =>
|
|
543
|
+
cy.get('.graph-visualization')
|
|
544
|
+
.find('.nodes-container')
|
|
545
|
+
.then(nodesContainer => nodesContainer))
|
|
543
546
|
.then(() => {
|
|
544
|
-
|
|
545
|
-
cy.waitUntil(() =>
|
|
546
|
-
cy.get('.graph-visualization')
|
|
547
|
-
.find('.nodes-container')
|
|
548
|
-
.then(nodesContainer => nodesContainer))
|
|
549
|
-
.then(() => {
|
|
550
|
-
getNodes();
|
|
551
|
-
});
|
|
547
|
+
getNodes();
|
|
552
548
|
});
|
|
553
549
|
}
|
|
554
550
|
|
|
@@ -107,18 +107,11 @@ describe('Home screen validation', () => {
|
|
|
107
107
|
// When I click the button
|
|
108
108
|
HomeSteps.openRdfSearchBox();
|
|
109
109
|
// I should be able to type some text in the input
|
|
110
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input')
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.click()
|
|
116
|
-
.then(() => {
|
|
117
|
-
// Search result should be opened in new window
|
|
118
|
-
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
|
|
119
|
-
});
|
|
120
|
-
});
|
|
121
|
-
|
|
110
|
+
cy.get('.search-rdf-input search-resource-input .view-res-input').type('hasPos');
|
|
111
|
+
// When I select option from suggestions
|
|
112
|
+
cy.get(".search-rdf-input #auto-complete-results-wrapper p").contains('hasPos').click();
|
|
113
|
+
// Search result should be opened in new window
|
|
114
|
+
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
|
|
122
115
|
// When I revisit the home page
|
|
123
116
|
cy.visit('/graphs');
|
|
124
117
|
// When I open again the search box
|
|
@@ -128,12 +121,10 @@ describe('Home screen validation', () => {
|
|
|
128
121
|
// And dropdown should be visible
|
|
129
122
|
cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
|
|
130
123
|
// When I press 'escape'
|
|
131
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input')
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
cy.get('.search-rdf-input').should('not.be.visible');
|
|
136
|
-
});
|
|
124
|
+
cy.get('.search-rdf-input search-resource-input .view-res-input').type('{esc}');
|
|
125
|
+
// Search box should not be visible
|
|
126
|
+
cy.get('.search-rdf-input').should('not.be.visible');
|
|
127
|
+
|
|
137
128
|
|
|
138
129
|
cy.deleteRepository(repositoryId);
|
|
139
130
|
});
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
describe('Import/ OntoRefine', () => {
|
|
2
|
+
|
|
3
|
+
let repositoryId;
|
|
4
|
+
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
repositoryId = 'onto-refine-' + Date.now();
|
|
7
|
+
cy.createRepository({id: repositoryId});
|
|
8
|
+
|
|
9
|
+
cy.visit('/ontorefine');
|
|
10
|
+
cy.window();
|
|
11
|
+
|
|
12
|
+
cy.get('.ot-splash').should('not.exist');
|
|
13
|
+
getOntoRefineFrame().should('be.visible');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
cy.deleteRepository(repositoryId);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const REFINE_TABS = ['Create Project', 'Open Project', 'Import Project', 'Language Settings'];
|
|
21
|
+
const CREATE_PROJECT_TABS = ['This Computer', 'Web Addresses (URLs)', 'Clipboard'];
|
|
22
|
+
|
|
23
|
+
xit('should properly render OntoRefine transformation tool frame', () => {
|
|
24
|
+
|
|
25
|
+
// Refine should provide navigation tabs
|
|
26
|
+
getOntoRefineTabs()
|
|
27
|
+
.should('be.visible')
|
|
28
|
+
.and('have.length', 4)
|
|
29
|
+
.each(($tab, $index) => expect($tab.text()).to.equal(REFINE_TABS[$index]))
|
|
30
|
+
.eq(0)
|
|
31
|
+
// The first tab should be automatically selected
|
|
32
|
+
.should('have.class', 'selected')
|
|
33
|
+
.and('be.visible');
|
|
34
|
+
|
|
35
|
+
// -------- Create project --------
|
|
36
|
+
|
|
37
|
+
// The create project panel should be rendered by default and provide its own tabs
|
|
38
|
+
getCreateProjectPanel().should('be.visible');
|
|
39
|
+
getCreateProjectPanelTabs()
|
|
40
|
+
.should('be.visible')
|
|
41
|
+
.and('have.length', 3)
|
|
42
|
+
.each(($tab, $index) => expect($tab.text()).to.equal(CREATE_PROJECT_TABS[$index]))
|
|
43
|
+
.eq(0)
|
|
44
|
+
.should('have.class', 'selected')
|
|
45
|
+
.and('be.visible');
|
|
46
|
+
|
|
47
|
+
// The upload panel should be opened by default
|
|
48
|
+
getCreateProjectPanelBody()
|
|
49
|
+
.find('.upload-parent #upload')
|
|
50
|
+
.should('be.visible');
|
|
51
|
+
|
|
52
|
+
// Go to URL panel
|
|
53
|
+
getCreateProjectPanelTabs().eq(1).click();
|
|
54
|
+
getCreateProjectPanelBody()
|
|
55
|
+
.find('.default-importing-web-url')
|
|
56
|
+
.should('be.visible');
|
|
57
|
+
|
|
58
|
+
// Go to Clipboard panel
|
|
59
|
+
getCreateProjectPanelTabs().eq(2).click();
|
|
60
|
+
getCreateProjectPanelBody()
|
|
61
|
+
.find('#default-importing-clipboard-textarea')
|
|
62
|
+
.should('be.visible');
|
|
63
|
+
|
|
64
|
+
// -------- Open project --------
|
|
65
|
+
|
|
66
|
+
// Go to Open project and check if the panels are properly switched
|
|
67
|
+
getOntoRefineTabs().eq(1).click();
|
|
68
|
+
getCreateProjectPanel().should('not.exist');
|
|
69
|
+
getOpenProjectPanel()
|
|
70
|
+
.should('be.visible')
|
|
71
|
+
// Should have no existing projects for new repositories
|
|
72
|
+
.find('#no-project-message')
|
|
73
|
+
.should('be.visible');
|
|
74
|
+
|
|
75
|
+
// -------- Import project --------
|
|
76
|
+
|
|
77
|
+
getOntoRefineTabs().eq(2).click();
|
|
78
|
+
getOpenProjectPanel().should('not.exist');
|
|
79
|
+
getImportProjectPanel()
|
|
80
|
+
.should('be.visible')
|
|
81
|
+
.find('#import-project-button')
|
|
82
|
+
.should('be.visible');
|
|
83
|
+
|
|
84
|
+
// -------- Language Settings --------
|
|
85
|
+
|
|
86
|
+
getOntoRefineTabs().eq(3).click();
|
|
87
|
+
getImportProjectPanel().should('not.exist');
|
|
88
|
+
getLanguageSettingsPanel()
|
|
89
|
+
.should('be.visible')
|
|
90
|
+
.find('#set-lang-button')
|
|
91
|
+
.should('be.visible');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
function getOntoRefineFrame() {
|
|
95
|
+
return cy.get('#ontorefine-iframe').iframe();
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function getOntoRefineLeftPanel() {
|
|
99
|
+
return getOntoRefineFrame().find('#left-panel');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function getOntoRefineTabs() {
|
|
103
|
+
return getOntoRefineLeftPanel().find('#action-area-tabs .action-area-tab');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function getOntoRefineRightPanel() {
|
|
107
|
+
return getOntoRefineFrame().find('#right-panel');
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function getCreateProjectPanel() {
|
|
111
|
+
return getOntoRefineRightPanel().find('#create-project-ui-source-selection-layout');
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function getCreateProjectPanelTabs() {
|
|
115
|
+
return getCreateProjectPanel().find('#create-project-ui-source-selection-tabs .create-project-ui-source-selection-tab')
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
function getCreateProjectPanelBody() {
|
|
119
|
+
return getCreateProjectPanel().find('#create-project-ui-source-selection-tab-bodies')
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function getOpenProjectPanel() {
|
|
123
|
+
return getOntoRefineRightPanel().find('#projects-container');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function getImportProjectPanel() {
|
|
127
|
+
// TODO Note: The third and fourth tab bodies have the same identifier....
|
|
128
|
+
return getOntoRefineRightPanel().find('.action-area-tab-body').eq(2);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function getLanguageSettingsPanel() {
|
|
132
|
+
return getOntoRefineRightPanel().find('.action-area-tab-body').eq(3);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
});
|
|
@@ -36,9 +36,6 @@ describe('Repositories', () => {
|
|
|
36
36
|
" ex:age 12.1 ;\n" +
|
|
37
37
|
".";
|
|
38
38
|
|
|
39
|
-
const GDB_REPOSITORY_TYPE = 'gdb';
|
|
40
|
-
const REPO_LIST_ID = '#wb-repositories-repositoryInGetRepositories';
|
|
41
|
-
|
|
42
39
|
beforeEach(() => {
|
|
43
40
|
repositoryId = 'repo-' + Date.now();
|
|
44
41
|
|
|
@@ -60,21 +57,6 @@ describe('Repositories', () => {
|
|
|
60
57
|
getCreateRepositoryButton().should('be.visible').and('not.be.disabled');
|
|
61
58
|
}
|
|
62
59
|
|
|
63
|
-
it('create repository page should list available repository types options', () => {
|
|
64
|
-
let expectedRepoTypes = ['GraphDB Repository', 'Ontop Virtual SPARQL', 'FedX Virtual SPARQL'];
|
|
65
|
-
createRepository();
|
|
66
|
-
cy.url().should('include', '/repository/create');
|
|
67
|
-
|
|
68
|
-
cy.get('.create-buttons')
|
|
69
|
-
.find('.h3.repo-type')
|
|
70
|
-
.should('have.length', 3)
|
|
71
|
-
.then((repoTypes) => {
|
|
72
|
-
repoTypes.each(($index, $repoType) => {
|
|
73
|
-
expect($repoType.innerText).to.equal(expectedRepoTypes[$index]);
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
|
|
78
60
|
it('should allow creation of repositories with default settings', () => {
|
|
79
61
|
// There should be a default repository location
|
|
80
62
|
getLocationsList()
|
|
@@ -84,7 +66,7 @@ describe('Repositories', () => {
|
|
|
84
66
|
createRepository();
|
|
85
67
|
cy.url().should('include', '/repository/create');
|
|
86
68
|
|
|
87
|
-
chooseRepositoryType(
|
|
69
|
+
chooseRepositoryType();
|
|
88
70
|
cy.url().should('include', '/repository/create/');
|
|
89
71
|
|
|
90
72
|
// Create a repository by supplying only an identifier
|
|
@@ -154,7 +136,7 @@ describe('Repositories', () => {
|
|
|
154
136
|
|
|
155
137
|
it('should disallow creation of repositories without mandatory settings', () => {
|
|
156
138
|
createRepository();
|
|
157
|
-
chooseRepositoryType(
|
|
139
|
+
chooseRepositoryType();
|
|
158
140
|
cy.url().should('include', '/repository/create/');
|
|
159
141
|
|
|
160
142
|
saveRepository();
|
|
@@ -172,7 +154,7 @@ describe('Repositories', () => {
|
|
|
172
154
|
const repoTitle = 'Repo title for ' + repositoryId;
|
|
173
155
|
|
|
174
156
|
createRepository();
|
|
175
|
-
chooseRepositoryType(
|
|
157
|
+
chooseRepositoryType();
|
|
176
158
|
cy.url().should('include', '/repository/create/');
|
|
177
159
|
|
|
178
160
|
getRepositoryIdField().type(repositoryId);
|
|
@@ -219,14 +201,14 @@ describe('Repositories', () => {
|
|
|
219
201
|
it('should allow to switch between repositories', () => {
|
|
220
202
|
const secondRepoId = 'second-repo-' + Date.now();
|
|
221
203
|
createRepository();
|
|
222
|
-
chooseRepositoryType(
|
|
204
|
+
chooseRepositoryType();
|
|
223
205
|
cy.url().should('include', '/repository/create/');
|
|
224
206
|
|
|
225
207
|
typeRepositoryId(repositoryId);
|
|
226
208
|
saveRepository();
|
|
227
209
|
|
|
228
210
|
createRepository();
|
|
229
|
-
chooseRepositoryType(
|
|
211
|
+
chooseRepositoryType();
|
|
230
212
|
cy.url().should('include', '/repository/create/');
|
|
231
213
|
|
|
232
214
|
typeRepositoryId(secondRepoId);
|
|
@@ -292,7 +274,7 @@ describe('Repositories', () => {
|
|
|
292
274
|
const newTitle = 'Title edit';
|
|
293
275
|
|
|
294
276
|
createRepository();
|
|
295
|
-
chooseRepositoryType(
|
|
277
|
+
chooseRepositoryType();
|
|
296
278
|
cy.url().should('include', '/repository/create/');
|
|
297
279
|
|
|
298
280
|
typeRepositoryId(repositoryId);
|
|
@@ -308,12 +290,9 @@ describe('Repositories', () => {
|
|
|
308
290
|
typeRepositoryTitle(newTitle);
|
|
309
291
|
getRepositoryContextIndexCheckbox().check();
|
|
310
292
|
|
|
311
|
-
getSaveRepositoryButton()
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
confirmModal();
|
|
315
|
-
waitLoader();
|
|
316
|
-
});
|
|
293
|
+
getSaveRepositoryButton().click();
|
|
294
|
+
confirmModal();
|
|
295
|
+
waitLoader();
|
|
317
296
|
|
|
318
297
|
// See the title is rendered in the repositories list
|
|
319
298
|
getRepositoryFromList(repositoryId).should('contain', newTitle);
|
|
@@ -327,7 +306,7 @@ describe('Repositories', () => {
|
|
|
327
306
|
|
|
328
307
|
it('should allow to delete existing repository', () => {
|
|
329
308
|
createRepository();
|
|
330
|
-
chooseRepositoryType(
|
|
309
|
+
chooseRepositoryType();
|
|
331
310
|
cy.url().should('include', '/repository/create/');
|
|
332
311
|
|
|
333
312
|
typeRepositoryId(repositoryId);
|
|
@@ -614,7 +593,7 @@ describe('Repositories', () => {
|
|
|
614
593
|
it('should restart an existing repository', () => {
|
|
615
594
|
|
|
616
595
|
createRepository();
|
|
617
|
-
chooseRepositoryType(
|
|
596
|
+
chooseRepositoryType();
|
|
618
597
|
|
|
619
598
|
cy.url().should('include', '/repository/create');
|
|
620
599
|
|
|
@@ -680,7 +659,7 @@ describe('Repositories', () => {
|
|
|
680
659
|
it('should create SHACL repo and test shapes validation', () => {
|
|
681
660
|
//Prepare repository by enabling SHACL
|
|
682
661
|
createRepository();
|
|
683
|
-
chooseRepositoryType(
|
|
662
|
+
chooseRepositoryType();
|
|
684
663
|
cy.url().should('include', '/repository/create/');
|
|
685
664
|
typeRepositoryId(repositoryId);
|
|
686
665
|
getSHACLRepositoryCheckbox().check();
|
|
@@ -723,6 +702,8 @@ describe('Repositories', () => {
|
|
|
723
702
|
.then($el => $el && $el.text() === status));
|
|
724
703
|
}
|
|
725
704
|
|
|
705
|
+
const REPO_LIST_ID = '#wb-repositories-repositoryInGetRepositories';
|
|
706
|
+
|
|
726
707
|
function getRepositoriesList() {
|
|
727
708
|
return cy.get(REPO_LIST_ID);
|
|
728
709
|
}
|
|
@@ -29,21 +29,18 @@ describe('Setup / Connectors - Lucene', () => {
|
|
|
29
29
|
it('Create, copy and delete a lucene connector', () => {
|
|
30
30
|
getNewLuceneConnectorButton()
|
|
31
31
|
.click();
|
|
32
|
-
|
|
33
32
|
getCreateLuceneConnectorPage()
|
|
34
|
-
.should('
|
|
35
|
-
.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
});
|
|
46
|
-
|
|
33
|
+
.should('be.visible')
|
|
34
|
+
.and('contain', 'Create new Lucene Connector');
|
|
35
|
+
getConnectorNameField()
|
|
36
|
+
.type(luceneConnectorName);
|
|
37
|
+
getFieldNameField()
|
|
38
|
+
.type(fieldName, {force:true});
|
|
39
|
+
getPropertyChainField()
|
|
40
|
+
.type(connectorPropertyChain, {force:true});
|
|
41
|
+
getUriTypes()
|
|
42
|
+
.type(uriType);
|
|
43
|
+
confirmCreateConnector();
|
|
47
44
|
verifyStatusToastMessage(connectorCreateToastMessage);
|
|
48
45
|
verifyConnectorExists(luceneConnectorName);
|
|
49
46
|
//copy connector
|
|
@@ -52,10 +49,7 @@ describe('Setup / Connectors - Lucene', () => {
|
|
|
52
49
|
.should('be.visible')
|
|
53
50
|
.click()
|
|
54
51
|
.then(() => {
|
|
55
|
-
|
|
56
|
-
.within(() => {
|
|
57
|
-
confirmCreateConnector();
|
|
58
|
-
});
|
|
52
|
+
confirmCreateConnector();
|
|
59
53
|
verifyStatusToastMessage(connectorCreateToastMessage + '-copy');
|
|
60
54
|
verifyConnectorExists(luceneConnectorName + '-copy');
|
|
61
55
|
//delete connector copy
|
|
@@ -67,7 +61,7 @@ describe('Setup / Connectors - Lucene', () => {
|
|
|
67
61
|
.should('be.visible')
|
|
68
62
|
.click();
|
|
69
63
|
verifyStatusToastMessage(connectorDeleteToastMessage + '-copy');
|
|
70
|
-
|
|
64
|
+
});
|
|
71
65
|
});
|
|
72
66
|
|
|
73
67
|
function getConnectorsPage() {
|
|
@@ -75,36 +69,39 @@ describe('Setup / Connectors - Lucene', () => {
|
|
|
75
69
|
}
|
|
76
70
|
|
|
77
71
|
function getNewLuceneConnectorButton() {
|
|
78
|
-
return getConnectorsPage().find('.new-connector-btn')
|
|
72
|
+
return getConnectorsPage().find('.new-connector-btn');
|
|
79
73
|
}
|
|
80
74
|
|
|
81
75
|
function getCreateLuceneConnectorPage() {
|
|
82
|
-
return cy.get('.modal-content').
|
|
76
|
+
return cy.get('.modal-content').should('be.visible');
|
|
83
77
|
}
|
|
84
78
|
|
|
85
79
|
function getConnectorNameField() {
|
|
86
|
-
return
|
|
80
|
+
return getCreateLuceneConnectorPage().find('.connector-name-field input');
|
|
87
81
|
}
|
|
88
82
|
|
|
89
83
|
function getFieldNameField() {
|
|
90
|
-
return
|
|
84
|
+
return getCreateLuceneConnectorPage().find('.child-property-fieldName input');
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
function getPropertyChainField() {
|
|
94
|
-
return
|
|
88
|
+
return getCreateLuceneConnectorPage().find('.child-property-propertyChain input');
|
|
95
89
|
}
|
|
96
90
|
|
|
97
91
|
function getUriTypes() {
|
|
98
|
-
return
|
|
92
|
+
return getCreateLuceneConnectorPage().find('.property-types input');
|
|
99
93
|
}
|
|
100
94
|
|
|
101
95
|
function confirmCreateConnector() {
|
|
102
|
-
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
getCreateLuceneConnectorPage()
|
|
97
|
+
.within(() => {
|
|
98
|
+
cy.get('.create-connector-btn')
|
|
99
|
+
.scrollIntoView()
|
|
100
|
+
.should('be.visible')
|
|
101
|
+
.then((btn) => {
|
|
102
|
+
cy.wrap(btn).click();
|
|
103
|
+
});
|
|
104
|
+
});
|
|
108
105
|
}
|
|
109
106
|
|
|
110
107
|
function verifyConnectorExists(connectorName) {
|
|
@@ -16,7 +16,18 @@ describe('Main menu tests', function () {
|
|
|
16
16
|
{
|
|
17
17
|
name: 'Import',
|
|
18
18
|
visible: true,
|
|
19
|
-
|
|
19
|
+
submenu: [
|
|
20
|
+
{
|
|
21
|
+
name: 'RDF',
|
|
22
|
+
visible: false,
|
|
23
|
+
redirect: '/import'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'Tabular (OntoRefine)',
|
|
27
|
+
visible: false,
|
|
28
|
+
redirect: '/ontorefine'
|
|
29
|
+
}
|
|
30
|
+
]
|
|
20
31
|
},
|
|
21
32
|
{
|
|
22
33
|
name: 'Explore',
|
|
@@ -94,16 +105,6 @@ describe('Main menu tests', function () {
|
|
|
94
105
|
visible: false,
|
|
95
106
|
redirect: '/connectors'
|
|
96
107
|
},
|
|
97
|
-
{
|
|
98
|
-
name: 'Cluster',
|
|
99
|
-
visible: false,
|
|
100
|
-
redirect: '/cluster'
|
|
101
|
-
},
|
|
102
|
-
{
|
|
103
|
-
name: 'Plugins',
|
|
104
|
-
visible: false,
|
|
105
|
-
redirect: '/plugins'
|
|
106
|
-
},
|
|
107
108
|
{
|
|
108
109
|
name: 'Namespaces',
|
|
109
110
|
visible: false,
|
|
@@ -158,8 +159,7 @@ describe('Main menu tests', function () {
|
|
|
158
159
|
let menuVisibilityCheck = menu.visible ? 'be.visible' : 'not.be.visible';
|
|
159
160
|
// Verify that main menu items are present and their visibility
|
|
160
161
|
cy.get('.main-menu .menu-element-root').eq(menuIndex + 1).as('menu')
|
|
161
|
-
.should(menuVisibilityCheck).
|
|
162
|
-
cy.get('.menu-item').contains(menu.name));
|
|
162
|
+
.should(menuVisibilityCheck).and('contain', menu.name);
|
|
163
163
|
|
|
164
164
|
// Verify submenu items and their visibility when the main menu is not opened
|
|
165
165
|
(menu.submenu || []).forEach((submenu, submenuIndex) => {
|
|
@@ -435,20 +435,11 @@ describe('SPARQL screen validation', () => {
|
|
|
435
435
|
verifyResultsPageLength(74);
|
|
436
436
|
|
|
437
437
|
// Uncheck ‘Include inferred’
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
infBtn && cy.wrap(infBtn).click();
|
|
444
|
-
}
|
|
445
|
-
).then(() => {
|
|
446
|
-
getInferenceButton()
|
|
447
|
-
.within(button => {
|
|
448
|
-
cy.get('.icon-inferred-off')
|
|
449
|
-
cy.wrap(button).should('be.visible')
|
|
450
|
-
});
|
|
451
|
-
}))
|
|
438
|
+
cy.waitUntil(() =>
|
|
439
|
+
getInferenceButton()
|
|
440
|
+
.then(infBtn => infBtn && cy.wrap(infBtn).click()))
|
|
441
|
+
.then(() =>
|
|
442
|
+
cy.get('.icon-inferred-off').should('be.visible'));
|
|
452
443
|
|
|
453
444
|
// Confirm that only inferred statements (only 2) are available
|
|
454
445
|
executeQuery();
|
package/package.json
CHANGED
|
@@ -19,9 +19,7 @@ Cypress.Commands.add('verifyResultsPageLength', (resultLength) => {
|
|
|
19
19
|
Cypress.Commands.add('verifyResultsMessage', (msg) => {
|
|
20
20
|
cy.waitUntil(() =>
|
|
21
21
|
getResultsMessage()
|
|
22
|
-
.then(
|
|
23
|
-
console.log(resultInfo.text());
|
|
24
|
-
return resultInfo && resultInfo.text().trim().indexOf(msg) > -1; }));
|
|
22
|
+
.then(resultInfo => resultInfo.text().trim().indexOf(msg) > -1));
|
|
25
23
|
});
|
|
26
24
|
|
|
27
25
|
Cypress.Commands.add('getResultsMessage', () => {
|
|
@@ -53,7 +51,7 @@ function getQueryTextArea() {
|
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
function waitUntilQueryIsVisible() {
|
|
56
|
-
|
|
54
|
+
cy.waitUntil(() =>
|
|
57
55
|
getQueryArea()
|
|
58
56
|
.then(codeMirrorEl =>
|
|
59
57
|
codeMirrorEl && codeMirrorEl[0].CodeMirror.getValue().trim().length > 0));
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
describe('Plugins', () => {
|
|
2
|
-
|
|
3
|
-
let repositoryId;
|
|
4
|
-
|
|
5
|
-
function createRepository() {
|
|
6
|
-
repositoryId = 'plugin-' + Date.now();
|
|
7
|
-
cy.createRepository({id: repositoryId});
|
|
8
|
-
cy.presetRepository(repositoryId);
|
|
9
|
-
cy.initializeRepository(repositoryId);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function waitUntilPluginsPageIsLoaded() {
|
|
13
|
-
// Workbench loading screen should not be visible
|
|
14
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
15
|
-
|
|
16
|
-
// No active loader
|
|
17
|
-
cy.get('.ot-loader').should('not.exist');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
beforeEach(() => {
|
|
21
|
-
createRepository();
|
|
22
|
-
cy.visit('/plugins');
|
|
23
|
-
cy.window();
|
|
24
|
-
waitUntilPluginsPageIsLoaded();
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
afterEach(() => {
|
|
28
|
-
cy.visit('/plugins');
|
|
29
|
-
cy.window();
|
|
30
|
-
// re-enable historyplugin
|
|
31
|
-
getPluginsHeader()
|
|
32
|
-
.should('be.visible').parent().within(() => {
|
|
33
|
-
cy.get('.switch').then((elem) => {
|
|
34
|
-
var value = elem.val();
|
|
35
|
-
if (!value.checked) {
|
|
36
|
-
getPluginsSwitch().click();
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
});
|
|
40
|
-
cy.deleteRepository(repositoryId);
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should allow to enable and disable the plugins', () => {
|
|
44
|
-
// Verify initial status is ON
|
|
45
|
-
getPluginsHeader()
|
|
46
|
-
.should('be.visible').parent().within(() => {
|
|
47
|
-
cy.get('.tag-primary')
|
|
48
|
-
.contains('ON');
|
|
49
|
-
|
|
50
|
-
cy.get('.switch').should('be.checked');
|
|
51
|
-
getPluginsSwitch().click();
|
|
52
|
-
});
|
|
53
|
-
cy.visit('/plugins');
|
|
54
|
-
cy.window();
|
|
55
|
-
|
|
56
|
-
getPluginsHeader()
|
|
57
|
-
.should('be.visible').parent().within(() => {
|
|
58
|
-
cy.get('.switch').should('not.be.checked');
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
function getPluginsHeader() {
|
|
63
|
-
return cy.get('.plugins-header').contains("history");
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function getPluginsSwitch() {
|
|
67
|
-
return cy.get('.plugins-switch');
|
|
68
|
-
}
|
|
69
|
-
});
|