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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "graphdb-workbench-tests",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-TR20",
|
|
4
4
|
"description": "Cypress tests for GraphDB workbench",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -57,5 +57,14 @@
|
|
|
57
57
|
"minimist": "^1.2.8",
|
|
58
58
|
"mocha-junit-reporter": "^2.2.1",
|
|
59
59
|
"path-browserify": "^1.0.1"
|
|
60
|
+
},
|
|
61
|
+
"overrides": {
|
|
62
|
+
"js-yaml@^3": "^3.15.2",
|
|
63
|
+
"istanbul-lib-processinfo": {
|
|
64
|
+
"uuid": "^11.1.1"
|
|
65
|
+
},
|
|
66
|
+
"@actions/http-client": {
|
|
67
|
+
"undici": "^6.29.0"
|
|
68
|
+
}
|
|
60
69
|
}
|
|
61
70
|
}
|
package/steps/base-steps.js
CHANGED
|
@@ -119,6 +119,10 @@ export class ClusterConfigurationSteps {
|
|
|
119
119
|
return this.getMultiRegionTabContent().find('.title');
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
static getNoLeaderAlert() {
|
|
123
|
+
return this.getMultiRegionTabContent().find('.no-leader-alert');
|
|
124
|
+
}
|
|
125
|
+
|
|
122
126
|
static getAddTagButton() {
|
|
123
127
|
return this.getMultiRegionTabContent().find('.create-tag-btn');
|
|
124
128
|
}
|
|
@@ -4,7 +4,7 @@ export class CookieConsentBannerSteps {
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
static getCookieConsentButton() {
|
|
7
|
-
return this.getCookieConsentBanner().find('
|
|
7
|
+
return this.getCookieConsentBanner().find('#accept-cookie-policy');
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
static giveCookieConsent() {
|
|
@@ -12,7 +12,7 @@ export class CookieConsentBannerSteps {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
static getCookiePolicyLink() {
|
|
15
|
-
return cy.get('
|
|
15
|
+
return cy.get('#cookie-policy-link');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
static clickCookiePolicyLink() {
|
package/steps/error-steps.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class ErrorSteps {
|
|
2
2
|
|
|
3
3
|
static getRepositoryErrors() {
|
|
4
|
-
return cy.get('.
|
|
4
|
+
return cy.get('.repository-errors')
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
static verifyError(errorMessage) {
|
|
@@ -9,7 +9,7 @@ export class ErrorSteps {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
static getNoConnectedRepoMessage() {
|
|
12
|
-
return this.getRepositoryErrors().find('.alert.
|
|
12
|
+
return this.getRepositoryErrors().find('.alert.alert-info');
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
static verifyNoConnectedRepoMessage() {
|
|
@@ -86,6 +86,50 @@ export class GraphsOverviewSteps {
|
|
|
86
86
|
return this.getGraphsOverviewComponent().find('.search-graphs');
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
static getGraphsSearchLabel() {
|
|
90
|
+
return this.getGraphsOverviewComponent().find('label[for="search-graphs"]');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
static getResultsHeader() {
|
|
94
|
+
return this.getResultsElement().find('thead');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
static getSelectAllGraphsCheckbox() {
|
|
98
|
+
return this.getResultsHeader().find('.select-all-graphs-checkbox');
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
static getExportSelectedGraphsButton() {
|
|
102
|
+
return this.getResultsHeader().find('.export-selected-graphs-btn');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
static getDeleteSelectedGraphsButton() {
|
|
106
|
+
return this.getResultsHeader().find('.delete-selected-graphs-btn');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
static getActionsColumnHeader() {
|
|
110
|
+
return this.getResultsHeader().find('#actionsColumn');
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static getGraphRow(graphName) {
|
|
114
|
+
return this.getResultsElement().find(`tbody a[title="${graphName}"]`).closest('tr');
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
static getDefaultGraphRow() {
|
|
118
|
+
return cy.getByTestId('graph-is-not-shaql').contains('The default graph').closest('tr');
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static getSelectGraphCheckbox(graphName) {
|
|
122
|
+
return this.getGraphRow(graphName).find('.select-graph-checkbox');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
static getExportGraphButton(graphName) {
|
|
126
|
+
return this.getGraphRow(graphName).find('.export-graph');
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static getDeleteGraphButton(graphName) {
|
|
130
|
+
return this.getGraphRow(graphName).find('.delete-graph-btn');
|
|
131
|
+
}
|
|
132
|
+
|
|
89
133
|
static getGraphsPaginator() {
|
|
90
134
|
return this.getGraphsOverviewComponent().find('.graphs-overview-paginator');
|
|
91
135
|
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {BaseSteps} from "./base-steps.js";
|
|
2
|
+
|
|
3
|
+
const VIEW_URL = '/graph-navigator';
|
|
4
|
+
|
|
5
|
+
export class GraphNavigatorSteps extends BaseSteps {
|
|
6
|
+
|
|
7
|
+
static visit(uri) {
|
|
8
|
+
cy.visit(`${VIEW_URL}${uri ? ('?uri=' + uri) : ''}`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
static visitWithQuery(query, {inference = false, sameAs = false} = {}) {
|
|
12
|
+
cy.visit(`${VIEW_URL}?query=${encodeURIComponent(query)}&inference=${inference}&sameAs=${sameAs}`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
static verifyUrl() {
|
|
16
|
+
this.validateUrl(`${Cypress.config('baseUrl')}${VIEW_URL}`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
static verifyStartResourceUri(uri) {
|
|
20
|
+
cy.getQueryParam('uri').should('eq', uri);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static verifyOnlyRepositoryParam(repositoryId) {
|
|
24
|
+
cy.location('search').should('eq', `?repositoryId=${repositoryId}`);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static getComponent() {
|
|
28
|
+
return cy.get('graphwise-reactodia');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static getWorkspace() {
|
|
32
|
+
return GraphNavigatorSteps.getComponent().find('.reactodia-workspace');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
static getCanvas() {
|
|
36
|
+
return GraphNavigatorSteps.getComponent().find('.reactodia-canvas');
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static getElements() {
|
|
40
|
+
return GraphNavigatorSteps.getCanvas().find('[data-element-id]');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static getElement(text) {
|
|
44
|
+
return GraphNavigatorSteps.getCanvas().find(`[data-element-id]`).contains(text).first();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
static getSearchInput() {
|
|
48
|
+
return GraphNavigatorSteps.getComponent().find('.reactodia-unified-search__search-input');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
static getSearchSectionTab(name) {
|
|
52
|
+
return GraphNavigatorSteps.getComponent().find('.reactodia-unified-search__section-tab').contains(name);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
static searchEntities(text) {
|
|
56
|
+
GraphNavigatorSteps.getSearchInput().click();
|
|
57
|
+
GraphNavigatorSteps.getSearchSectionTab('Entities').click();
|
|
58
|
+
GraphNavigatorSteps.getSearchInput().clear().type(`${text}{enter}`);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static getSettingsButton() {
|
|
62
|
+
return cy.get('[data-test="graph-navigator-settings-btn"]');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
static openSettings() {
|
|
66
|
+
GraphNavigatorSteps.getSettingsButton().click();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
static closeSettings() {
|
|
70
|
+
cy.get('.graph-navigator-settings-drawer .p-drawer-close-button').click();
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
static clickOnCanvas() {
|
|
74
|
+
GraphNavigatorSteps.getCanvas().click('bottomLeft');
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static getSettingsSidebar() {
|
|
78
|
+
return cy.get('[data-test="graph-navigator-settings-sidebar"]');
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
static getSettingsFileInput() {
|
|
82
|
+
return this.getByTestId('graph-navigator-settings-upload').find('.p-fileupload-choose-button input[type=file]');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
static selectSettingsFile(file) {
|
|
86
|
+
// PrimeNG hides the file input (display: none), so force is needed to select a file on it.
|
|
87
|
+
this.getSettingsFileInput().selectFile(file, {force: true});
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static getSelectedSettingsFile(fileName) {
|
|
91
|
+
return GraphNavigatorSteps.getSettingsSidebar().contains(fileName);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
static getUploadErrors() {
|
|
95
|
+
return this.getByTestId('graph-navigator-settings-upload-errors');
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static getUploadError(property) {
|
|
99
|
+
return GraphNavigatorSteps.getUploadErrors().contains('[data-test="graph-navigator-settings-upload-error"]', property);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static getUploadButton() {
|
|
103
|
+
return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-upload-button');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static clickUpload() {
|
|
107
|
+
GraphNavigatorSteps.getUploadButton().click();
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static clickCancelFile() {
|
|
111
|
+
GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-cancel-button').click();
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
static getBrowseButton() {
|
|
115
|
+
return GraphNavigatorSteps.getSettingsSidebar().find('.p-fileupload-choose-button');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static clickExport() {
|
|
119
|
+
cy.get('[data-test="graph-navigator-settings-export-btn"] button').click();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
static getResetButton() {
|
|
123
|
+
return cy.get('[data-test="graph-navigator-settings-reset-btn"] button');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
static clickReset() {
|
|
127
|
+
GraphNavigatorSteps.getResetButton().click();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static getConfirmDialog() {
|
|
131
|
+
return cy.get('.modal-dialog');
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static confirmDialog() {
|
|
135
|
+
GraphNavigatorSteps.getConfirmDialog().find('.confirm-btn').click();
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static cancelDialog() {
|
|
139
|
+
GraphNavigatorSteps.getConfirmDialog().find('.cancel-btn').click();
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
static verifyFileDownloaded(fileName) {
|
|
143
|
+
cy.readFile('cypress/downloads/' + fileName);
|
|
144
|
+
}
|
|
145
|
+
}
|
package/steps/header-steps.js
CHANGED
|
@@ -3,12 +3,16 @@ export class HeaderSteps {
|
|
|
3
3
|
return cy.get('onto-header');
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
static getUserMenu() {
|
|
7
|
+
return HeaderSteps.getHeader().find('onto-user-menu');
|
|
8
|
+
}
|
|
9
|
+
|
|
6
10
|
static openHomePage() {
|
|
7
11
|
HeaderSteps.getHeader().find('.home-page').click();
|
|
8
12
|
}
|
|
9
13
|
|
|
10
14
|
static logout() {
|
|
11
|
-
|
|
15
|
+
HeaderSteps.getUserMenu().click();
|
|
12
16
|
cy.get('.onto-user-menu-dropdown')
|
|
13
17
|
.contains('Logout')
|
|
14
18
|
.first()
|
package/steps/home-steps.js
CHANGED
|
@@ -5,6 +5,7 @@ import {SavedSparqlQueriesWidgetSteps} from './widgets/saved-sparql-queries-widg
|
|
|
5
5
|
import {RepositorySteps} from './repository-steps';
|
|
6
6
|
import {BaseSteps} from './base-steps';
|
|
7
7
|
import {EnvironmentStubs} from '../stubs/environment-stubs';
|
|
8
|
+
import {LayoutSteps} from './layout-steps';
|
|
8
9
|
|
|
9
10
|
class HomeSteps extends BaseSteps {
|
|
10
11
|
|
|
@@ -38,10 +39,6 @@ class HomeSteps extends BaseSteps {
|
|
|
38
39
|
cy.visit(`/?repositoryId=${repositoryId}`);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
static getLayout() {
|
|
42
|
-
return cy.get('.wb-layout');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
42
|
static getView() {
|
|
46
43
|
return cy.get('#wb-home');
|
|
47
44
|
}
|
|
@@ -59,11 +56,11 @@ class HomeSteps extends BaseSteps {
|
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
static getNavigationMenu() {
|
|
62
|
-
return
|
|
59
|
+
return LayoutSteps.getLayout().find('.wb-navbar');
|
|
63
60
|
}
|
|
64
61
|
|
|
65
62
|
static getPageHeader() {
|
|
66
|
-
return
|
|
63
|
+
return LayoutSteps.getLayout().find('.wb-header');
|
|
67
64
|
}
|
|
68
65
|
|
|
69
66
|
// ===========================
|
|
@@ -10,6 +10,14 @@ export class ImportServerFilesSteps extends ImportSteps {
|
|
|
10
10
|
return this.getView().find('.server-files-import-help');
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
static interceptServerFilesImport(repositoryId) {
|
|
14
|
+
cy.intercept('POST', `/rest/repositories/${repositoryId}/import/server`).as('importServerFiles');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static waitForServerFilesImportSettings() {
|
|
18
|
+
return cy.wait('@importServerFiles').its('request.body.importSettings');
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
static getSelectedTypeFilterButton() {
|
|
14
22
|
return this.getResourcesTable().find('.import-resource-type-filter .active');
|
|
15
23
|
}
|
|
@@ -64,6 +64,22 @@ export class ImportSettingsDialogSteps extends ModalDialogSteps {
|
|
|
64
64
|
this.getSettingsForm().find('input[name="preserveBNodeIDs"]').check();
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
static getDisallowDoctypeDeclCheckbox() {
|
|
68
|
+
return this.getSettingsForm().find('input[name="disallowDoctypeDecl"]');
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
static allowDoctypeDeclarations() {
|
|
72
|
+
this.getDisallowDoctypeDeclCheckbox().uncheck();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
static getRestoreDefaultsButton() {
|
|
76
|
+
return this.getDialog().find('.restore-defaults-btn');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
static restoreDefaults() {
|
|
80
|
+
this.getRestoreDefaultsButton().click();
|
|
81
|
+
}
|
|
82
|
+
|
|
67
83
|
static fillContextLink(contextLink) {
|
|
68
84
|
this.getSettingsForm().find('input[name="contextLink"]').type(contextLink).should('have.value', contextLink);
|
|
69
85
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {ModalDialogSteps} from "../modal-dialog-steps";
|
|
2
2
|
|
|
3
|
+
const VIEW_URL = '/import';
|
|
3
4
|
/**
|
|
4
5
|
* Reusable functions for interacting with the import page.
|
|
5
6
|
*/
|
|
@@ -21,11 +22,15 @@ class ImportSteps {
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
static visit() {
|
|
24
|
-
cy.visit(
|
|
25
|
-
cy.url().should('include',
|
|
25
|
+
cy.visit(VIEW_URL);
|
|
26
|
+
cy.url().should('include', VIEW_URL);
|
|
26
27
|
cy.get('#wb-import h1').should('be.visible');
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
static verifyUrl() {
|
|
31
|
+
cy.url().should('include', `${Cypress.config('baseUrl')}${VIEW_URL}`);
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
static getView() {
|
|
30
35
|
return cy.get('#wb-import');
|
|
31
36
|
}
|
|
@@ -84,10 +89,18 @@ class ImportSteps {
|
|
|
84
89
|
return this.getResourcesTable().find('#fileQuery');
|
|
85
90
|
}
|
|
86
91
|
|
|
92
|
+
static getFilterFieldLabel() {
|
|
93
|
+
return this.getResourcesTable().find('label[for="fileQuery"]');
|
|
94
|
+
}
|
|
95
|
+
|
|
87
96
|
static typeInFilterField(query) {
|
|
88
97
|
return this.getFilterField().type(query);
|
|
89
98
|
}
|
|
90
99
|
|
|
100
|
+
static clearFilterField() {
|
|
101
|
+
return this.getFilterField().clear();
|
|
102
|
+
}
|
|
103
|
+
|
|
91
104
|
static getTabs() {
|
|
92
105
|
return this.getView().find('.nav-tabs .nav-item');
|
|
93
106
|
}
|
|
@@ -140,9 +153,13 @@ class ImportSteps {
|
|
|
140
153
|
return this.getImportUserDataHelp().find('.copy-btn').click();
|
|
141
154
|
}
|
|
142
155
|
|
|
156
|
+
static getHelpToggleButton() {
|
|
157
|
+
return this.getView().find('.toggle-help-btn');
|
|
158
|
+
}
|
|
159
|
+
|
|
143
160
|
static toggleHelpMessage() {
|
|
144
161
|
// For some reason the page info box opens unexpectedly and covers the help info icon.
|
|
145
|
-
this.
|
|
162
|
+
this.getHelpToggleButton().click({force: true});
|
|
146
163
|
}
|
|
147
164
|
|
|
148
165
|
static closeHelpMessage() {
|
|
@@ -161,25 +178,57 @@ class ImportSteps {
|
|
|
161
178
|
return this.getSelectedResources().eq(index).closest('.title-row');
|
|
162
179
|
}
|
|
163
180
|
|
|
164
|
-
static
|
|
181
|
+
static getResourceTitleRow(index) {
|
|
165
182
|
return this.getResources().eq(index);
|
|
166
183
|
}
|
|
167
184
|
|
|
185
|
+
static getResourceByIndex(index) {
|
|
186
|
+
return this.getResourcesTable().find(`[data-test="resource-${index}"]`);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
static getResourceNameByIndex(index) {
|
|
190
|
+
return this.getResourceByIndex(index).find('.cell-title').invoke('text');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
static getResourceStatusByIndex(index) {
|
|
194
|
+
return this.getResourceByIndex(index).find('.import-resource-message');
|
|
195
|
+
}
|
|
196
|
+
|
|
168
197
|
static getResourceByName(name) {
|
|
169
198
|
return this.getResources().find('.cell-title').contains(name)
|
|
170
199
|
.closest('.row.title-row');
|
|
171
200
|
}
|
|
172
201
|
|
|
173
202
|
static selectFileByIndex(index) {
|
|
174
|
-
this.
|
|
203
|
+
this.getResourceTitleRow(index).find('.select-checkbox').click();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
static getResourceSelectCheckbox(name) {
|
|
207
|
+
return this.getResourceByName(name).find('.select-checkbox');
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
static getResourceImportButton(name) {
|
|
211
|
+
return this.getResourceByName(name).find('.import-resource-action-import-btn');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
static getResourceRemoveButton(name) {
|
|
215
|
+
return this.getResourceByName(name).find('.import-resource-action-remove-btn');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
static getResourceResetButton(name) {
|
|
219
|
+
return this.getResourceByName(name).find('.import-resource-action-reset-btn');
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
static getResourceContextLink(name) {
|
|
223
|
+
return this.getResourceByName(name).find('.uri-link');
|
|
175
224
|
}
|
|
176
225
|
|
|
177
226
|
static selectFileByName(name) {
|
|
178
|
-
this.
|
|
227
|
+
this.getResourceSelectCheckbox(name).click();
|
|
179
228
|
}
|
|
180
229
|
|
|
181
230
|
static deselectFileByName(name) {
|
|
182
|
-
this.
|
|
231
|
+
this.getResourceSelectCheckbox(name).click();
|
|
183
232
|
}
|
|
184
233
|
|
|
185
234
|
static getResourceStatus(name) {
|
|
@@ -194,8 +243,16 @@ class ImportSteps {
|
|
|
194
243
|
return this.getResources().find('.import-resource-message');
|
|
195
244
|
}
|
|
196
245
|
|
|
197
|
-
static
|
|
246
|
+
static checkImportedResourceByIndex(index, resourceName, expectedStatus) {
|
|
198
247
|
const status = expectedStatus || 'Imported successfully';
|
|
248
|
+
|
|
249
|
+
this.getResourceNameByIndex(index).should('contain', resourceName);
|
|
250
|
+
this.getResourceStatusByIndex(index).should('contain', status);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
static checkImportedResourceByName(resourceName, expectedStatus) {
|
|
254
|
+
const status = expectedStatus || 'Imported successfully';
|
|
255
|
+
|
|
199
256
|
this.getResourceByName(resourceName).should('contain', resourceName);
|
|
200
257
|
this.getResourceStatus(resourceName).should('contain', status);
|
|
201
258
|
}
|
|
@@ -213,8 +270,21 @@ class ImportSteps {
|
|
|
213
270
|
return this.getResourcesTable().find('.import-resource-status-dropdown');
|
|
214
271
|
}
|
|
215
272
|
|
|
273
|
+
static getStatusSelectMenuToggle() {
|
|
274
|
+
return this.getStatusSelectMenu().find('.dropdown-toggle');
|
|
275
|
+
}
|
|
276
|
+
|
|
216
277
|
static openStatusSelectMenu() {
|
|
217
|
-
|
|
278
|
+
this.getStatusSelectMenuToggle().click();
|
|
279
|
+
return this.getStatusSelectMenu().find('.dropdown-menu .dropdown-item');
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
static getSelectAllCheckbox() {
|
|
283
|
+
return this.getStatusSelectMenu().find('.select-all-checkbox');
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
static toggleSelectAllResources() {
|
|
287
|
+
this.getSelectAllCheckbox().click();
|
|
218
288
|
}
|
|
219
289
|
|
|
220
290
|
static selectAllResources() {
|
|
@@ -263,23 +333,23 @@ class ImportSteps {
|
|
|
263
333
|
}
|
|
264
334
|
|
|
265
335
|
static deleteUploadedFile(index) {
|
|
266
|
-
this.
|
|
336
|
+
this.getResourceTitleRow(index).find('.import-resource-action-remove-btn').invoke('show').trigger('click');
|
|
267
337
|
}
|
|
268
338
|
|
|
269
339
|
static importFile(index) {
|
|
270
|
-
this.
|
|
340
|
+
this.getResourceTitleRow(index).find('.import-resource-action-import-btn').invoke('show').trigger('click');
|
|
271
341
|
}
|
|
272
342
|
|
|
273
343
|
static importResourceByName(name) {
|
|
274
|
-
this.
|
|
344
|
+
this.getResourceImportButton(name).click();
|
|
275
345
|
}
|
|
276
346
|
|
|
277
347
|
static resetFileStatus(index) {
|
|
278
|
-
this.
|
|
348
|
+
this.getResourceTitleRow(index).find('.import-resource-action-reset-btn').click();
|
|
279
349
|
}
|
|
280
350
|
|
|
281
351
|
static resetResourceStatusByName(name) {
|
|
282
|
-
this.
|
|
352
|
+
this.getResourceResetButton(name).click();
|
|
283
353
|
}
|
|
284
354
|
|
|
285
355
|
static getServerFilesTable() {
|
|
@@ -287,12 +357,13 @@ class ImportSteps {
|
|
|
287
357
|
}
|
|
288
358
|
|
|
289
359
|
static openFileUploadDialog() {
|
|
290
|
-
this.getUploadRdfFilesButton().
|
|
360
|
+
this.getUploadRdfFilesButton().click();
|
|
291
361
|
}
|
|
292
362
|
|
|
293
363
|
static selectFile(files) {
|
|
294
364
|
cy.wait(1000)
|
|
295
|
-
|
|
365
|
+
// The file input is created by ng-file-upload and appended to the body.
|
|
366
|
+
cy.get('#ngf-wb-import-uploadFile').selectFile(files, { force: true });
|
|
296
367
|
}
|
|
297
368
|
|
|
298
369
|
static uploadFile(filePath) {
|
|
@@ -465,7 +536,7 @@ class ImportSteps {
|
|
|
465
536
|
}
|
|
466
537
|
|
|
467
538
|
static orderBySize() {
|
|
468
|
-
ImportSteps.getSizeCell().click();
|
|
539
|
+
ImportSteps.getSizeCell().find('button').click();
|
|
469
540
|
}
|
|
470
541
|
}
|
|
471
542
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SERVER_FILES_COUNT =
|
|
1
|
+
export const SERVER_FILES_COUNT = 17;
|
|
@@ -15,9 +15,9 @@ export class ImportUserDataSteps extends ImportSteps {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
static openImportTextSnippetDialog() {
|
|
18
|
-
cy.get('#import-user .import-rdf-snippet-btn').click()
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
cy.get('#import-user .import-rdf-snippet-btn').click();
|
|
19
|
+
// Forces the popover to disappear as it covers the modal and Cypress refuses to continue
|
|
20
|
+
cy.get('#import-user .import-rdf-snippet-btn').trigger('mouseleave', {force: true});
|
|
21
21
|
this.getModal().find('#wb-import-textarea').should('be.visible');
|
|
22
22
|
return this;
|
|
23
23
|
}
|
|
@@ -34,7 +34,8 @@ export class ImportUserDataSteps extends ImportSteps {
|
|
|
34
34
|
static selectRDFFormat(rdfFormat) {
|
|
35
35
|
cy.get('.modal-footer .import-format-dropdown').within(() => {
|
|
36
36
|
cy.get('.import-format-dropdown-btn').click();
|
|
37
|
-
cy.get('.dropdown-item').contains(rdfFormat).click()
|
|
37
|
+
cy.get('.dropdown-item').contains(rdfFormat).click();
|
|
38
|
+
cy.get('.dropdown-item').contains(rdfFormat).should('not.be.visible');
|
|
38
39
|
});
|
|
39
40
|
return this;
|
|
40
41
|
}
|
|
@@ -48,6 +49,24 @@ export class ImportUserDataSteps extends ImportSteps {
|
|
|
48
49
|
cy.intercept('POST', `/rest/repositories/${repositoryId}/import/upload/url`).as('postJsonldUrl');
|
|
49
50
|
}
|
|
50
51
|
|
|
52
|
+
static openTextSnippetImportSettings(snippet, rdfFormat) {
|
|
53
|
+
this.openImportTextSnippetDialog();
|
|
54
|
+
this.pasteRDFTextSnippet(snippet);
|
|
55
|
+
if (rdfFormat) {
|
|
56
|
+
this.selectRDFFormat(rdfFormat);
|
|
57
|
+
}
|
|
58
|
+
this.clickImportTextSnippetButton();
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
static interceptTextSnippetImport(repositoryId) {
|
|
63
|
+
cy.intercept('POST', `/rest/repositories/${repositoryId}/import/upload/text`).as('importTextSnippet');
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
static waitForTextSnippetImportSettings() {
|
|
67
|
+
return cy.wait('@importTextSnippet').its('request.body');
|
|
68
|
+
}
|
|
69
|
+
|
|
51
70
|
static getErrors() {
|
|
52
71
|
return cy.get('.text-danger');
|
|
53
72
|
}
|
|
@@ -64,30 +83,11 @@ export class ImportUserDataSteps extends ImportSteps {
|
|
|
64
83
|
return this.getModal().find('#wb-import-textarea');
|
|
65
84
|
}
|
|
66
85
|
|
|
67
|
-
static getImportFromDataRadioButton() {
|
|
68
|
-
return this.getModal().find('#wb-import-from-data');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
static getImportInDefaultGraphRadioButton() {
|
|
72
|
-
return this.getModal().find('#wb-import-in-default-graph');
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
static getExistingDataReplacementCheckbox() {
|
|
76
|
-
return this.getModal().find('#wb-import-existing-data-replacement');
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
static getReplacedGraphsInputField() {
|
|
80
|
-
return this.getModal().find('#wb-import-replaced-graphs');
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
static getAddGraphToReplaceButton() {
|
|
84
|
-
return this.getModal().find('#wb-import-add-graph-to-replace');
|
|
85
|
-
}
|
|
86
|
-
|
|
87
86
|
//verifies that the data has been inserted in the given graph and that the new data has replaced the old one.
|
|
88
87
|
static verifyGraphData(graphName, s, p, o, c, checkForReplacedData, oldData) {
|
|
89
88
|
cy.visit('/graphs');
|
|
90
89
|
// wait a bit to give chance page loaded.
|
|
90
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
91
91
|
cy.wait(1000);
|
|
92
92
|
cy.get(`#export-graphs td a:contains(${graphName})`).click();
|
|
93
93
|
cy.get(`.uri-cell:contains(${s})`).should('be.visible');
|
|
@@ -7,6 +7,10 @@ export class LanguageSelectorSteps {
|
|
|
7
7
|
LanguageSelectorSteps.getLanguageSelectorDropdown().should('be.visible').click();
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
static getLanguageSelectorDropdownButton() {
|
|
11
|
+
return LanguageSelectorSteps.getLanguageSelectorDropdown().getByTestId('onto-dropdown-button');
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
static changeLanguage(language) {
|
|
11
15
|
LanguageSelectorSteps.openLanguageSelectorDropdown();
|
|
12
16
|
this.getLanguageSelectorDropdown().find(`button.${language}`).click();
|