graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR20
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/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 +36 -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/repository-picker-list-steps.js +54 -0
- package/steps/repository-selector-steps.js +16 -0
- package/steps/repository-steps.js +13 -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 +6 -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 +4 -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
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 getSelectRepositoryButton(repositoryId) {
|
|
28
|
+
return this.getRepositoryRow(repositoryId).find(this.buildTestIdAttr('repository-picker-select-btn'));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static focusRepository(repositoryId) {
|
|
32
|
+
this.getSelectRepositoryButton(repositoryId).focus();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getRepositoryInfo() {
|
|
36
|
+
return cy.get('.repository-info-popover-content onto-repository-info');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getRepositoryInfoPart(name) {
|
|
40
|
+
return this.getRepositoryInfo().find(this.buildTestIdAttr(`repository-info-${name}`));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static selectRepository(repositoryId) {
|
|
44
|
+
this.getRepositoryRow(repositoryId).click();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getCreateRepositoryButton() {
|
|
48
|
+
return this.getRepositoryPickerList().find(this.buildTestIdAttr('repository-picker-create-btn'));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static clickCreateRepositoryButton() {
|
|
52
|
+
this.getCreateRepositoryButton().click();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -23,4 +23,20 @@ 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 getRepositoryTooltip() {
|
|
36
|
+
return cy.get('.onto-tooltip-box onto-repository-info');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getRepositoryTooltipPart(name) {
|
|
40
|
+
return RepositorySelectorSteps.getRepositoryTooltip().find(`[data-test="repository-info-${name}"]`);
|
|
41
|
+
}
|
|
26
42
|
}
|
|
@@ -3,23 +3,24 @@ import {BaseSteps} from "./base-steps.js";
|
|
|
3
3
|
|
|
4
4
|
export class RepositorySteps extends BaseSteps {
|
|
5
5
|
|
|
6
|
-
static visit(
|
|
6
|
+
static visit() {
|
|
7
7
|
cy.intercept('/rest/locations').as('getLocations');
|
|
8
8
|
cy.intercept(REPOSITORIES_URL + '/all').as('getRepositories');
|
|
9
9
|
cy.visit('/repository');
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
11
|
+
// Consumes the initial locations request, so a later cy.wait('@getLocations') in a test matches the next one.
|
|
12
|
+
// It must stay after the page-loaded check, which has a longer timeout than cy.wait for the request to start.
|
|
13
13
|
cy.wait('@getLocations');
|
|
14
|
-
if (waitPageLoaded) {
|
|
15
|
-
RepositorySteps.waitUntilRepositoriesPageIsLoaded();
|
|
16
|
-
}
|
|
17
14
|
}
|
|
18
15
|
|
|
19
16
|
static visitEditPage(repositoryId) {
|
|
20
17
|
cy.visit(`repository/edit/${repositoryId}?location=`);
|
|
21
18
|
}
|
|
22
19
|
|
|
20
|
+
static verifyRepositoryCreateViewUrl() {
|
|
21
|
+
return cy.url().should('include', '/repository/create');
|
|
22
|
+
}
|
|
23
|
+
|
|
23
24
|
static getRepositoryPage() {
|
|
24
25
|
return cy.get('#wb-repository');
|
|
25
26
|
}
|
|
@@ -32,9 +33,12 @@ export class RepositorySteps extends BaseSteps {
|
|
|
32
33
|
return cy.get('#wb-repositories-addRepositoryLink');
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
// The page loader is hidden once the locations are loaded, regardless of the user's role.
|
|
35
37
|
static waitUntilRepositoriesPageIsLoaded() {
|
|
36
|
-
RepositorySteps.
|
|
37
|
-
|
|
38
|
+
RepositorySteps.getRepositoriesPage()
|
|
39
|
+
.should('be.visible')
|
|
40
|
+
.find('.ot-loader-new-content')
|
|
41
|
+
.should('not.be.visible');
|
|
38
42
|
}
|
|
39
43
|
|
|
40
44
|
static getRepositoriesDropdown() {
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {EnvironmentStubs} from "../../stubs/environment-stubs";
|
|
2
2
|
|
|
3
|
+
const CENTER_SCROLL = {scrollBehavior: 'center'};
|
|
4
|
+
|
|
3
5
|
export class UserAndAccessSteps {
|
|
4
6
|
static visit() {
|
|
5
7
|
cy.visit('/users');
|
|
@@ -118,7 +120,9 @@ export class UserAndAccessSteps {
|
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
static typeUsername(text) {
|
|
121
|
-
this.getUsernameField()
|
|
123
|
+
this.getUsernameField()
|
|
124
|
+
.focus()
|
|
125
|
+
.type(text);
|
|
122
126
|
}
|
|
123
127
|
|
|
124
128
|
static getPasswordField() {
|
|
@@ -238,13 +242,13 @@ export class UserAndAccessSteps {
|
|
|
238
242
|
.contains('Global (any data repository)')
|
|
239
243
|
.parent('tr')
|
|
240
244
|
.find('.graphql')
|
|
241
|
-
.
|
|
245
|
+
.click(CENTER_SCROLL);
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
static clickGraphqlAccessRepo(repoName) {
|
|
245
249
|
this.getRepositoryRightsLine(repoName)
|
|
246
250
|
.find('.graphql')
|
|
247
|
-
.
|
|
251
|
+
.click(CENTER_SCROLL);
|
|
248
252
|
}
|
|
249
253
|
|
|
250
254
|
static clickReadAccessAny() {
|
|
@@ -252,7 +256,7 @@ export class UserAndAccessSteps {
|
|
|
252
256
|
.contains('Global (any data repository)')
|
|
253
257
|
.parent('tr')
|
|
254
258
|
.find('.read')
|
|
255
|
-
.
|
|
259
|
+
.click(CENTER_SCROLL);
|
|
256
260
|
}
|
|
257
261
|
|
|
258
262
|
static clickReadAccessRepo(repoName) {
|
|
@@ -260,7 +264,7 @@ export class UserAndAccessSteps {
|
|
|
260
264
|
.contains(repoName)
|
|
261
265
|
.parent('tr')
|
|
262
266
|
.find('.read')
|
|
263
|
-
.
|
|
267
|
+
.click(CENTER_SCROLL);
|
|
264
268
|
}
|
|
265
269
|
|
|
266
270
|
static clickWriteAccessAny() {
|
|
@@ -268,7 +272,7 @@ export class UserAndAccessSteps {
|
|
|
268
272
|
.contains('Global (any data repository)')
|
|
269
273
|
.parent('tr')
|
|
270
274
|
.find('.write')
|
|
271
|
-
.
|
|
275
|
+
.click(CENTER_SCROLL);
|
|
272
276
|
}
|
|
273
277
|
|
|
274
278
|
static clickWriteAccessRepo(repoName) {
|
|
@@ -276,7 +280,7 @@ export class UserAndAccessSteps {
|
|
|
276
280
|
.contains(repoName)
|
|
277
281
|
.parent('tr')
|
|
278
282
|
.find('.write')
|
|
279
|
-
.
|
|
283
|
+
.click(CENTER_SCROLL);
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
static findUserRowAlias(username, aliasName = 'userRow') {
|
|
@@ -351,7 +355,7 @@ export class UserAndAccessSteps {
|
|
|
351
355
|
}
|
|
352
356
|
|
|
353
357
|
static toggleReadAccessForRepo(repoName) {
|
|
354
|
-
return this.getReadAccessForRepo(repoName).
|
|
358
|
+
return this.getReadAccessForRepo(repoName).click(CENTER_SCROLL);
|
|
355
359
|
}
|
|
356
360
|
|
|
357
361
|
static validateReadAccessForRepo(repoName, expectedState) {
|
|
@@ -374,7 +378,7 @@ export class UserAndAccessSteps {
|
|
|
374
378
|
}
|
|
375
379
|
|
|
376
380
|
static toggleWriteAccessForRepo(repoName) {
|
|
377
|
-
return this.getWriteAccessForRepo(repoName).
|
|
381
|
+
return this.getWriteAccessForRepo(repoName).click(CENTER_SCROLL);
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
static validateWriteAccessForRepo(repoName, expectedState) {
|
|
@@ -390,7 +394,7 @@ export class UserAndAccessSteps {
|
|
|
390
394
|
}
|
|
391
395
|
|
|
392
396
|
static clickMaintainAccessRepo(repoName) {
|
|
393
|
-
UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).
|
|
397
|
+
UserAndAccessSteps.getMaintainAccessRepoCheckbox(repoName).click(CENTER_SCROLL);
|
|
394
398
|
}
|
|
395
399
|
|
|
396
400
|
static toggleMaintainRepoForRepo(repoName) {
|
|
@@ -410,7 +414,7 @@ export class UserAndAccessSteps {
|
|
|
410
414
|
}
|
|
411
415
|
|
|
412
416
|
static toggleGraphqlAccessForRepo(repoName) {
|
|
413
|
-
return this.getGraphqlAccessForRepo(repoName).
|
|
417
|
+
return this.getGraphqlAccessForRepo(repoName).click(CENTER_SCROLL);
|
|
414
418
|
}
|
|
415
419
|
|
|
416
420
|
static validateGraphqlAccessForRepo(repoName, expectedState) {
|
|
@@ -455,19 +459,19 @@ export class UserAndAccessSteps {
|
|
|
455
459
|
.contains(repoName)
|
|
456
460
|
.parent('.row')
|
|
457
461
|
.find('.read')
|
|
458
|
-
.
|
|
462
|
+
.click(CENTER_SCROLL);
|
|
459
463
|
}
|
|
460
464
|
|
|
461
465
|
static clickFreeWriteAccessRepo(repoName) {
|
|
462
466
|
cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
|
|
463
467
|
cy.get('@row').scrollIntoView();
|
|
464
|
-
cy.get('@row').find('.write').
|
|
468
|
+
cy.get('@row').find('.write').click(CENTER_SCROLL);
|
|
465
469
|
}
|
|
466
470
|
|
|
467
471
|
static clickFreeGraphqlAccessRepo(repoName) {
|
|
468
472
|
cy.get('.repo-fields').contains(repoName).parent('.row').as('row');
|
|
469
473
|
cy.get('@row').scrollIntoView();
|
|
470
|
-
cy.get('@row').find('.graphql').
|
|
474
|
+
cy.get('@row').find('.graphql').click(CENTER_SCROLL);
|
|
471
475
|
}
|
|
472
476
|
|
|
473
477
|
}
|
package/steps/toaster-steps.js
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import {BaseSteps} from "../base-steps";
|
|
2
|
-
import {DeprecationSteps} from '../deprecation-banner/deprecation-banner-steps.js';
|
|
3
2
|
|
|
4
3
|
export class TTYGViewSteps extends BaseSteps {
|
|
5
|
-
|
|
6
|
-
* Visits the TTYG page and closes the Solr deprecation banner by default.
|
|
7
|
-
*
|
|
8
|
-
* @param {boolean} closeSolrBanner Whether to close the banner. Set to `false`
|
|
9
|
-
* when revisiting the page after the banner has already been closed.
|
|
10
|
-
*/
|
|
11
|
-
static visit(closeSolrBanner = true) {
|
|
4
|
+
static visit() {
|
|
12
5
|
cy.visit('/ttyg');
|
|
13
|
-
// Temporary workaround until the Solr deprecation banner is removed.
|
|
14
|
-
// The banner changes the page layout, causing tests to fail randomly.
|
|
15
|
-
// This quick fix prevents GraphDB build failures and should be deleted together with the banner.
|
|
16
|
-
if (closeSolrBanner) {
|
|
17
|
-
DeprecationSteps.closeBanner();
|
|
18
|
-
}
|
|
19
6
|
}
|
|
20
7
|
|
|
21
8
|
static getTtygView() {
|
|
@@ -369,6 +369,14 @@ export class VisualGraphSteps extends BaseSteps {
|
|
|
369
369
|
this.getGraphConfig(name).closest('tr').find('.delete-config').click();
|
|
370
370
|
}
|
|
371
371
|
|
|
372
|
+
static getEditConfigButton(name) {
|
|
373
|
+
return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-edit-btn');
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
static getDeleteConfigButton(name) {
|
|
377
|
+
return this.getGraphConfig(name).closest('tr').getByTestId('graph-config-delete-btn');
|
|
378
|
+
}
|
|
379
|
+
|
|
372
380
|
static getGraphConfigSearchPanel() {
|
|
373
381
|
return cy.get('.search-bar');
|
|
374
382
|
}
|