graphdb-workbench-tests 2.6.4 → 2.7.0-RC10
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/Dockerfile +3 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +7 -7
- package/fixtures/graphdb-import/0007-import-file.jsonld +27 -0
- package/fixtures/graphdb-import/more-files/jsonld-file.jsonld +8 -0
- package/fixtures/graphdb-import/more-files/rdfxml.rdf +15 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-correct-data.jsonld +8 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-incorrect-data.rdf +13 -0
- package/fixtures/graphdb-import/more-files-with-error/import-resource-with-long-error.rdf +13 -0
- package/fixtures/graphdb-import/sample-jsonld.json +8 -0
- package/fixtures/locale-en.json +251 -111
- package/fixtures/url-import-template.json +1 -0
- package/integration/cluster/cluster-legend.spec.js +36 -0
- package/integration/cluster/cluster-management.spec.js +4 -92
- package/integration/cluster/cluster-states.spec.js +117 -0
- package/integration/explore/graphs.overview.spec.js +62 -0
- package/integration/explore/similarity.spec.js +20 -2
- package/integration/guides/movies-interactive-guide.spec.js +1 -1
- package/integration/guides/star-wars-interactive-guide.js +1 -0
- package/integration/import/import-server-files-batch-operations.spec.js +121 -0
- package/integration/import/import-server-files.spec.js +147 -0
- package/integration/import/import-user-data-file-upload.spec.js +194 -0
- package/integration/import/import-user-data-settings-dialog.spec.js +70 -0
- package/integration/import/import-user-data-text-snippet.spec.js +246 -0
- package/integration/import/import-user-data-url.spec.js +70 -0
- package/integration/import/import-user-data.spec.js +119 -0
- package/integration/import/import-view.spec.js +108 -0
- package/integration/monitor/global-operation-statuses-component.spec.js +2 -2
- package/integration/repository/repositories.spec.js +20 -17
- package/integration/resource/resource.spec.js +40 -0
- package/integration/setup/aclmanagement/create-rule.spec.js +15 -0
- package/integration/setup/sparql-template-create.js +4 -4
- package/integration/setup/user-and-access.spec.js +98 -138
- package/integration/sparql-editor/internationalization.spec.js +62 -12
- package/integration/sparql-editor/yasgui-tabs.spec.js +15 -1
- package/integration/sparql-editor/yasr/download-as.spec.js +71 -0
- package/integration-flaky/import/import-server-files-operations.spec.js +142 -0
- package/integration-flaky/import/import-user-data-batch-operations.spec.js +185 -0
- package/integration-flaky/import/import.server.files.spec.js +3 -2
- package/integration-flaky/setup/sparql-template-create.js +1 -1
- package/integration-flaky/sparql-editor/actions/share-query.spec.js +1 -1
- package/npm-shrinkwrap.json +3198 -0
- package/package.json +10 -11
- package/steps/cluster/cluster-configuration-steps.js +17 -0
- package/steps/cluster/cluster-page-steps.js +20 -8
- package/steps/cluster/cluster-view-steps.js +6 -2
- package/steps/explore/graphs-overview-steps.js +32 -0
- package/steps/explore/similarity-indexes-steps.js +26 -0
- package/steps/guides/guide-steps.js +5 -19
- package/steps/home-steps.js +4 -0
- package/steps/import/file-overwrite-dialog-steps.js +16 -0
- package/steps/import/import-resource-message-dialog.js +46 -0
- package/steps/import/import-server-files-steps.js +36 -0
- package/steps/import/import-settings-dialog-steps.js +60 -0
- package/steps/import/import-steps.js +463 -0
- package/steps/import/import-user-data-steps.js +167 -0
- package/steps/json-ld-modal-steps.js +41 -0
- package/steps/language-selector-steps.js +12 -0
- package/steps/main-menu-steps.js +4 -0
- package/steps/resource/resource-steps.js +7 -2
- package/steps/setup/acl-management-steps.js +4 -0
- package/steps/setup/user-and-access-steps.js +189 -0
- package/steps/sparql-steps.js +1 -1
- package/steps/yasgui/yasgui-steps.js +6 -0
- package/steps/yasgui/yasr-steps.js +5 -0
- package/stubs/yasgui/query-stubs.js +4 -0
- package/support/commands.js +23 -0
- package/support/import-commands.js +10 -0
- package/support/sparql-commands.js +1 -1
- package/bin/graphdb-workbench-cypress +0 -29
- package/integration/help/rest-api.spec.js +0 -121
- package/integration/import/import.server.files.spec.js +0 -69
- package/integration/import/import.user.data.spec.js +0 -338
- package/steps/import-steps.js +0 -277
|
@@ -53,7 +53,12 @@ export class ResourceSteps {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
static getDownloadAsDropdown() {
|
|
56
|
-
return cy.get('.
|
|
56
|
+
return cy.get('.download-as');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static clickDownloadAsOption(option) {
|
|
60
|
+
this.getDownloadAsDropdown().click();
|
|
61
|
+
cy.get('.download-options li').eq(option).click();
|
|
57
62
|
}
|
|
58
63
|
|
|
59
64
|
static getVisualGraphButton() {
|
|
@@ -97,7 +102,7 @@ export class ResourceSteps {
|
|
|
97
102
|
}
|
|
98
103
|
|
|
99
104
|
static selectRole(role) {
|
|
100
|
-
ResourceSteps.getRoleTab(role).click();
|
|
105
|
+
ResourceSteps.getRoleTab(role).click({force: false});
|
|
101
106
|
}
|
|
102
107
|
|
|
103
108
|
static selectSubjectRole() {
|
|
@@ -161,6 +161,10 @@ export class AclManagementSteps {
|
|
|
161
161
|
this.getRoleField(index).clear().type(value);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
static getFieldError() {
|
|
165
|
+
return cy.get('div.small');
|
|
166
|
+
}
|
|
167
|
+
|
|
164
168
|
static getPluginField(index) {
|
|
165
169
|
return this.getRule(index).find('.plugin-cell textarea');
|
|
166
170
|
}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
export class UserAndAccessSteps {
|
|
2
|
+
static visit() {
|
|
3
|
+
cy.visit('/users');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
static getUrl() {
|
|
7
|
+
return cy.url();
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
static getSplashLoader() {
|
|
11
|
+
return cy.get('.ot-splash');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static getCreateNewUserButton() {
|
|
15
|
+
return cy.get('#wb-users-userCreateLink');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static clickCreateNewUserButton() {
|
|
19
|
+
this.getCreateNewUserButton().click();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
static getToggleSecuritySwitch() {
|
|
23
|
+
return cy.get('#toggle-security span.switch');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static toggleSecurity() {
|
|
27
|
+
this.getToggleSecuritySwitch().click();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
static getSecuritySwitchLabel() {
|
|
31
|
+
return cy.get('#toggle-security').find('.security-switch-label');
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
static getSecurityCheckbox() {
|
|
35
|
+
return cy.get('#toggle-security').find('.switch:checkbox');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
static getUser() {
|
|
39
|
+
return cy.get('@user');
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
static getUserType() {
|
|
43
|
+
return this.getUser().find('.user-type');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
static getRepositoryRights() {
|
|
47
|
+
return this.getUser().find('.repository-rights');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static getEditUserButton() {
|
|
51
|
+
return this.getUser().find('.edit-user-btn');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static getDeleteUserButton() {
|
|
55
|
+
return this.getUser().find('.delete-user-btn');
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
static getDateCreated() {
|
|
59
|
+
return this.getUser().find('.date-created');
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static getUsersTable() {
|
|
63
|
+
return cy.get('#wb-users-userInUsers');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static getTableRow() {
|
|
67
|
+
return this.getUsersTable().find('tbody tr');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static getUsersTableRow() {
|
|
71
|
+
return cy.get('#wb-users-userInUsers tr');
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
static findUserInTable(username) {
|
|
75
|
+
return this.getUsersTable().find(`tbody .username:contains(${username})`)
|
|
76
|
+
.closest('tr').as('user');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static getUsernameField() {
|
|
80
|
+
return cy.get('#wb-user-username');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static typeUsername(text) {
|
|
84
|
+
this.getUsernameField().type(text);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
static getPasswordField() {
|
|
88
|
+
return cy.get('#wb-user-password');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
static typePassword(text) {
|
|
92
|
+
this.getPasswordField().type(text);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
static getConfirmPasswordField() {
|
|
96
|
+
return cy.get('#wb-user-confirmpassword');
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
static typeConfirmPasswordField(text) {
|
|
100
|
+
this.getConfirmPasswordField().type(text);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
static getNoPasswordCheckbox() {
|
|
104
|
+
return cy.get('#noPassword:checkbox');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static getCustomRoleField() {
|
|
108
|
+
return cy.get('tags-input');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
static addTextToCustomRoleField(text) {
|
|
112
|
+
this.getCustomRoleField().type(text);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static getConfirmUserCreateButton() {
|
|
116
|
+
return cy.get('#wb-user-submit');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static confirmUserCreate() {
|
|
120
|
+
cy.get('#wb-user-submit').click();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static getRoleRadioButton(userRole) {
|
|
124
|
+
return cy.get(userRole);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static selectRoleRadioButton(role) {
|
|
128
|
+
this.getRoleRadioButton(role).click();
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static getRepositoryRightsList() {
|
|
132
|
+
return cy.get('#user-repos');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static clickWriteAccess() {
|
|
136
|
+
cy.get('.write').click();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
static getFieldError() {
|
|
140
|
+
return cy.get('div.small');
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
static getError() {
|
|
144
|
+
return cy.get('.alert-danger');
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
static getModal() {
|
|
148
|
+
return cy.get('.modal-dialog');
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
static getDialogText() {
|
|
152
|
+
return this.getModal().find('.lead');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static confirmInDialog() {
|
|
156
|
+
this.getModal().find('.confirm-btn').click();
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
static deleteUser(username) {
|
|
160
|
+
this.findUserInTable(username);
|
|
161
|
+
cy.get('@user')
|
|
162
|
+
.should('have.length', 1)
|
|
163
|
+
.within(() => {
|
|
164
|
+
cy.get('.delete-user-btn')
|
|
165
|
+
.as('deleteBtn');
|
|
166
|
+
});
|
|
167
|
+
return cy.waitUntil(() =>
|
|
168
|
+
cy.get('@deleteBtn')
|
|
169
|
+
.then((deleteBtn) => deleteBtn && Cypress.dom.isAttached(deleteBtn) && deleteBtn.trigger('click')))
|
|
170
|
+
.then(() => {
|
|
171
|
+
cy.get('.confirm-btn').click();
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
static loginWithUser(username, password) {
|
|
176
|
+
cy.get('#wb-login-username').type(username);
|
|
177
|
+
cy.get('#wb-login-password').type(password);
|
|
178
|
+
cy.get('#wb-login-submitLogin').click();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
static logout() {
|
|
182
|
+
cy.get('#btnGroupDrop2').click();
|
|
183
|
+
cy.get('.dropdown-item')
|
|
184
|
+
.contains('Logout')
|
|
185
|
+
.closest('a')
|
|
186
|
+
// Force the click because Cypress sometimes determines that the item has 0x0 dimensions
|
|
187
|
+
.click({force: true});
|
|
188
|
+
}
|
|
189
|
+
}
|
package/steps/sparql-steps.js
CHANGED
|
@@ -176,6 +176,12 @@ export class YasguiSteps {
|
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
export class PluginTabs {
|
|
180
|
+
static getGoogleChartsTab() {
|
|
181
|
+
return cy.get('.select_charts');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
179
185
|
export class TabContextMenu {
|
|
180
186
|
static getContextMenu() {
|
|
181
187
|
return cy.get('.yasgui .context-menu');
|
|
@@ -86,6 +86,11 @@ export class YasrSteps {
|
|
|
86
86
|
return this.getDownloadAsDropdown().find('.ontotext-dropdown-menu-item').eq(number);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
static selectDownloadAsOption(number) {
|
|
90
|
+
// Click with force: true, because the repository dropdown at the top of the page hides the option
|
|
91
|
+
this.getDownloadAsOption(number).click({force: true});
|
|
92
|
+
}
|
|
93
|
+
|
|
89
94
|
static getPagination() {
|
|
90
95
|
return YasrSteps.getYasr().find('.ontotext-pagination');
|
|
91
96
|
}
|
|
@@ -14,6 +14,10 @@ export class QueryStubs {
|
|
|
14
14
|
QueryStubs.stubQueryResponse(repositoryId, '/graphql-editor/default-query-response.json', withDelay);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
static stubLongRunningQuery(repositoryId, delay = 3000) {
|
|
18
|
+
QueryStubs.stubQueryResponse(repositoryId, '/graphql-editor/default-query-response.json', delay);
|
|
19
|
+
}
|
|
20
|
+
|
|
17
21
|
static stubEmptyQueryResponse(repositoryId, withDelay = 0) {
|
|
18
22
|
QueryStubs.stubQueryResponse(repositoryId, '/queries/empty-query-response.json', withDelay);
|
|
19
23
|
}
|
package/support/commands.js
CHANGED
|
@@ -6,6 +6,29 @@ import './settings-commands';
|
|
|
6
6
|
import './visual-graph-commands';
|
|
7
7
|
import 'cypress-wait-until';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Loads fixtures from the given paths recursively and returns them as an array.
|
|
11
|
+
*
|
|
12
|
+
* Emits an alias in form file-0, file-1, file-2, etc. for each fixture file loaded.
|
|
13
|
+
*
|
|
14
|
+
* @param {[string]} remainingPaths - file paths to load
|
|
15
|
+
* @param {[object]} loadedContents - array of already loaded contents
|
|
16
|
+
* @return {Cypress.Chainable<unknown>}
|
|
17
|
+
*/
|
|
18
|
+
function loadFixtures(remainingPaths, loadedContents) {
|
|
19
|
+
return cy.fixture(remainingPaths[0]).as(`file-${loadedContents.length}`).then((contents) => {
|
|
20
|
+
loadedContents.push(contents);
|
|
21
|
+
if (remainingPaths.length > 1) {
|
|
22
|
+
return loadFixtures(remainingPaths.slice(1), loadedContents);
|
|
23
|
+
}
|
|
24
|
+
return cy.wrap(loadedContents);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// defined as: fixtures<Contents = unknown>(paths: string[]): Chainable<Contents[]>;
|
|
29
|
+
Cypress.Commands.add('fixtures', (paths) => {
|
|
30
|
+
return loadFixtures(paths, []);
|
|
31
|
+
});
|
|
9
32
|
|
|
10
33
|
/**
|
|
11
34
|
* Cypress cannot directly work with iframes due to https://github.com/cypress-io/cypress/issues/136
|
|
@@ -32,6 +32,16 @@ Cypress.Commands.add('importServerFile', (repositoryId, fileName, importSettings
|
|
|
32
32
|
waitServerOperation(SERVER_URL, repositoryId, fileName);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
Cypress.Commands.add('deleteUploadedFile', (repositoryId, fileName) => {
|
|
36
|
+
const fileNames = Array.isArray(fileName)? fileName : [fileName];
|
|
37
|
+
cy.request({
|
|
38
|
+
method: 'DELETE',
|
|
39
|
+
url: `${REPOSITORIES_URL}${repositoryId}/import/upload/status?remove=true`,
|
|
40
|
+
body: fileNames,
|
|
41
|
+
headers: {'Content-type': 'application/json;charset=utf-8'}
|
|
42
|
+
}).should((response) => expect(response.status).to.equal(200));
|
|
43
|
+
});
|
|
44
|
+
|
|
35
45
|
function waitServerOperation(url, repositoryId, fileName) {
|
|
36
46
|
cy.request({
|
|
37
47
|
method: 'GET',
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
** This NodeJS script will programmatically run the Cypress tests bundled in this module.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const path = require('path');
|
|
8
|
-
const cypress = require('cypress');
|
|
9
|
-
const cypressConfig = require('../cypress.config.js');
|
|
10
|
-
|
|
11
|
-
const originalWorkingDir = process.cwd();
|
|
12
|
-
|
|
13
|
-
// Forcing Cypress to look for cypress.json and related test files from within this module file structure
|
|
14
|
-
process.chdir(path.resolve(__dirname, '../'));
|
|
15
|
-
|
|
16
|
-
// However, configure reports to be stored in the folder from which the tests were executed
|
|
17
|
-
cypressConfig.screenshotsFolder = path.resolve(originalWorkingDir, 'report/screenshots/');
|
|
18
|
-
cypressConfig.videosFolder = path.resolve(originalWorkingDir, 'report/videos/');
|
|
19
|
-
|
|
20
|
-
// TODO: For some reason Cypress won't automatically resolve env vars, figure out why
|
|
21
|
-
if (process.env.CYPRESS_BASE_URL) {
|
|
22
|
-
cypressConfig.baseUrl = process.env.CYPRESS_BASE_URL;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
cypress.run({config: cypressConfig}).then((results) => {
|
|
26
|
-
process.exit(results.totalFailed);
|
|
27
|
-
}).catch((err) => {
|
|
28
|
-
process.exit(1);
|
|
29
|
-
});
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
describe.skip('Help / REST API', () => {
|
|
2
|
-
|
|
3
|
-
before(() => {
|
|
4
|
-
// Disables the security (only for this spec) to be able to interact with Swagger's iframe
|
|
5
|
-
// See https://github.com/cypress-io/cypress/issues/136
|
|
6
|
-
Cypress.config({chromeWebSecurity: false});
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
cy.visit('/webapi');
|
|
11
|
-
cy.window();
|
|
12
|
-
getSwaggerFrame()
|
|
13
|
-
.find('#message-bar')
|
|
14
|
-
.should('be.visible');
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// TODO: Check explicitly for all controllers (name + summary) ?
|
|
18
|
-
|
|
19
|
-
it('should provide documentation and examples for GraphDB APIs', () => {
|
|
20
|
-
// The GraphDB API section should list the available controllers & each controller should have a heading and possible options
|
|
21
|
-
verifyControllerList(getGraphDBAPI());
|
|
22
|
-
|
|
23
|
-
// All controllers should be collapsed
|
|
24
|
-
verifyControllerListIsCollapsed(getGraphDBAPI());
|
|
25
|
-
|
|
26
|
-
// Examine the import controller
|
|
27
|
-
verifyControllerOptions('import-controller', 'Data import');
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should provide documentation and examples for RDF4J APIs', () => {
|
|
31
|
-
// The RDF4J API section should list the available controllers & each controller should have a heading and possible options
|
|
32
|
-
verifyControllerList(getRDF4JAPI());
|
|
33
|
-
|
|
34
|
-
// All controllers should be collapsed
|
|
35
|
-
verifyControllerListIsCollapsed(getRDF4JAPI());
|
|
36
|
-
|
|
37
|
-
// Examine the import controller
|
|
38
|
-
verifyControllerOptions('repository-management-controller', 'Repository management');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
function getSwaggerFrame() {
|
|
42
|
-
return cy.get('#webapi_frame').iframe();
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function getGraphDBAPI() {
|
|
46
|
-
return getSwaggerFrame().find('#swagger-ui-container-graphdb');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function getRDF4JAPI() {
|
|
50
|
-
return getSwaggerFrame().find('#swagger-ui-container-rdf4j');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
function getGraphDBController(id) {
|
|
54
|
-
return getGraphDBAPI().find('.resource .heading').contains(id).parentsUntil('#resources').last();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function verifyControllerList(controllerSection) {
|
|
58
|
-
controllerSection.within(($section) => {
|
|
59
|
-
cy.wrap($section)
|
|
60
|
-
.should('be.visible')
|
|
61
|
-
.find('.resource')
|
|
62
|
-
.should('be.visible')
|
|
63
|
-
.its('length')
|
|
64
|
-
.should('be.gt', 0)
|
|
65
|
-
|
|
66
|
-
// Go back to the section
|
|
67
|
-
.root()
|
|
68
|
-
.find('.resource > .heading')
|
|
69
|
-
.should('be.visible')
|
|
70
|
-
.find('.options')
|
|
71
|
-
.should('be.visible')
|
|
72
|
-
.find('.toggleEndpointList')
|
|
73
|
-
.should('be.visible')
|
|
74
|
-
.and('not.be.disabled');
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
function verifyControllerListIsCollapsed(controllerSection) {
|
|
79
|
-
controllerSection
|
|
80
|
-
.find('.resource .endpoints')
|
|
81
|
-
.should('not.be.visible');
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
function verifyControllerOptions(id, summary) {
|
|
85
|
-
getGraphDBController(id)
|
|
86
|
-
.should('be.visible')
|
|
87
|
-
.within(() => {
|
|
88
|
-
// Should have a heading text
|
|
89
|
-
// Note: selecting the first heading, otherwise it will select each endpoint heading too
|
|
90
|
-
cy.get('> .heading')
|
|
91
|
-
.should('contain', summary)
|
|
92
|
-
|
|
93
|
-
// Should allow certain operations from the heading
|
|
94
|
-
.find('.options')
|
|
95
|
-
.should('be.visible')
|
|
96
|
-
.find('li')
|
|
97
|
-
// Make sure we have selected only the controller options
|
|
98
|
-
.should('have.length', 3)
|
|
99
|
-
.and('contain', 'Show/Hide')
|
|
100
|
-
.and('contain', 'List Operations')
|
|
101
|
-
.and('contain', 'Expand Operations')
|
|
102
|
-
|
|
103
|
-
// Expand the available endpoints and methods, should list their headings and options
|
|
104
|
-
.find('.collapseResource')
|
|
105
|
-
.click();
|
|
106
|
-
|
|
107
|
-
cy.get('.endpoints .heading').within(() => {
|
|
108
|
-
cy.get('.path').should('be.visible');
|
|
109
|
-
cy.get('.options').should('be.visible');
|
|
110
|
-
});
|
|
111
|
-
// Should not show examples, only paths & options
|
|
112
|
-
cy.get('.endpoints .content').should('not.be.visible');
|
|
113
|
-
|
|
114
|
-
// Expand all operations for the import controller
|
|
115
|
-
cy.get('> .heading .options .expandResource').click();
|
|
116
|
-
// For each endpoint there should be an example along with the path heading
|
|
117
|
-
cy.get('.endpoints .heading .path').should('be.visible');
|
|
118
|
-
cy.get('.endpoints .content').should('be.visible');
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
});
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import ImportSteps from '../../steps/import-steps';
|
|
2
|
-
|
|
3
|
-
describe('Import screen validation - server files', () => {
|
|
4
|
-
|
|
5
|
-
let repositoryId;
|
|
6
|
-
|
|
7
|
-
const BASE_URI = 'http://purl.org/dc/elements/1.1/';
|
|
8
|
-
const CONTEXT = 'http://example.org/context';
|
|
9
|
-
const SUCCESS_MESSAGE = 'Imported successfully';
|
|
10
|
-
const FILE_FOR_IMPORT = 'italian_public_schools_links.nt.gz';
|
|
11
|
-
const TTLS_FOR_IMPORT = 'test_turtlestar.ttls';
|
|
12
|
-
const TRIGS_FOR_IMPORT = 'test-trigstar.trigs';
|
|
13
|
-
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
repositoryId = 'server-import-' + Date.now();
|
|
16
|
-
cy.createRepository({id: repositoryId});
|
|
17
|
-
ImportSteps.visitServerImport(repositoryId);
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
afterEach(() => {
|
|
21
|
-
cy.deleteRepository(repositoryId);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
it('Test import Server files successfully without changing settings', () => {
|
|
25
|
-
ImportSteps
|
|
26
|
-
.selectServerFile(FILE_FOR_IMPORT)
|
|
27
|
-
.importServerFiles()
|
|
28
|
-
.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
29
|
-
.verifyImportStatusDetails(FILE_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
it('Test import Server files successfully with changing settings', () => {
|
|
33
|
-
ImportSteps.selectServerFile(FILE_FOR_IMPORT)
|
|
34
|
-
.importServerFiles(true)
|
|
35
|
-
.fillBaseURI(BASE_URI)
|
|
36
|
-
.selectNamedGraph()
|
|
37
|
-
.fillNamedGraph(CONTEXT)
|
|
38
|
-
.expandAdvancedSettings()
|
|
39
|
-
.enablePreserveBNodes()
|
|
40
|
-
.importFromSettingsDialog()
|
|
41
|
-
.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
42
|
-
.verifyImportStatusDetails(FILE_FOR_IMPORT, [CONTEXT, BASE_URI, '"preserveBNodeIds": true,']);
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
it('Test import with resetting status of imported file', () => {
|
|
46
|
-
ImportSteps
|
|
47
|
-
.selectServerFile(FILE_FOR_IMPORT)
|
|
48
|
-
.importServerFiles()
|
|
49
|
-
.verifyImportStatus(FILE_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
50
|
-
.resetStatusOfUploadedFile(FILE_FOR_IMPORT)
|
|
51
|
-
.verifyNoImportStatus(FILE_FOR_IMPORT);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('Test import turtlestar from Server files successfully without changing settings', () => {
|
|
55
|
-
ImportSteps
|
|
56
|
-
.selectServerFile(TTLS_FOR_IMPORT)
|
|
57
|
-
.importServerFiles()
|
|
58
|
-
.verifyImportStatus(TTLS_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
59
|
-
.verifyImportStatusDetails(TTLS_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
60
|
-
});
|
|
61
|
-
it('Test import trigstar from Server files successfully without changing settings', () => {
|
|
62
|
-
ImportSteps
|
|
63
|
-
.selectServerFile(TRIGS_FOR_IMPORT)
|
|
64
|
-
.importServerFiles()
|
|
65
|
-
.verifyImportStatus(TRIGS_FOR_IMPORT, SUCCESS_MESSAGE)
|
|
66
|
-
.verifyImportStatusDetails(TRIGS_FOR_IMPORT, '"preserveBNodeIds": false,');
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
});
|