graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR21
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-flaky/import/import-server-files-operations.spec.js +8 -30
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
- package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
- package/e2e-flaky/sparql-editor/lucene-connector.spec.js +1 -1
- package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +27 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +31 -2
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
- package/e2e-legacy/graph-navigator/graph-navigator-restrictions.spec.js +216 -0
- package/e2e-legacy/graph-navigator/graph-navigator.spec.js +447 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
- package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
- package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
- package/e2e-legacy/home/home-page-without-repositories.spec.js +3 -1
- package/e2e-legacy/home/home-page-without-selected-repository.spec.js +2 -1
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +38 -5
- package/e2e-legacy/import/import-server-files.spec.js +39 -23
- package/e2e-legacy/import/import-user-data-file-upload.spec.js +47 -22
- package/e2e-legacy/import/import-user-data-settings-dialog.spec.js +81 -10
- package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
- package/e2e-legacy/import/import-user-data-url.spec.js +9 -5
- package/e2e-legacy/import/import-view.spec.js +2 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
- package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
- package/e2e-legacy/repository/attach-remote-location.spec.js +7 -15
- package/e2e-legacy/repository/fedx-deprecation.spec.js +178 -0
- package/e2e-legacy/repository/ontop-repository.spec.js +25 -34
- package/e2e-legacy/repository/rename-repository-restrictions.spec.js +5 -1
- package/e2e-legacy/repository/repositories.spec.js +3 -3
- package/e2e-legacy/repository/repository-picker-tooltip.spec.js +72 -0
- package/e2e-legacy/repository/repository-selector-tooltip.spec.js +55 -0
- package/e2e-legacy/resource/resource.spec.js +177 -40
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
- package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
- package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
- package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
- package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
- package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +1 -1
- package/e2e-legacy/setup/settings/my-settings.spec.js +25 -15
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +34 -25
- package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
- package/e2e-legacy/sparql-editor/sparql-editor-navigation.spec.js +219 -0
- package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +1 -1
- package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
- package/e2e-legacy/ttyg/create-agent.spec.js +6 -4
- package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
- package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
- package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
- package/e2e-security/setup/home/cookie-policy.spec.js +4 -0
- package/e2e-security/setup/license/license-loading.spec.js +57 -0
- package/e2e-security/setup/license/license-logout.spec.js +38 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +1 -1
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -1
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
- package/fixtures/cluster/cluster-config-with-tag.json +17 -0
- package/fixtures/connectors/get-connectors.json +0 -1
- package/fixtures/graph-navigator/graph-navigator-settings-invalid.ttl +149 -0
- package/fixtures/graph-navigator/graph-navigator-settings.ttl +148 -0
- package/fixtures/graphdb-import/wine.rdf +279 -285
- package/npm-shrinkwrap.json +1283 -1643
- package/package.json +10 -1
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-configuration-steps.js +4 -0
- package/steps/cookie-policy/cookie-consent-banner-steps.js +2 -2
- package/steps/error-steps.js +2 -2
- package/steps/explore/graphs-overview-steps.js +44 -0
- package/steps/graph-navigator-steps.js +145 -0
- package/steps/header-steps.js +5 -1
- package/steps/home-steps.js +3 -6
- package/steps/import/import-server-files-steps.js +8 -0
- package/steps/import/import-settings-dialog-steps.js +16 -0
- package/steps/import/import-steps.js +88 -17
- package/steps/import/import-test-constants.js +1 -1
- package/steps/import/import-user-data-steps.js +24 -24
- package/steps/language-selector-steps.js +4 -0
- package/steps/layout-steps.js +6 -0
- package/steps/login-steps.js +7 -3
- package/steps/main-menu-steps.js +14 -14
- package/steps/ontop-repository-steps.js +4 -0
- package/steps/page-restrictions-steps.js +24 -0
- package/steps/repositories/attach-repository-steps.js +2 -10
- package/steps/repository-picker-list-steps.js +58 -0
- package/steps/repository-selector-steps.js +20 -0
- package/steps/repository-steps.js +48 -9
- package/steps/resource/resource-steps.js +76 -9
- package/steps/setup/acl-management-steps.js +4 -24
- package/steps/setup/settings-steps.js +42 -0
- package/steps/setup/user-and-access-steps.js +18 -14
- package/steps/toaster-steps.js +4 -0
- package/steps/ttyg/ttyg-view-steps.js +1 -14
- package/steps/visual-graph-steps.js +8 -0
- package/steps/widgets/repository-errors-widget-steps.js +15 -2
- package/steps/yasgui/yasqe-steps.js +3 -1
- package/steps/yasgui/yasr-steps.js +8 -0
- package/stubs/browser-stubs.js +40 -0
- package/stubs/cluster/cluster-stubs.js +15 -1
- package/stubs/graph-navigator-stubs.js +27 -0
- package/stubs/license-stubs.js +11 -3
- package/stubs/repositories/repositories-stubs.js +44 -0
- package/stubs/yasgui/query-stubs.js +5 -0
- package/support/visual-graph-commands.js +19 -0
- package/e2e-legacy/home/solr-banner/solr-banner.spec.js +0 -137
- package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
- package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
- package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
- package/steps/deprecation-banner/deprecation-banner-steps.js +0 -13
- package/steps/deprecation-steps.js +0 -13
package/steps/login-steps.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {EnvironmentStubs} from "../stubs/environment-stubs";
|
|
2
|
-
|
|
2
|
+
const VIEW_URL = '/login';
|
|
3
3
|
export class LoginSteps {
|
|
4
4
|
static visitLoginPage() {
|
|
5
|
-
cy.visit(
|
|
5
|
+
cy.visit(VIEW_URL);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
static visitInProdMode() {
|
|
9
|
-
cy.visit(
|
|
9
|
+
cy.visit(VIEW_URL, {
|
|
10
10
|
onBeforeLoad: () => {
|
|
11
11
|
EnvironmentStubs.stubWbProdMode();
|
|
12
12
|
}
|
|
@@ -18,6 +18,10 @@ export class LoginSteps {
|
|
|
18
18
|
cy.visit(`/login?r=${returnURLEncoded}`);
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
static verifyUrl() {
|
|
22
|
+
cy.url().should('include', `${Cypress.config('baseUrl')}${VIEW_URL}`);
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
static getLoginPage() {
|
|
22
26
|
return cy.get('app-login');
|
|
23
27
|
}
|
package/steps/main-menu-steps.js
CHANGED
|
@@ -107,6 +107,15 @@ export class MainMenuSteps {
|
|
|
107
107
|
this.getSubMenuButton('sub-menu-visual-graph').click();
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
static clickOnGraphNavigator() {
|
|
111
|
+
this.clickOnExplore();
|
|
112
|
+
this.clickOnSubmenuGraphNavigator();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
static clickOnSubmenuGraphNavigator() {
|
|
116
|
+
this.getSubMenuButton('menu-graph-navigator').click();
|
|
117
|
+
}
|
|
118
|
+
|
|
110
119
|
static clickOnClassRelationships() {
|
|
111
120
|
this.clickOnExplore();
|
|
112
121
|
this.clickOnSubmenuClassRelationships();
|
|
@@ -272,23 +281,14 @@ export class MainMenuSteps {
|
|
|
272
281
|
}
|
|
273
282
|
|
|
274
283
|
// --------------------------
|
|
275
|
-
// --
|
|
284
|
+
// -- TTYG menu --
|
|
276
285
|
// --------------------------
|
|
277
|
-
static
|
|
278
|
-
return this.getMainMenu().getByTestId('menu-
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
static clickOnMenuLab() {
|
|
282
|
-
return this.getMenuLab().click();
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
static clickOnTTYG() {
|
|
286
|
-
this.clickOnMenuLab();
|
|
287
|
-
this.clickOnTTYGSubmenu()
|
|
286
|
+
static getMenuTTYG() {
|
|
287
|
+
return this.getMainMenu().getByTestId('menu-ttyg');
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
static
|
|
291
|
-
this.
|
|
290
|
+
static clickOnMenuTTYG() {
|
|
291
|
+
return this.getMenuTTYG().click();
|
|
292
292
|
}
|
|
293
293
|
|
|
294
294
|
// --------------------------
|
|
@@ -25,6 +25,10 @@ export class OntopRepositorySteps {
|
|
|
25
25
|
OntopRepositorySteps.getOBDAFileFieldEditButton().click();
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
static getFileContentEditor() {
|
|
29
|
+
return cy.getByTestId('repository-file-content');
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
static getOntologyFileField() {
|
|
29
33
|
return cy.get('div').contains("Ontology file");
|
|
30
34
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {BaseSteps} from "./base-steps.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Steps for the restriction block (`app-page-restrictions`) that the new workbench shows instead of a
|
|
5
|
+
* page's content when the page is restricted. For its repository picker see {@link RepositoryPickerListSteps}.
|
|
6
|
+
*/
|
|
7
|
+
export class PageRestrictionsSteps extends BaseSteps {
|
|
8
|
+
|
|
9
|
+
static getRestrictions() {
|
|
10
|
+
return this.getByTestId('page-restrictions');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static getMessages() {
|
|
14
|
+
return this.getRestrictions().find(this.buildTestIdAttr('page-restriction-message'));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getInternalLink() {
|
|
18
|
+
return this.getMessages().find(this.buildTestIdAttr('restriction-internal-link'));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
static getMessage(text) {
|
|
22
|
+
return this.getMessages().contains(text);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -120,15 +120,7 @@ export class AttachRepositorySteps {
|
|
|
120
120
|
AttachRepositorySteps.getPasswordInput().clear();
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
static
|
|
124
|
-
return this.getRemoteLocationSettingsForm().find('
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
static getBackwardCompatibilityWarning() {
|
|
128
|
-
return this.getRemoteLocationSettingsForm().find('.backward-compatibility-warning');
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
static encryptPassword() {
|
|
132
|
-
this.getRemoteLocationSettingsForm().find('#encryptPassword').check();
|
|
123
|
+
static getEncryptPasswordCheckbox() {
|
|
124
|
+
return this.getRemoteLocationSettingsForm().find('#encryptPassword');
|
|
133
125
|
}
|
|
134
126
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {BaseSteps} from "./base-steps.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Steps for the repository picker list (`app-repository-picker-list`) of the new workbench, which lists the
|
|
5
|
+
* repositories the user can select and, when allowed, offers the creation of a new one.
|
|
6
|
+
*/
|
|
7
|
+
export class RepositoryPickerListSteps extends BaseSteps {
|
|
8
|
+
|
|
9
|
+
static getRepositoryPickerList() {
|
|
10
|
+
return this.getByTestId('repository-picker-list');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static getRepositoryRows() {
|
|
14
|
+
return this.getRepositoryPickerList().find(this.buildTestIdAttr('repository-picker-row'));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static getRepositoryRow(repositoryId) {
|
|
18
|
+
return this.getRepositoryRows()
|
|
19
|
+
.contains(this.buildTestIdAttr('repository-picker-repository-id'), repositoryId)
|
|
20
|
+
.parents(this.buildTestIdAttr('repository-picker-row'));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static getRepositoryLocation(repositoryId) {
|
|
24
|
+
return this.getRepositoryRow(repositoryId).find(this.buildTestIdAttr('repository-picker-repository-location'));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getRepositoryFedxDeprecatedTag(repositoryId) {
|
|
28
|
+
return this.getRepositoryRow(repositoryId).find(this.buildTestIdAttr('repository-picker-fedx-deprecated-tag'));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static getSelectRepositoryButton(repositoryId) {
|
|
32
|
+
return this.getRepositoryRow(repositoryId).find(this.buildTestIdAttr('repository-picker-select-btn'));
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static focusRepository(repositoryId) {
|
|
36
|
+
this.getSelectRepositoryButton(repositoryId).focus();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getRepositoryInfo() {
|
|
40
|
+
return cy.get('.repository-info-popover-content onto-repository-info');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getRepositoryInfoPart(name) {
|
|
44
|
+
return this.getRepositoryInfo().find(this.buildTestIdAttr(`repository-info-${name}`));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static selectRepository(repositoryId) {
|
|
48
|
+
this.getRepositoryRow(repositoryId).click();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getCreateRepositoryButton() {
|
|
52
|
+
return this.getRepositoryPickerList().find(this.buildTestIdAttr('repository-picker-create-btn'));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static clickCreateRepositoryButton() {
|
|
56
|
+
this.getCreateRepositoryButton().click();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -23,4 +23,24 @@ export class RepositorySelectorSteps {
|
|
|
23
23
|
static getSelectedRepository() {
|
|
24
24
|
return RepositorySelectorSteps.getRepositorySelectorDropdown().find('.active-repository');
|
|
25
25
|
}
|
|
26
|
+
|
|
27
|
+
static getRepositoryItem(repositoryId) {
|
|
28
|
+
return RepositorySelectorSteps.getRepositorySelectorButton(repositoryId).closest('.onto-dropdown-menu-item');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static hoverRepositoryItem(repositoryId) {
|
|
32
|
+
RepositorySelectorSteps.getRepositoryItem(repositoryId).realHover();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getRepositoryFedxDeprecatedTag(repositoryId) {
|
|
36
|
+
return RepositorySelectorSteps.getRepositoryItem(repositoryId).getByTestId('repository-selector-fedx-deprecated-tag');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getRepositoryTooltip() {
|
|
40
|
+
return cy.get('.onto-tooltip-box onto-repository-info');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getRepositoryTooltipPart(name) {
|
|
44
|
+
return RepositorySelectorSteps.getRepositoryTooltip().find(`[data-test="repository-info-${name}"]`);
|
|
45
|
+
}
|
|
26
46
|
}
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import {REPOSITORIES_URL} from "../support/repository-commands";
|
|
2
2
|
import {BaseSteps} from "./base-steps.js";
|
|
3
|
+
import {ModalDialogSteps} from "./modal-dialog-steps.js";
|
|
3
4
|
|
|
4
5
|
export class RepositorySteps extends BaseSteps {
|
|
5
6
|
|
|
6
|
-
static visit(
|
|
7
|
+
static visit() {
|
|
7
8
|
cy.intercept('/rest/locations').as('getLocations');
|
|
8
9
|
cy.intercept(REPOSITORIES_URL + '/all').as('getRepositories');
|
|
9
10
|
cy.visit('/repository');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
12
|
+
// Consumes the initial locations request, so a later cy.wait('@getLocations') in a test matches the next one.
|
|
13
|
+
// It must stay after the page-loaded check, which has a longer timeout than cy.wait for the request to start.
|
|
13
14
|
cy.wait('@getLocations');
|
|
14
|
-
if (waitPageLoaded) {
|
|
15
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
16
|
-
}
|
|
17
15
|
}
|
|
18
16
|
|
|
19
17
|
static visitEditPage(repositoryId) {
|
|
20
18
|
cy.visit(`repository/edit/${repositoryId}?location=`);
|
|
21
19
|
}
|
|
22
20
|
|
|
21
|
+
static verifyRepositoryCreateViewUrl() {
|
|
22
|
+
return cy.url().should('include', '/repository/create');
|
|
23
|
+
}
|
|
24
|
+
|
|
23
25
|
static getRepositoryPage() {
|
|
24
26
|
return cy.get('#wb-repository');
|
|
25
27
|
}
|
|
@@ -32,9 +34,12 @@ export class RepositorySteps extends BaseSteps {
|
|
|
32
34
|
return cy.get('#wb-repositories-addRepositoryLink');
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
// The page loader is hidden once the locations are loaded, regardless of the user's role.
|
|
35
38
|
static waitUntilRepositoriesPageIsLoaded() {
|
|
36
|
-
RepositorySteps.
|
|
37
|
-
|
|
39
|
+
RepositorySteps.getRepositoriesPage()
|
|
40
|
+
.should('be.visible')
|
|
41
|
+
.find('.ot-loader-new-content')
|
|
42
|
+
.should('not.be.visible');
|
|
38
43
|
}
|
|
39
44
|
|
|
40
45
|
static getRepositoriesDropdown() {
|
|
@@ -186,6 +191,40 @@ export class RepositorySteps extends BaseSteps {
|
|
|
186
191
|
|
|
187
192
|
static createFedexRepositoryType() {
|
|
188
193
|
RepositorySteps.chooseRepositoryType('fedx');
|
|
194
|
+
// FedX is deprecated, so its creation is confirmed in a dialog.
|
|
195
|
+
RepositorySteps.confirmModal();
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
static getRepositoryTypeFedxDeprecationMessage(type) {
|
|
199
|
+
return RepositorySteps.getRepositoryTypeButton(type).find(RepositorySteps.buildTestIdAttr('repository-type-fedx-deprecation-message'));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
static getRepositoryFedxDeprecatedTag(repositoryId) {
|
|
203
|
+
return RepositorySteps.getRepositoryFromList(repositoryId).find(RepositorySteps.buildTestIdAttr('repository-fedx-deprecated-tag'));
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static hoverRepositoryInList(repositoryId) {
|
|
207
|
+
// "mouseover" sets the repository of the popover, "mouseenter" opens it.
|
|
208
|
+
RepositorySteps.getRepositoryFromList(repositoryId).find(RepositorySteps.buildTestIdAttr('repository-popover-trigger'))
|
|
209
|
+
.trigger('mouseover')
|
|
210
|
+
.trigger('mouseenter');
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
static getRepositoryPopoverDeprecationMessage() {
|
|
214
|
+
return RepositorySteps.getByTestId('repository-info-popover').find(RepositorySteps.buildTestIdAttr('repository-deprecation-message'));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
static getFedxDeprecationWarning() {
|
|
218
|
+
return RepositorySteps.getByTestId('repository-fedx-deprecation-warning');
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
static getFedxMigrationLink() {
|
|
222
|
+
return RepositorySteps.getByTestId('repository-fedx-migration-link');
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static getFedxDeprecationDialogMigrationLink() {
|
|
226
|
+
// The link comes from a translation rendered as HTML, which cannot keep a data-test attribute.
|
|
227
|
+
return ModalDialogSteps.getDialogBody().find('a');
|
|
189
228
|
}
|
|
190
229
|
|
|
191
230
|
static getGDBRepositoryTypeButton() {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
const VIEW_URL = '/resource';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* The label of the "triple term" role tab. It differs from the role itself, which is "triple-term".
|
|
5
|
+
* @type {string}
|
|
6
|
+
*/
|
|
7
|
+
export const TRIPLE_TERM_ROLE_LABEL = 'triple term';
|
|
8
|
+
|
|
3
9
|
export class ResourceSteps {
|
|
4
10
|
|
|
5
11
|
static visit(parameters) {
|
|
@@ -44,12 +50,12 @@ export class ResourceSteps {
|
|
|
44
50
|
ResourceSteps.getSameAsButton().find('.icon-same-as-off').should('have.length', 1);
|
|
45
51
|
}
|
|
46
52
|
|
|
47
|
-
static
|
|
48
|
-
return cy.
|
|
53
|
+
static getShowBlankNodesCheckbox() {
|
|
54
|
+
return cy.getByTestId('show-blank-nodes-checkbox');
|
|
49
55
|
}
|
|
50
56
|
|
|
51
|
-
static
|
|
52
|
-
ResourceSteps.
|
|
57
|
+
static clickOnShowBlankNodesCheckbox() {
|
|
58
|
+
ResourceSteps.getShowBlankNodesCheckbox().click();
|
|
53
59
|
}
|
|
54
60
|
|
|
55
61
|
static getDownloadAsDropdown() {
|
|
@@ -89,8 +95,12 @@ export class ResourceSteps {
|
|
|
89
95
|
return cy.get('#selection');
|
|
90
96
|
}
|
|
91
97
|
|
|
98
|
+
static getRoleTabs() {
|
|
99
|
+
return ResourceSteps.getRoleSelectionElement().find('.nav-link');
|
|
100
|
+
}
|
|
101
|
+
|
|
92
102
|
static getRoleTab(role = 'subject') {
|
|
93
|
-
return ResourceSteps.
|
|
103
|
+
return ResourceSteps.getRoleTabs().contains(role);
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
static selectRole(role) {
|
|
@@ -121,21 +131,59 @@ export class ResourceSteps {
|
|
|
121
131
|
ResourceSteps.getAllRoleTab().click();
|
|
122
132
|
}
|
|
123
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Verifies that the tab of the given role is the only active one. Only the rendered tabs are checked,
|
|
136
|
+
* because the "triple term" tab is rendered for triple terms only.
|
|
137
|
+
*
|
|
138
|
+
* @param {string} activeRole the label of the role tab which is expected to be active
|
|
139
|
+
*/
|
|
124
140
|
static verifyActiveRoleTab(activeRole = 'subject') {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
141
|
+
// Assert that the expected tab is rendered at all, otherwise the check below passes vacuously.
|
|
142
|
+
ResourceSteps.getRoleTab(activeRole).should('have.class', 'active');
|
|
143
|
+
ResourceSteps.getRoleTabs().each(($tab) => {
|
|
144
|
+
const chainer = $tab.text().trim() === activeRole ? 'have.class' : 'not.have.class';
|
|
145
|
+
cy.wrap($tab).should(chainer, 'active');
|
|
128
146
|
});
|
|
129
147
|
}
|
|
130
148
|
|
|
131
|
-
static
|
|
149
|
+
static verifyRoleTabDisabled(role) {
|
|
150
|
+
ResourceSteps.getRoleTab(role)
|
|
151
|
+
.should('have.class', 'disabled')
|
|
152
|
+
.and('have.attr', 'tabindex', '-1');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
static verifyRoleTabEnabled(role) {
|
|
156
|
+
ResourceSteps.getRoleTab(role)
|
|
157
|
+
.should('not.have.class', 'disabled')
|
|
158
|
+
.and('have.attr', 'tabindex', '0');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
static verifyRoleTabMissing(role) {
|
|
162
|
+
ResourceSteps.getRoleTabs().contains(role).should('not.exist');
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* @return {string[]} the roles which can be selected for a resource which is not a triple term.
|
|
167
|
+
*/
|
|
168
|
+
static getPlainResourceRoles() {
|
|
132
169
|
return ['subject', 'predicate', 'object', 'context', 'all'];
|
|
133
170
|
}
|
|
134
171
|
|
|
172
|
+
/**
|
|
173
|
+
* @return {string[]} the labels of all role tabs, including the "triple term" one.
|
|
174
|
+
*/
|
|
175
|
+
static getAllRoles() {
|
|
176
|
+
return [TRIPLE_TERM_ROLE_LABEL, ...ResourceSteps.getPlainResourceRoles()];
|
|
177
|
+
}
|
|
178
|
+
|
|
135
179
|
static getTargetLink() {
|
|
136
180
|
return cy.get('.target-link');
|
|
137
181
|
}
|
|
138
182
|
|
|
183
|
+
static clickOnTargetLink() {
|
|
184
|
+
ResourceSteps.getTargetLink().click();
|
|
185
|
+
}
|
|
186
|
+
|
|
139
187
|
static getTripleResourceLink() {
|
|
140
188
|
return cy.get('.triple-resource-link');
|
|
141
189
|
}
|
|
@@ -144,7 +192,26 @@ export class ResourceSteps {
|
|
|
144
192
|
ResourceSteps.getTripleResourceLink().click();
|
|
145
193
|
}
|
|
146
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Verifies the text of an element after trimming it. The templates surround the interpolated
|
|
197
|
+
* values with whitespace, which makes a plain "have.text" assertion unusable.
|
|
198
|
+
*
|
|
199
|
+
* @param {Cypress.Chainable} element the element whose text has to be verified
|
|
200
|
+
* @param {string} expectedText the expected text without any surrounding whitespace
|
|
201
|
+
*/
|
|
202
|
+
static verifyTrimmedText(element, expectedText) {
|
|
203
|
+
element.invoke('text').invoke('trim').should('eq', expectedText);
|
|
204
|
+
}
|
|
205
|
+
|
|
147
206
|
static getDataTable() {
|
|
148
207
|
return cy.get('.dataTable');
|
|
149
208
|
}
|
|
209
|
+
|
|
210
|
+
static getVisualizeGraphNavigatorButton() {
|
|
211
|
+
return cy.getByTestId('visualize-graph-navigator-button');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static clickOnVisualizeGraphNavigatorButton() {
|
|
215
|
+
ResourceSteps.getVisualizeGraphNavigatorButton().click();
|
|
216
|
+
}
|
|
150
217
|
}
|
|
@@ -190,7 +190,7 @@ export class AclManagementSteps {
|
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
static getWarningIcon(index) {
|
|
193
|
-
return this.getSavedRoleField(index).
|
|
193
|
+
return this.getSavedRoleField(index).find('.ri-alert-line');
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
static getWarningIconTooltipText(index) {
|
|
@@ -357,7 +357,7 @@ export class AclManagementSteps {
|
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
static checkIfRuleSavingIsForbidden(index) {
|
|
360
|
-
AclManagementSteps.getSaveRuleButton(index).should('
|
|
360
|
+
AclManagementSteps.getSaveRuleButton(index).should('be.visible');
|
|
361
361
|
AclManagementSteps.getSaveRuleDisabledButton(index).should('be.disabled');
|
|
362
362
|
}
|
|
363
363
|
|
|
@@ -388,16 +388,6 @@ export const ACL_VIEW = [
|
|
|
388
388
|
"object": "*",
|
|
389
389
|
"context": "*"
|
|
390
390
|
},
|
|
391
|
-
{
|
|
392
|
-
"scope": "statement",
|
|
393
|
-
"policy": "deny",
|
|
394
|
-
"role": "ROLE3",
|
|
395
|
-
"operation": "read",
|
|
396
|
-
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
397
|
-
"predicate": "*",
|
|
398
|
-
"object": "\"test aber auf Deutsch\"@en",
|
|
399
|
-
"context": "<http://example.com/graph1>"
|
|
400
|
-
},
|
|
401
391
|
{
|
|
402
392
|
"scope": "statement",
|
|
403
393
|
"policy": "allow",
|
|
@@ -415,7 +405,7 @@ export const ACL_VIEW = [
|
|
|
415
405
|
"operation": "write",
|
|
416
406
|
"subject": "<urn:Cat>",
|
|
417
407
|
"predicate": "*",
|
|
418
|
-
"object": "
|
|
408
|
+
"object": "<<( <http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de )>>",
|
|
419
409
|
"context": "*"
|
|
420
410
|
}
|
|
421
411
|
];
|
|
@@ -440,16 +430,6 @@ export const ACL = [
|
|
|
440
430
|
"object": "*",
|
|
441
431
|
"context": "*"
|
|
442
432
|
},
|
|
443
|
-
{
|
|
444
|
-
"scope": "statement",
|
|
445
|
-
"policy": "deny",
|
|
446
|
-
"role": "CUSTOM_ROLE3",
|
|
447
|
-
"operation": "read",
|
|
448
|
-
"subject": "<<<http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de>>",
|
|
449
|
-
"predicate": "*",
|
|
450
|
-
"object": "\"test aber auf Deutsch\"@en",
|
|
451
|
-
"context": "<http://example.com/graph1>"
|
|
452
|
-
},
|
|
453
433
|
{
|
|
454
434
|
"scope": "statement",
|
|
455
435
|
"policy": "allow",
|
|
@@ -467,7 +447,7 @@ export const ACL = [
|
|
|
467
447
|
"operation": "write",
|
|
468
448
|
"subject": "<urn:Cat>",
|
|
469
449
|
"predicate": "*",
|
|
470
|
-
"object": "
|
|
450
|
+
"object": "<<( <http://example.com/test> <http://www.w3.org/2000/01/rdf-schema#label> \"test aber auf Deutsch\"@de )>>",
|
|
471
451
|
"context": "*"
|
|
472
452
|
}
|
|
473
453
|
];
|
|
@@ -29,6 +29,10 @@ export class SettingsSteps {
|
|
|
29
29
|
return this.getSettingsPage().find('.login-credentials')
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
static getUsernameLabel() {
|
|
33
|
+
return this.getLoginPanel().find('label[for="wb-user-username"]');
|
|
34
|
+
}
|
|
35
|
+
|
|
32
36
|
static getPasswordField() {
|
|
33
37
|
return this.getLoginPanel().find('#wb-user-password:password');
|
|
34
38
|
}
|
|
@@ -62,6 +66,24 @@ export class SettingsSteps {
|
|
|
62
66
|
return this.getSparqlEditorPanel().find('.inference-label');
|
|
63
67
|
}
|
|
64
68
|
|
|
69
|
+
static getSchemaToggle() {
|
|
70
|
+
return this.getSparqlEditorPanel()
|
|
71
|
+
.find('#schema-on')
|
|
72
|
+
.find('.switch:checkbox');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static getSameAsToggleLabel() {
|
|
76
|
+
return this.getSparqlEditorPanel().find('label[for="sameAsCheck"]');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static getInferenceToggleLabel() {
|
|
80
|
+
return this.getSparqlEditorPanel().find('label[for="inferenceCheck"]');
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static getSchemaToggleLabel() {
|
|
84
|
+
return this.getSparqlEditorPanel().find('label[for="schemaCheck"]');
|
|
85
|
+
}
|
|
86
|
+
|
|
65
87
|
static getCountCheckbox() {
|
|
66
88
|
return this.getSparqlEditorPanel().find('#defaultCount:checkbox');
|
|
67
89
|
}
|
|
@@ -94,6 +116,26 @@ export class SettingsSteps {
|
|
|
94
116
|
return this.getSettingsPage().find('.user-repositories .table');
|
|
95
117
|
}
|
|
96
118
|
|
|
119
|
+
static getAnyRepositoryRow() {
|
|
120
|
+
return this.getUserRepositoryTable().find('.any-repo');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
static getAnyRepositoryReadCheckbox() {
|
|
124
|
+
return this.getAnyRepositoryRow().find('.read:checkbox');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
static getAnyRepositoryWriteCheckbox() {
|
|
128
|
+
return this.getAnyRepositoryRow().find('.write:checkbox');
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
static getAnyRepositoryMaintainCheckbox() {
|
|
132
|
+
return this.getAnyRepositoryRow().find('.maintain-repository:checkbox');
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
static getAnyRepositoryGraphqlCheckbox() {
|
|
136
|
+
return this.getAnyRepositoryRow().find('.graphql:checkbox');
|
|
137
|
+
}
|
|
138
|
+
|
|
97
139
|
static getRepositoryRightsRows() {
|
|
98
140
|
return this.getUserRepositoryTable().getByTestId('repository-rights-rows');
|
|
99
141
|
}
|