graphdb-workbench-tests 2.0.0-TR11 → 2.0.0-TR12
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.
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
});
|
|
@@ -110,6 +110,11 @@ describe('Main menu tests', function () {
|
|
|
110
110
|
visible: false,
|
|
111
111
|
redirect: '/cluster'
|
|
112
112
|
},
|
|
113
|
+
{
|
|
114
|
+
name: 'Plugins',
|
|
115
|
+
visible: false,
|
|
116
|
+
redirect: '/plugins'
|
|
117
|
+
},
|
|
113
118
|
{
|
|
114
119
|
name: 'Namespaces',
|
|
115
120
|
visible: false,
|
|
@@ -164,7 +169,8 @@ describe('Main menu tests', function () {
|
|
|
164
169
|
let menuVisibilityCheck = menu.visible ? 'be.visible' : 'not.be.visible';
|
|
165
170
|
// Verify that main menu items are present and their visibility
|
|
166
171
|
cy.get('.main-menu .menu-element-root').eq(menuIndex + 1).as('menu')
|
|
167
|
-
.should(menuVisibilityCheck).
|
|
172
|
+
.should(menuVisibilityCheck).within(() =>
|
|
173
|
+
cy.get('.menu-item').contains(menu.name));
|
|
168
174
|
|
|
169
175
|
// Verify submenu items and their visibility when the main menu is not opened
|
|
170
176
|
(menu.submenu || []).forEach((submenu, submenuIndex) => {
|
|
@@ -435,11 +435,20 @@ describe('SPARQL screen validation', () => {
|
|
|
435
435
|
verifyResultsPageLength(74);
|
|
436
436
|
|
|
437
437
|
// Uncheck ‘Include inferred’
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
438
|
+
cy.waitUntil(() =>
|
|
439
|
+
getInferenceButton()
|
|
440
|
+
.within(infBtn =>
|
|
441
|
+
{ cy.get('.icon-inferred-on');
|
|
442
|
+
console.log(infBtn);
|
|
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
|
+
}))
|
|
443
452
|
|
|
444
453
|
// Confirm that only inferred statements (only 2) are available
|
|
445
454
|
executeQuery();
|