graphdb-workbench-tests 3.4.0-TR2 → 3.4.0-TR3
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/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +2 -1
- package/e2e-legacy/setup/aclmanagement/acl-management-with-selected repository.spec.js +44 -0
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +2 -2
- package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +4 -4
- package/npm-shrinkwrap.json +5 -5
- package/package.json +1 -1
- package/steps/repository-steps.js +24 -0
- package/steps/setup/acl-management-steps.js +12 -0
- package/steps/sparql-editor-steps.js +13 -0
- package/steps/yasgui/yasr-steps.js +4 -0
|
@@ -9,7 +9,8 @@ import {GuidesStubs} from "../../../../stubs/guides/guides-stubs.js";
|
|
|
9
9
|
import {TTYGStubs} from "../../../../stubs/ttyg/ttyg-stubs.js";
|
|
10
10
|
import {RepositoriesStubs} from "../../../../stubs/repositories/repositories-stubs.js";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// TODO: there is some issue with the context side field focus that breaks the test. Should be fixed soon
|
|
13
|
+
describe.skip('ttyg configure agent guide', () => {
|
|
13
14
|
let repositoryId;
|
|
14
15
|
|
|
15
16
|
beforeEach(() => {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import HomeSteps from "../../../steps/home-steps";
|
|
2
2
|
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
3
3
|
import {AclManagementSteps} from "../../../steps/setup/acl-management-steps";
|
|
4
|
+
import {RepositorySteps} from '../../../steps/repository-steps.js';
|
|
5
|
+
import {RepositorySelectorSteps} from '../../../steps/repository-selector-steps.js';
|
|
4
6
|
|
|
5
7
|
function verifyStateWithSelectedRepository() {
|
|
6
8
|
AclManagementSteps.getPageHeading().should('be.visible');
|
|
@@ -12,15 +14,18 @@ function verifyStateWithSelectedRepository() {
|
|
|
12
14
|
|
|
13
15
|
describe('ACL Management initial state with repositories', () => {
|
|
14
16
|
let repositoryId;
|
|
17
|
+
let fedexRepositoryId;
|
|
15
18
|
|
|
16
19
|
beforeEach(() => {
|
|
17
20
|
repositoryId = 'acl-management-' + Date.now();
|
|
21
|
+
fedexRepositoryId = 'fedex-repo-' + Date.now();
|
|
18
22
|
cy.createRepository({id: repositoryId});
|
|
19
23
|
cy.presetRepository(repositoryId);
|
|
20
24
|
});
|
|
21
25
|
|
|
22
26
|
afterEach(() => {
|
|
23
27
|
cy.deleteRepository(repositoryId);
|
|
28
|
+
cy.deleteRepository(fedexRepositoryId);
|
|
24
29
|
});
|
|
25
30
|
|
|
26
31
|
it('Should display the correct initial state when navigating via URL', () => {
|
|
@@ -37,4 +42,43 @@ describe('ACL Management initial state with repositories', () => {
|
|
|
37
42
|
// Then,
|
|
38
43
|
verifyStateWithSelectedRepository();
|
|
39
44
|
});
|
|
45
|
+
|
|
46
|
+
it('should prevent ACL management with FedEx repository', () => {
|
|
47
|
+
// Given I have created a Fedex repository
|
|
48
|
+
createFedexRepository(repositoryId, fedexRepositoryId);
|
|
49
|
+
// When I select the fedex repository
|
|
50
|
+
RepositorySelectorSteps.selectRepository(fedexRepositoryId);
|
|
51
|
+
RepositorySelectorSteps.getSelectedRepository().should('contain', fedexRepositoryId);
|
|
52
|
+
RepositorySteps.getActiveRepositoryRow().should('contain', fedexRepositoryId);
|
|
53
|
+
// And I navigate to ACL management page
|
|
54
|
+
MainMenuSteps.clickOnACLManagement();
|
|
55
|
+
// Then I should see the warning message about Fedex repository
|
|
56
|
+
AclManagementSteps.getFedexWarningMessage().should('be.visible');
|
|
57
|
+
AclManagementSteps.getAclManagementContent().should('not.exist');
|
|
58
|
+
// When I switch to graphdb repository
|
|
59
|
+
RepositorySelectorSteps.selectRepository(repositoryId);
|
|
60
|
+
// Then the warning message should be hidden
|
|
61
|
+
AclManagementSteps.getFedexWarningMessage().should('not.exist');
|
|
62
|
+
AclManagementSteps.getAclManagementContent().should('be.visible');
|
|
63
|
+
// When I select a fedex repository
|
|
64
|
+
RepositorySelectorSteps.selectRepository(fedexRepositoryId);
|
|
65
|
+
// Then the fedex warning should become visible
|
|
66
|
+
AclManagementSteps.getFedexWarningMessage().should('be.visible');
|
|
67
|
+
AclManagementSteps.getAclManagementContent().should('not.exist');
|
|
68
|
+
// Go to home page before end to prevent error when delete the repository happens
|
|
69
|
+
HomeSteps.visit();
|
|
70
|
+
});
|
|
40
71
|
})
|
|
72
|
+
|
|
73
|
+
function createFedexRepository(repositoryId, fedexRepositoryId) {
|
|
74
|
+
RepositorySteps.visit();
|
|
75
|
+
RepositorySteps.getCreateRepositoryButton().click();
|
|
76
|
+
RepositorySteps.createFedexRepositoryType();
|
|
77
|
+
cy.url().should('include', '/repository/create/fedx');
|
|
78
|
+
RepositorySteps.typeRepositoryId(fedexRepositoryId);
|
|
79
|
+
RepositorySteps.selectFedexMember(repositoryId);
|
|
80
|
+
RepositorySteps.saveRepository();
|
|
81
|
+
RepositorySteps.getRepositoriesPage().should('be.visible');
|
|
82
|
+
RepositorySteps.getRepositoryFromList(fedexRepositoryId)
|
|
83
|
+
.should('be.visible');
|
|
84
|
+
}
|
|
@@ -75,8 +75,8 @@ describe('"Visualize" split button', () => {
|
|
|
75
75
|
|
|
76
76
|
// WHEN: I open the dropdown.
|
|
77
77
|
YasrSteps.toggleGraphConfigDropdown();
|
|
78
|
-
// THEN: I expect to see
|
|
79
|
-
YasrSteps.getGraphConfigs().should('have.length',
|
|
78
|
+
// THEN: I expect to see all graph configurations.
|
|
79
|
+
YasrSteps.getGraphConfigs().should('have.length', 3);
|
|
80
80
|
|
|
81
81
|
// WHEN: I select a graph configuration
|
|
82
82
|
YasrSteps.selectGraphConfig();
|
|
@@ -19,7 +19,7 @@ describe('YASR', () => {
|
|
|
19
19
|
|
|
20
20
|
it('should load YASR in fullscreen with plugin config from URL', () => {
|
|
21
21
|
// WHEN: I visit SPARQL Query & Update page with url parameters: embedded and pluginName
|
|
22
|
-
SparqlEditorSteps.
|
|
22
|
+
SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId, 'pivotTable', true));
|
|
23
23
|
// THEN: YASR is in fullscreen mode because the workbench is embedded.
|
|
24
24
|
YasrSteps.getYasr().should('have.class', 'yasr-fullscreen');
|
|
25
25
|
// AND: I expect the raw response plugin to be visible
|
|
@@ -31,14 +31,14 @@ describe('YASR', () => {
|
|
|
31
31
|
YasrSteps.getYasr().should('have.class', 'yasr-fullscreen');
|
|
32
32
|
|
|
33
33
|
// WHEN: I visit SPARQL Query & Update page with without embedded url parameter.
|
|
34
|
-
SparqlEditorSteps.
|
|
34
|
+
SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId, 'googleChart'));
|
|
35
35
|
// THEN: I expect yasr to be in non-fullscreen mode
|
|
36
36
|
YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
|
|
37
37
|
// AND: I expect Google Chart plugin to be visible
|
|
38
38
|
YasrSteps.getGoogleChartPlugin().should('be.visible');
|
|
39
39
|
|
|
40
40
|
// WHEN: I visit SPARQL Query & Update page with without embedded and pluginName url parameters.
|
|
41
|
-
SparqlEditorSteps.
|
|
41
|
+
SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId));
|
|
42
42
|
// THEN: I expect yasr to be in non-fullscreen mode
|
|
43
43
|
YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
|
|
44
44
|
// AND: I expect Google Chart plugin to be visible, because it was the last used plugin.
|
|
@@ -47,7 +47,7 @@ describe('YASR', () => {
|
|
|
47
47
|
// WHEN: I visit SPARQL Query & Update page with without embedded and pluginName url parameters.
|
|
48
48
|
// AND: There are no persisted yasr data.
|
|
49
49
|
cy.clearLocalStorage('yagui__graphdb-workbench-sparql-editor');
|
|
50
|
-
SparqlEditorSteps.
|
|
50
|
+
SparqlEditorSteps.visitSparqlEditorPageAndWaitForResults(getUrl(repositoryId));
|
|
51
51
|
// THEN: I expect yasr to be in non-fullscreen mode
|
|
52
52
|
YasrSteps.getYasr().should('not.have.class', 'yasr-fullscreen');
|
|
53
53
|
// AND: I expect the default plugin to be visible
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "3.4.0-
|
|
3
|
+
"version": "3.4.0-TR3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "graphdb-workbench-tests",
|
|
9
|
-
"version": "3.4.0-
|
|
9
|
+
"version": "3.4.0-TR3",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@bahmutov/cypress-code-coverage": "^2.7.2",
|
|
@@ -7111,9 +7111,9 @@
|
|
|
7111
7111
|
}
|
|
7112
7112
|
},
|
|
7113
7113
|
"node_modules/lodash": {
|
|
7114
|
-
"version": "4.
|
|
7115
|
-
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.
|
|
7116
|
-
"integrity": "sha512-
|
|
7114
|
+
"version": "4.18.1",
|
|
7115
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
|
|
7116
|
+
"integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==",
|
|
7117
7117
|
"dev": true,
|
|
7118
7118
|
"license": "MIT"
|
|
7119
7119
|
},
|
package/package.json
CHANGED
|
@@ -16,6 +16,14 @@ export class RepositorySteps extends BaseSteps {
|
|
|
16
16
|
cy.visit(`repository/edit/${repositoryId}?location=`);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
static getRepositoryPage() {
|
|
20
|
+
return cy.get('#wb-repository');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getRepositoriesPage() {
|
|
24
|
+
return cy.get('#wb-repositories');
|
|
25
|
+
}
|
|
26
|
+
|
|
19
27
|
static getCreateRepositoryButton() {
|
|
20
28
|
return cy.get('#wb-repositories-addRepositoryLink');
|
|
21
29
|
}
|
|
@@ -135,6 +143,10 @@ export class RepositorySteps extends BaseSteps {
|
|
|
135
143
|
RepositorySteps.getRepositoryTypeButton(type).click();
|
|
136
144
|
}
|
|
137
145
|
|
|
146
|
+
static createFedexRepositoryType() {
|
|
147
|
+
RepositorySteps.chooseRepositoryType('fedx');
|
|
148
|
+
}
|
|
149
|
+
|
|
138
150
|
static getGDBRepositoryTypeButton() {
|
|
139
151
|
return RepositorySteps.getRepositoryTypeButton('gdb');
|
|
140
152
|
}
|
|
@@ -354,4 +366,16 @@ export class RepositorySteps extends BaseSteps {
|
|
|
354
366
|
static getEntityIndexSize() {
|
|
355
367
|
return RepositorySteps.getRepositoryCreateForm().find('#entityIndexSize');
|
|
356
368
|
}
|
|
369
|
+
|
|
370
|
+
static getFedexMembersPanel() {
|
|
371
|
+
return this.getRepositoryPage().find('#fedx-members');
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
static selectFedexMember(repositoryId) {
|
|
375
|
+
this.getFedexMembersPanel()
|
|
376
|
+
.find('.form-local-repos')
|
|
377
|
+
.find('.location-item')
|
|
378
|
+
.contains(repositoryId)
|
|
379
|
+
.click();
|
|
380
|
+
}
|
|
357
381
|
}
|
|
@@ -11,6 +11,18 @@ export class AclManagementSteps {
|
|
|
11
11
|
return this.getPage().find('#acl-management-view-title');
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
+
static getFedexWarningMessage() {
|
|
15
|
+
return this.getPage().find('.unexpected-fedex-repository-warning');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static getAclManagementContainer() {
|
|
19
|
+
return this.getPage().find('.acl-management-container');
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getAclManagementContent() {
|
|
23
|
+
return this.getPage().find('.acl-management-content');
|
|
24
|
+
}
|
|
25
|
+
|
|
14
26
|
static getAclTable() {
|
|
15
27
|
return this.getPage().find('.acl-rules');
|
|
16
28
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {YasqeSteps} from "./yasgui/yasqe-steps";
|
|
2
|
+
import {YasrSteps} from './yasgui/yasr-steps.js';
|
|
2
3
|
|
|
3
4
|
const VIEW_URL = '/sparql';
|
|
4
5
|
|
|
@@ -20,6 +21,18 @@ export class SparqlEditorSteps {
|
|
|
20
21
|
YasqeSteps.waitUntilQueryIsVisible();
|
|
21
22
|
}
|
|
22
23
|
|
|
24
|
+
static visitSparqlEditorPageAndWaitForResults(urlParameters ) {
|
|
25
|
+
SparqlEditorSteps.visitSparqlEditorPage(urlParameters);
|
|
26
|
+
// Because we use angularjs less than 1.7.3 we use additional library ng-custom-element.umd.js to solve problem with property bindings
|
|
27
|
+
// This library make additional call to ontotext-yasgui-web-component and the component that's way the component renders twice when page loaded.
|
|
28
|
+
// This is bad because in tests cypress can find an element when it is rendered from first call and try to click it for example.
|
|
29
|
+
// If time of clicking such element is when second call to the component is done then exception that element is detached will be thrown.
|
|
30
|
+
// We will wait a little , to give a chance page is loaded correctly before test start.
|
|
31
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
32
|
+
cy.wait(1000);
|
|
33
|
+
YasrSteps.waitUntilResultsIsVisible();
|
|
34
|
+
}
|
|
35
|
+
|
|
23
36
|
static verifyUrl() {
|
|
24
37
|
cy.url().should('include', `${Cypress.config('baseUrl')}${VIEW_URL}`);
|
|
25
38
|
}
|
|
@@ -5,6 +5,10 @@ export class YasrSteps extends BaseSteps {
|
|
|
5
5
|
return cy.get('.tabPanel.active .yasr');
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
static waitUntilResultsIsVisible() {
|
|
9
|
+
return cy.waitUntil(() => this.getYasr().should('be.visible'));
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
static getResultHeader() {
|
|
9
13
|
return cy.get('.yasr_header');
|
|
10
14
|
}
|