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
|
@@ -21,25 +21,6 @@ describe('Import user data: Text snippet', () => {
|
|
|
21
21
|
'ab:richard ab:email "richard49@hotmail.com".\n' +
|
|
22
22
|
'ab:richard ab:email "richard491@hotmail.com".';
|
|
23
23
|
|
|
24
|
-
const TURTLESTAR_SNIPPET = '@prefix ex:<http:/base.org/> .\n' +
|
|
25
|
-
'ex:foo ex:pred ex:obj .\n' +
|
|
26
|
-
'<<ex:foo rdfs:label "label">> ex:author "guest" .\n' +
|
|
27
|
-
'ex:obj ex:quote <<ex:meta ex:data ex:foo>> .\n' +
|
|
28
|
-
'<<<<ex:foo rdfs:label "label">> ex:data ex:foo>> ex:recursive true .';
|
|
29
|
-
|
|
30
|
-
const TRIGSTAR_SNIPPET = '@prefix ex: <http://example.com/> .\n' +
|
|
31
|
-
'@prefix dct: <http://purl.org/dc/terms/> .\n' +
|
|
32
|
-
'@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n' +
|
|
33
|
-
'@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n' +
|
|
34
|
-
'graph ex:rdfstar {\n' +
|
|
35
|
-
' ex:bob foaf:knows << ex:alice foaf:knows<<ex:bob dct:created ex:book>> >> .\n' +
|
|
36
|
-
' <<<< ex:bob dct:created ex:book >> foaf:knows ex:alice >> dct:source ex:otherbook .\n' +
|
|
37
|
-
' ex:bobshomepage dct:source<< ex:book dct:creator ex:alice >> .\n' +
|
|
38
|
-
' << ex:book dct:creator ex:alice >> dct:source ex:bobshomepage .\n' +
|
|
39
|
-
' << ex:book dct:creator ex:alice >> dct:requires << ex:alice dct:created ex:book >> .\n' +
|
|
40
|
-
' <<<http://example.org/a>ex:b ex:c>>ex:valid "1999-08-16"^^xsd:date .\n' +
|
|
41
|
-
'}';
|
|
42
|
-
|
|
43
24
|
const JSONLD_TEXT_SNIPPET = '[\n' +
|
|
44
25
|
' {\n' +
|
|
45
26
|
' "@id": "http://www.w3.org/1999/02/22-rdf-syntax-ns#Property",\n' +
|
|
@@ -55,8 +36,6 @@ describe('Import user data: Text snippet', () => {
|
|
|
55
36
|
const CONTEXT = 'http://example.org/graph';
|
|
56
37
|
const TEXT_SNIPPET = 'Text snippet';
|
|
57
38
|
const JSONLD_FORMAT = 'JSON-LD';
|
|
58
|
-
const VALID_SNIPPET_TURTLESTAR_FORMAT = 'Turtle*';
|
|
59
|
-
const VALID_SNIPPET_TRIGSTAR_FORMAT = 'TriG*';
|
|
60
39
|
const VALID_SNIPPET_RDF_FORMAT = 'Turtle';
|
|
61
40
|
const RDF_ERROR_MESSAGE = 'RDF Parse Error:';
|
|
62
41
|
|
|
@@ -75,7 +54,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
75
54
|
ImportUserDataSteps.fillRDFTextSnippet(RDF_TEXT_SNIPPET_1);
|
|
76
55
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
77
56
|
ImportSettingsDialogSteps.import();
|
|
78
|
-
ImportUserDataSteps.
|
|
57
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
79
58
|
});
|
|
80
59
|
|
|
81
60
|
it('Should import RDF text snippet with invalid RDF format selected', () => {
|
|
@@ -84,7 +63,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
84
63
|
ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
|
|
85
64
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
86
65
|
ImportSettingsDialogSteps.import();
|
|
87
|
-
ImportUserDataSteps.
|
|
66
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET, RDF_ERROR_MESSAGE);
|
|
88
67
|
});
|
|
89
68
|
|
|
90
69
|
it('Should import RDF text snippet successfully with valid RDF format selected', () => {
|
|
@@ -93,25 +72,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
93
72
|
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_RDF_FORMAT);
|
|
94
73
|
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
95
74
|
ImportSettingsDialogSteps.import();
|
|
96
|
-
ImportUserDataSteps.
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
it('Should import Turtle* text snippet successfully with valid RDF star format selected', () => {
|
|
100
|
-
ImportUserDataSteps.openImportTextSnippetDialog();
|
|
101
|
-
ImportUserDataSteps.fillRDFTextSnippet(TURTLESTAR_SNIPPET);
|
|
102
|
-
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_TURTLESTAR_FORMAT);
|
|
103
|
-
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
104
|
-
ImportSettingsDialogSteps.import();
|
|
105
|
-
ImportUserDataSteps.checkImportedResource(0, TEXT_SNIPPET);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it('Should import TriG* text snippet successfully with valid RDF star format selected', () => {
|
|
109
|
-
ImportUserDataSteps.openImportTextSnippetDialog();
|
|
110
|
-
ImportUserDataSteps.fillRDFTextSnippet(TRIGSTAR_SNIPPET);
|
|
111
|
-
ImportUserDataSteps.selectRDFFormat(VALID_SNIPPET_TRIGSTAR_FORMAT);
|
|
112
|
-
ImportUserDataSteps.clickImportTextSnippetButton();
|
|
113
|
-
ImportSettingsDialogSteps.import();
|
|
114
|
-
ImportUserDataSteps.checkImportedResource(0, TEXT_SNIPPET);
|
|
75
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
115
76
|
});
|
|
116
77
|
|
|
117
78
|
it('Should import RDF text snippet successfully with filled base URI and context', () => {
|
|
@@ -123,7 +84,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
123
84
|
ImportSettingsDialogSteps.selectNamedGraph();
|
|
124
85
|
ImportSettingsDialogSteps.fillNamedGraph(CONTEXT);
|
|
125
86
|
ImportSettingsDialogSteps.import();
|
|
126
|
-
ImportUserDataSteps.
|
|
87
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
127
88
|
|
|
128
89
|
// Go to Graphs overview
|
|
129
90
|
cy.visit('/graphs');
|
|
@@ -211,7 +172,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
211
172
|
ImportSettingsDialogSteps.selectNamedGraph();
|
|
212
173
|
ImportSettingsDialogSteps.fillNamedGraph(CONTEXT);
|
|
213
174
|
ImportSettingsDialogSteps.import();
|
|
214
|
-
ImportUserDataSteps.
|
|
175
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
215
176
|
|
|
216
177
|
// Go to Graphs overview
|
|
217
178
|
cy.visit('/graphs');
|
|
@@ -235,7 +196,7 @@ describe('Import user data: Text snippet', () => {
|
|
|
235
196
|
ImportSettingsDialogSteps.fillContextLink('https://w3c.github.io/json-ld-api/tests/compact/0007-context.jsonld');
|
|
236
197
|
// ImportUserDataSteps.importFromSettingsDialog();
|
|
237
198
|
ImportSettingsDialogSteps.import();
|
|
238
|
-
ImportUserDataSteps.
|
|
199
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, TEXT_SNIPPET);
|
|
239
200
|
const graphName = CONTEXT.slice(0, CONTEXT.lastIndexOf('.'));
|
|
240
201
|
// Verify that created graph can be found
|
|
241
202
|
ImportUserDataSteps.verifyGraphData(graphName, "rdf:Property", "rdf:Property", "rdf:Property", "http://example.org/graph", false);
|
|
@@ -9,7 +9,6 @@ describe('Import user data: URL import', () => {
|
|
|
9
9
|
const JSONLD_FORMAT = 'JSON-LD';
|
|
10
10
|
const VALID_URL_RDF_FORMAT = 'RDF/XML';
|
|
11
11
|
const RDF_ERROR_MESSAGE = 'RDF Parse Error:';
|
|
12
|
-
const IMPORT_JSONLD_URL = 'https://example.com/0007-context.jsonld';
|
|
13
12
|
|
|
14
13
|
beforeEach(() => {
|
|
15
14
|
repositoryId = 'user-import-' + Date.now();
|
|
@@ -57,9 +56,11 @@ describe('Import user data: URL import', () => {
|
|
|
57
56
|
it('Test import file via URL successfully with Auto format selected', () => {
|
|
58
57
|
ImportUserDataSteps.openImportURLDialog(IMPORT_URL);
|
|
59
58
|
ImportUserDataSteps.clickImportUrlButton();
|
|
60
|
-
//
|
|
59
|
+
// wine.rdf contains a DOCTYPE declaration, which is disallowed by default
|
|
60
|
+
ImportSettingsDialogSteps.expandAdvancedSettings();
|
|
61
|
+
ImportSettingsDialogSteps.allowDoctypeDeclarations();
|
|
61
62
|
ImportSettingsDialogSteps.import();
|
|
62
|
-
ImportUserDataSteps.
|
|
63
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL);
|
|
63
64
|
});
|
|
64
65
|
|
|
65
66
|
it('Test import file via URL with invalid RDF format selected', () => {
|
|
@@ -67,14 +68,17 @@ describe('Import user data: URL import', () => {
|
|
|
67
68
|
ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
|
|
68
69
|
ImportUserDataSteps.clickImportUrlButton();
|
|
69
70
|
ImportSettingsDialogSteps.import();
|
|
70
|
-
ImportUserDataSteps.
|
|
71
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL, RDF_ERROR_MESSAGE);
|
|
71
72
|
});
|
|
72
73
|
|
|
73
74
|
it('Test import file via URL successfully with valid RDF format selected', () => {
|
|
74
75
|
ImportUserDataSteps.openImportURLDialog(IMPORT_URL);
|
|
75
76
|
ImportUserDataSteps.selectRDFFormat(VALID_URL_RDF_FORMAT);
|
|
76
77
|
ImportUserDataSteps.clickImportUrlButton();
|
|
78
|
+
// wine.rdf contains a DOCTYPE declaration, which is disallowed by default
|
|
79
|
+
ImportSettingsDialogSteps.expandAdvancedSettings();
|
|
80
|
+
ImportSettingsDialogSteps.allowDoctypeDeclarations();
|
|
77
81
|
ImportSettingsDialogSteps.import();
|
|
78
|
-
ImportUserDataSteps.
|
|
82
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, IMPORT_URL);
|
|
79
83
|
});
|
|
80
84
|
});
|
|
@@ -46,7 +46,7 @@ describe('Import view', () => {
|
|
|
46
46
|
// Then I should see the uploaded file
|
|
47
47
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
48
48
|
ImportUserDataSteps.getResourceByName('bnodes.ttl').should('be.visible');
|
|
49
|
-
ImportUserDataSteps.
|
|
49
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
it('Should display/hide help message depends on resource result', () => {
|
|
@@ -108,7 +108,7 @@ describe('Import view', () => {
|
|
|
108
108
|
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
109
109
|
ImportSettingsDialogSteps.import();
|
|
110
110
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
111
|
-
ImportUserDataSteps.
|
|
111
|
+
ImportUserDataSteps.checkImportedResourceByIndex(0, 'bnodes.ttl');
|
|
112
112
|
|
|
113
113
|
// Then I expect the help message not exist, because user because there are resource displayed
|
|
114
114
|
ImportUserDataSteps.getHelpMessage().should('not.exist');
|
|
@@ -63,7 +63,7 @@ describe('Operations Status Component', () => {
|
|
|
63
63
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
it('should
|
|
66
|
+
it('should link the queries operation element to its view in a new window', () => {
|
|
67
67
|
// When I visit some page and there are running operations.
|
|
68
68
|
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
69
69
|
HomeSteps.visitAndWaitLoader();
|
|
@@ -71,14 +71,13 @@ describe('Operations Status Component', () => {
|
|
|
71
71
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
72
72
|
|
|
73
73
|
OperationsStatusesComponentSteps.openOperationStatusesDialog();
|
|
74
|
-
//
|
|
75
|
-
// Then I expect to be redirected to "Query and Update monitoring" view.
|
|
74
|
+
// Then I expect "Running query" operation element to link to "Query and Update monitoring" view in a new window.
|
|
76
75
|
checkOperationElementUrl('monitor/queries', 3);
|
|
77
76
|
// Then I expect "Global Operations Component" to still be displayed.
|
|
78
77
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
79
78
|
});
|
|
80
79
|
|
|
81
|
-
it('should
|
|
80
|
+
it('should link the updates operation element to its view in a new window', () => {
|
|
82
81
|
// When I visit some page and there are running operations.
|
|
83
82
|
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
84
83
|
HomeSteps.visitAndWaitLoader();
|
|
@@ -86,14 +85,13 @@ describe('Operations Status Component', () => {
|
|
|
86
85
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
87
86
|
|
|
88
87
|
OperationsStatusesComponentSteps.openOperationStatusesDialog();
|
|
89
|
-
//
|
|
90
|
-
// Then I expect to be redirected to "Query and Update monitoring" view.
|
|
88
|
+
// Then I expect "Running updates" operation element to link to "Query and Update monitoring" view in a new window.
|
|
91
89
|
checkOperationElementUrl('monitor/queries', 4);
|
|
92
90
|
// Then I expect "Global Operations Component" to still be displayed.
|
|
93
91
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
94
92
|
});
|
|
95
93
|
|
|
96
|
-
it('should
|
|
94
|
+
it('should link the imports operation element to its view in a new window', () => {
|
|
97
95
|
// When I visit some page and there are running operations.
|
|
98
96
|
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
99
97
|
HomeSteps.visitAndWaitLoader();
|
|
@@ -101,14 +99,13 @@ describe('Operations Status Component', () => {
|
|
|
101
99
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
102
100
|
|
|
103
101
|
OperationsStatusesComponentSteps.openOperationStatusesDialog();
|
|
104
|
-
//
|
|
105
|
-
// Then I expect to be redirected to "Query and Update monitoring" view.
|
|
102
|
+
// Then I expect "Running imports" operation element to link to "Import" view in a new window.
|
|
106
103
|
checkOperationElementUrl('import', 2);
|
|
107
104
|
// Then I expect "Global Operations Component" to still be displayed.
|
|
108
105
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
109
106
|
});
|
|
110
107
|
|
|
111
|
-
it('should
|
|
108
|
+
it('should link the backup and restore operation element to its view in a new window', () => {
|
|
112
109
|
// When I visit some page and there are running operations.
|
|
113
110
|
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
114
111
|
HomeSteps.visitAndWaitLoader();
|
|
@@ -116,15 +113,14 @@ describe('Operations Status Component', () => {
|
|
|
116
113
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
117
114
|
|
|
118
115
|
OperationsStatusesComponentSteps.openOperationStatusesDialog();
|
|
119
|
-
//
|
|
120
|
-
// Then I expect to be redirected to "Backup and Restore" view.
|
|
116
|
+
// Then I expect "Creating backup" operation element to link to "Backup and Restore" view in a new window.
|
|
121
117
|
checkOperationElementUrl('monitor/backup-and-restore', 1);
|
|
122
118
|
// Then I expect "Global Operations Component" to still be displayed.
|
|
123
119
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
124
120
|
|
|
125
121
|
});
|
|
126
122
|
|
|
127
|
-
it('should
|
|
123
|
+
it('should link the cluster operation element to its view in a new window', () => {
|
|
128
124
|
// When I visit some page and there are running operations.
|
|
129
125
|
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
130
126
|
HomeSteps.visitAndWaitLoader();
|
|
@@ -132,8 +128,7 @@ describe('Operations Status Component', () => {
|
|
|
132
128
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
133
129
|
|
|
134
130
|
OperationsStatusesComponentSteps.openOperationStatusesDialog();
|
|
135
|
-
//
|
|
136
|
-
// Then I expect to be redirected to "Cluster Monitoring" view.
|
|
131
|
+
// Then I expect "Unavailable nodes" operation element to link to "Cluster Monitoring" view in a new window.
|
|
137
132
|
checkOperationElementUrl('cluster', 0);
|
|
138
133
|
// Then I expect "Global Operations Component" to still be displayed.
|
|
139
134
|
OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
|
|
@@ -141,8 +136,9 @@ describe('Operations Status Component', () => {
|
|
|
141
136
|
});
|
|
142
137
|
|
|
143
138
|
function checkOperationElementUrl(expectedUrl, operationIndex = 0) {
|
|
144
|
-
BrowserStubs.
|
|
139
|
+
BrowserStubs.captureLinkClicks();
|
|
145
140
|
OperationsStatusesComponentSteps.getOperationStatuses().eq(operationIndex).click();
|
|
146
|
-
|
|
141
|
+
// The page must leave the click to the browser, which opens the link in a new window.
|
|
142
|
+
cy.get(BrowserStubs.LINK_CLICKS_ALIAS()).should('deep.equal', [{href: expectedUrl, target: '_blank', defaultPrevented: false}]);
|
|
147
143
|
}
|
|
148
144
|
});
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import {SparqlEditorSteps} from "../../steps/sparql-editor-steps";
|
|
2
|
+
import {YasguiSteps} from "../../steps/yasgui/yasgui-steps";
|
|
3
|
+
import {YasqeSteps} from "../../steps/yasgui/yasqe-steps";
|
|
4
|
+
import {YasrSteps} from "../../steps/yasgui/yasr-steps";
|
|
5
|
+
import {QueryStubs} from "../../stubs/yasgui/query-stubs";
|
|
6
|
+
import {GraphsOverviewSteps} from "../../steps/explore/graphs-overview-steps";
|
|
7
|
+
import {JsonLdModalSteps} from "../../steps/json-ld-modal-steps";
|
|
8
|
+
|
|
9
|
+
// The workbench requests RDF 1.2 by adding the "version" media type parameter to the Accept header.
|
|
10
|
+
// The parameter must be present on every RDF media range and must precede the weight ("q"),
|
|
11
|
+
// because anything after the weight is not a media type parameter.
|
|
12
|
+
const SELECT_QUERY_ACCEPT = 'application/x-sparqlstar-results+json;version=1.2, application/sparql-results+json;version=1.2;q=0.9, */*;version=1.2;q=0.8';
|
|
13
|
+
const CONSTRUCT_QUERY_ACCEPT = 'application/x-graphdb-table-results+json;version=1.2, application/rdf+json;version=1.2;q=0.9, */*;version=1.2;q=0.8';
|
|
14
|
+
const JSONLD_EXPANDED_ACCEPT = 'application/ld+json;profile=http://www.w3.org/ns/json-ld#expanded;version=1.2';
|
|
15
|
+
|
|
16
|
+
describe('RDF version in the Accept header', () => {
|
|
17
|
+
let repositoryId;
|
|
18
|
+
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
cy.deleteRepository(repositoryId);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
describe('SPARQL editor', () => {
|
|
24
|
+
beforeEach(() => {
|
|
25
|
+
repositoryId = 'rdf-version-sparql-' + Date.now();
|
|
26
|
+
QueryStubs.stubQueryCountResponse();
|
|
27
|
+
cy.createRepository({id: repositoryId});
|
|
28
|
+
cy.presetRepository(repositoryId);
|
|
29
|
+
QueryStubs.stubDefaultQueryResponse(repositoryId);
|
|
30
|
+
|
|
31
|
+
SparqlEditorSteps.visitSparqlEditorPage();
|
|
32
|
+
YasguiSteps.getYasgui().should('be.visible');
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
it('should request RDF 1.2 when executing a SELECT query', () => {
|
|
36
|
+
// Given I am about to execute the default SELECT query
|
|
37
|
+
cy.intercept('POST', `/repositories/${repositoryId}`).as('query');
|
|
38
|
+
|
|
39
|
+
// When I execute it
|
|
40
|
+
YasqeSteps.executeQuery();
|
|
41
|
+
|
|
42
|
+
// Then every media range of the Accept header should request RDF 1.2
|
|
43
|
+
verifyAcceptHeader('@query', SELECT_QUERY_ACCEPT);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('should request RDF 1.2 when executing a CONSTRUCT query', () => {
|
|
47
|
+
// Given I am about to execute a CONSTRUCT query
|
|
48
|
+
cy.intercept('POST', `/repositories/${repositoryId}`).as('query');
|
|
49
|
+
|
|
50
|
+
// When I execute it
|
|
51
|
+
pasteAndExecuteConstructQuery();
|
|
52
|
+
|
|
53
|
+
// Then every media range of the Accept header should request RDF 1.2
|
|
54
|
+
verifyAcceptHeader('@query', CONSTRUCT_QUERY_ACCEPT);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('should request RDF 1.2 when downloading SELECT results', () => {
|
|
58
|
+
// Given I have executed a SELECT query
|
|
59
|
+
YasqeSteps.executeQuery();
|
|
60
|
+
cy.intercept('POST', `/repositories/${repositoryId}`).as('download');
|
|
61
|
+
|
|
62
|
+
// When I download the results as XML
|
|
63
|
+
YasrSteps.openDownloadAsDropdown();
|
|
64
|
+
YasrSteps.selectDownloadAsOption(1);
|
|
65
|
+
|
|
66
|
+
// Then the download request should ask for RDF 1.2
|
|
67
|
+
verifyAcceptHeader('@download', 'application/sparql-results+xml;version=1.2');
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('should request RDF 1.2 when downloading CONSTRUCT results as JSON-LD', () => {
|
|
71
|
+
// Given I have executed a CONSTRUCT query
|
|
72
|
+
pasteAndExecuteConstructQuery();
|
|
73
|
+
cy.intercept('POST', `/repositories/${repositoryId}`).as('download');
|
|
74
|
+
|
|
75
|
+
// When I download the results as JSON-LD with the default settings
|
|
76
|
+
YasrSteps.openDownloadAsDropdown();
|
|
77
|
+
YasrSteps.selectDownloadAsOption(1);
|
|
78
|
+
JsonLdModalSteps.clickExportJSONLD();
|
|
79
|
+
|
|
80
|
+
// Then the version should follow the JSON-LD profile
|
|
81
|
+
verifyAcceptHeader('@download', JSONLD_EXPANDED_ACCEPT);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
describe('Graphs overview', () => {
|
|
86
|
+
beforeEach(() => {
|
|
87
|
+
repositoryId = 'rdf-version-graphs-' + Date.now();
|
|
88
|
+
cy.createRepository({id: repositoryId});
|
|
89
|
+
cy.presetRepository(repositoryId);
|
|
90
|
+
cy.importRDFTextSnippet(repositoryId, '<urn:s> <urn:p> <urn:o> .');
|
|
91
|
+
|
|
92
|
+
GraphsOverviewSteps.visit();
|
|
93
|
+
GraphsOverviewSteps.getResults().should('have.length.at.least', 1);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('should request RDF 1.2 when exporting the repository', () => {
|
|
97
|
+
// Given the export opens the download URL in a new window
|
|
98
|
+
cy.window().then((win) => {
|
|
99
|
+
cy.stub(win, 'open').returns({closed: true}).as('windowOpen');
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// When I export the repository as TriG
|
|
103
|
+
GraphsOverviewSteps.exportRepository();
|
|
104
|
+
cy.get('.export-repo-format-TriG').eq(0).click();
|
|
105
|
+
|
|
106
|
+
// Then the Accept parameter of the download URL should request RDF 1.2
|
|
107
|
+
cy.get('@windowOpen').should('have.been.calledOnce')
|
|
108
|
+
.its('firstCall.args.0')
|
|
109
|
+
.should('contain', '&Accept=' + encodeURIComponent('application/x-trig;version=1.2'));
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('should request RDF 1.2 when exporting the repository as JSON-LD', () => {
|
|
113
|
+
// Given I am about to export the repository
|
|
114
|
+
cy.intercept({method: 'GET', pathname: `/repositories/${repositoryId}/statements`}).as('export');
|
|
115
|
+
|
|
116
|
+
// When I export it as JSON-LD with the default settings
|
|
117
|
+
GraphsOverviewSteps.exportRepository();
|
|
118
|
+
GraphsOverviewSteps.selectJSONLDOption();
|
|
119
|
+
JsonLdModalSteps.clickExportJSONLD();
|
|
120
|
+
|
|
121
|
+
// Then the version should follow the JSON-LD profile
|
|
122
|
+
verifyAcceptHeader('@export', JSONLD_EXPANDED_ACCEPT);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('should request RDF 1.2 when downloading all graphs', () => {
|
|
126
|
+
// Given I am about to download all graphs
|
|
127
|
+
cy.intercept({method: 'GET', pathname: `/repositories/${repositoryId}/contexts`}).as('downloadGraphs');
|
|
128
|
+
|
|
129
|
+
// When I download them
|
|
130
|
+
GraphsOverviewSteps.clickOnDownloadAllButton();
|
|
131
|
+
|
|
132
|
+
// Then RDF 1.2 should be requested for every media range except JSON
|
|
133
|
+
verifyAcceptHeader('@downloadGraphs', 'application/json, text/plain;version=1.2, */*;version=1.2');
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
function verifyAcceptHeader(alias, expectedAccept) {
|
|
139
|
+
cy.wait(alias).its('request.headers.accept').should('equal', expectedAccept);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function pasteAndExecuteConstructQuery() {
|
|
143
|
+
YasqeSteps.pasteQuery('CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o }');
|
|
144
|
+
YasqeSteps.executeQuery();
|
|
145
|
+
}
|
|
@@ -122,7 +122,7 @@ describe('Attach remote location', () => {
|
|
|
122
122
|
RepositorySteps.getSparqlOntopicTable().should('not.exist');
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
it('should
|
|
125
|
+
it('should create a remote location with basic auth without an encrypt password flag', () => {
|
|
126
126
|
// Given I have a running GDB instance and I am on the Repositories view
|
|
127
127
|
RepositorySteps.visit();
|
|
128
128
|
// When I start the location creation
|
|
@@ -130,28 +130,20 @@ describe('Attach remote location', () => {
|
|
|
130
130
|
AttachRepositorySteps.enterURL(remoteLocationName);
|
|
131
131
|
// And I select basic auth type
|
|
132
132
|
AttachRepositorySteps.selectBasicRadioBtn();
|
|
133
|
-
// Then I
|
|
134
|
-
AttachRepositorySteps.
|
|
135
|
-
// And I should not see the warning for the backward compatibility issues when encrypting the password
|
|
136
|
-
AttachRepositorySteps.getBackwardCompatibilityWarning().should('not.exist');
|
|
137
|
-
// When I select to encrypt the password
|
|
138
|
-
AttachRepositorySteps.encryptPassword();
|
|
139
|
-
// Then I should see the backward compatibility warning
|
|
140
|
-
AttachRepositorySteps.getBackwardCompatibilityWarning().should('be.visible');
|
|
141
|
-
// And the unencrypted password warning should not be visible
|
|
142
|
-
AttachRepositorySteps.getUnencryptedPasswordWarning().should('not.exist');
|
|
133
|
+
// Then I should not see an option to encrypt the password
|
|
134
|
+
AttachRepositorySteps.getEncryptPasswordCheckbox().should('not.exist');
|
|
143
135
|
// When I fill in username and password
|
|
144
136
|
AttachRepositorySteps.enterUsername('locationadmin');
|
|
145
137
|
AttachRepositorySteps.enterPassword('admin123');
|
|
146
138
|
// And I save the location
|
|
147
139
|
RemoteLocationStubs.spyRemoteLocationCreate();
|
|
148
140
|
AttachRepositorySteps.attachRemoteLocation();
|
|
149
|
-
// Then encrypt password flag should be sent
|
|
141
|
+
// Then the encrypt password flag should not be sent
|
|
150
142
|
cy.wait('@add-remote-location')
|
|
151
143
|
.its('request.body')
|
|
152
|
-
.should(
|
|
153
|
-
|
|
154
|
-
|
|
144
|
+
.should((body) => {
|
|
145
|
+
expect(body).to.include({username: 'locationadmin'});
|
|
146
|
+
expect(body).not.to.have.property('encryptPassword');
|
|
155
147
|
});
|
|
156
148
|
});
|
|
157
149
|
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import HomeSteps from '../../steps/home-steps.js';
|
|
2
|
+
import {RepositorySteps} from '../../steps/repository-steps.js';
|
|
3
|
+
import {RepositorySelectorSteps} from '../../steps/repository-selector-steps.js';
|
|
4
|
+
import {RepositoryPickerListSteps} from '../../steps/repository-picker-list-steps.js';
|
|
5
|
+
import {GraphNavigatorSteps} from '../../steps/graph-navigator-steps.js';
|
|
6
|
+
import {ModalDialogSteps} from '../../steps/modal-dialog-steps.js';
|
|
7
|
+
import ImportSteps from '../../steps/import/import-steps.js';
|
|
8
|
+
import {RepositoryErrorsWidgetSteps} from '../../steps/widgets/repository-errors-widget-steps.js';
|
|
9
|
+
|
|
10
|
+
const DEPRECATION_MESSAGE = 'FedX will be removed in GraphDB 13. Migrate to SPARQL 1.1 federation.';
|
|
11
|
+
const TOOLTIP_DEPRECATION_MESSAGE = 'FedX repositories are deprecated: Will be removed in GraphDB 13. Migrate to SPARQL 1.1 federation.';
|
|
12
|
+
|
|
13
|
+
describe('FedX deprecation', () => {
|
|
14
|
+
let repositoryId;
|
|
15
|
+
let fedxRepositoryId;
|
|
16
|
+
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
repositoryId = 'fedx-deprecation-member-' + Date.now();
|
|
19
|
+
fedxRepositoryId = 'fedx-deprecation-' + Date.now();
|
|
20
|
+
cy.createRepository({id: repositoryId});
|
|
21
|
+
cy.createRepository({
|
|
22
|
+
id: fedxRepositoryId,
|
|
23
|
+
type: 'fedx',
|
|
24
|
+
params: {
|
|
25
|
+
member: {
|
|
26
|
+
name: 'member',
|
|
27
|
+
label: 'FedX repo members',
|
|
28
|
+
value: [{store: 'ResolvableRepository', repositoryName: repositoryId, respectRights: 'true', writable: 'false'}],
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
afterEach(() => {
|
|
35
|
+
cy.deleteRepository(fedxRepositoryId);
|
|
36
|
+
cy.deleteRepository(repositoryId);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('should mark FedX repositories as deprecated in the repositories list', () => {
|
|
40
|
+
// When I open the repositories list
|
|
41
|
+
RepositorySteps.visit();
|
|
42
|
+
|
|
43
|
+
// Then only the FedX repository is marked as deprecated
|
|
44
|
+
RepositorySteps.getRepositoryFedxDeprecatedTag(fedxRepositoryId).should('be.visible').and('have.text', 'Deprecated');
|
|
45
|
+
RepositorySteps.getRepositoryFedxDeprecatedTag(repositoryId).should('not.exist');
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
it('should show the deprecation message in the tooltip of a FedX repository in the repositories list', () => {
|
|
49
|
+
// Given I open the repositories list
|
|
50
|
+
RepositorySteps.visit();
|
|
51
|
+
|
|
52
|
+
// When I hover the FedX repository
|
|
53
|
+
RepositorySteps.hoverRepositoryInList(fedxRepositoryId);
|
|
54
|
+
|
|
55
|
+
// Then its tooltip shows the deprecation message
|
|
56
|
+
RepositorySteps.getRepositoryPopoverDeprecationMessage().should('be.visible').and('contain.text', TOOLTIP_DEPRECATION_MESSAGE);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should mark FedX repositories as deprecated in the repository selector', () => {
|
|
60
|
+
// Given I open the repository selector
|
|
61
|
+
HomeSteps.visit();
|
|
62
|
+
RepositorySelectorSteps.openRepositorySelectors();
|
|
63
|
+
|
|
64
|
+
// Then only the FedX repository is marked as deprecated
|
|
65
|
+
RepositorySelectorSteps.getRepositoryFedxDeprecatedTag(fedxRepositoryId).should('be.visible').and('have.text', 'Deprecated');
|
|
66
|
+
RepositorySelectorSteps.getRepositoryFedxDeprecatedTag(repositoryId).should('not.exist');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('should show the deprecation message in the tooltip of a FedX repository in the repository selector', () => {
|
|
70
|
+
// Given I open the repository selector
|
|
71
|
+
HomeSteps.visit();
|
|
72
|
+
RepositorySelectorSteps.openRepositorySelectors();
|
|
73
|
+
|
|
74
|
+
// When I hover the FedX repository
|
|
75
|
+
RepositorySelectorSteps.hoverRepositoryItem(fedxRepositoryId);
|
|
76
|
+
|
|
77
|
+
// Then its tooltip shows the deprecation message
|
|
78
|
+
RepositorySelectorSteps.getRepositoryTooltipPart('deprecation').should('contain.text', TOOLTIP_DEPRECATION_MESSAGE);
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it('should mark FedX repositories as deprecated in the repository picker', () => {
|
|
82
|
+
// Given no repository is selected, so the view shows the repository picker
|
|
83
|
+
GraphNavigatorSteps.visit();
|
|
84
|
+
|
|
85
|
+
// Then only the FedX repository is marked as deprecated
|
|
86
|
+
RepositoryPickerListSteps.getRepositoryFedxDeprecatedTag(fedxRepositoryId).should('be.visible').and('have.text', 'Deprecated');
|
|
87
|
+
RepositoryPickerListSteps.getRepositoryFedxDeprecatedTag(repositoryId).should('not.exist');
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
it('should show the deprecation message in the information of a FedX repository in the repository picker', () => {
|
|
91
|
+
// Given no repository is selected, so the view shows the repository picker
|
|
92
|
+
GraphNavigatorSteps.visit();
|
|
93
|
+
|
|
94
|
+
// When I move the keyboard focus to the FedX repository
|
|
95
|
+
RepositoryPickerListSteps.focusRepository(fedxRepositoryId);
|
|
96
|
+
|
|
97
|
+
// Then its information shows the deprecation message and a link to the migration documentation
|
|
98
|
+
RepositoryPickerListSteps.getRepositoryInfoPart('deprecation').should('contain.text', TOOLTIP_DEPRECATION_MESSAGE);
|
|
99
|
+
RepositoryPickerListSteps.getRepositoryInfoPart('fedx-migration-link').should('have.text', 'Learn more')
|
|
100
|
+
.and('have.attr', 'href').and('match', /\/sparql-federation\.html$/);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it('should mark FedX repositories as deprecated in the Import repository list', () => {
|
|
104
|
+
// When I open the Import view with no repository selected
|
|
105
|
+
ImportSteps.visit();
|
|
106
|
+
|
|
107
|
+
// Then only the FedX repository is marked as deprecated
|
|
108
|
+
RepositoryErrorsWidgetSteps.getRepositoryFedxDeprecatedTag(fedxRepositoryId).should('be.visible').and('have.text', 'Deprecated');
|
|
109
|
+
RepositoryErrorsWidgetSteps.getRepositoryFedxDeprecatedTag(repositoryId).should('not.exist');
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
it('should mark the FedX repository type as deprecated', () => {
|
|
113
|
+
// When I open the repository type chooser
|
|
114
|
+
RepositorySteps.visit();
|
|
115
|
+
RepositorySteps.createRepository();
|
|
116
|
+
|
|
117
|
+
// Then only the FedX type shows the deprecation message
|
|
118
|
+
RepositorySteps.getRepositoryTypeFedxDeprecationMessage('fedx').should('be.visible').and('have.text', 'Deprecated: Will be removed in GraphDB 13.');
|
|
119
|
+
RepositorySteps.getRepositoryTypeFedxDeprecationMessage('gdb').should('not.exist');
|
|
120
|
+
RepositorySteps.getRepositoryTypeFedxDeprecationMessage('ontop').should('not.exist');
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
it('should stay on the repository type chooser when the FedX creation is cancelled', () => {
|
|
124
|
+
// Given I open the repository type chooser
|
|
125
|
+
RepositorySteps.visit();
|
|
126
|
+
RepositorySteps.createRepository();
|
|
127
|
+
|
|
128
|
+
// When I choose the FedX type
|
|
129
|
+
RepositorySteps.chooseRepositoryType('fedx');
|
|
130
|
+
|
|
131
|
+
// Then a dialog asks me to confirm the creation of a deprecated repository
|
|
132
|
+
ModalDialogSteps.verifyDialogBody(DEPRECATION_MESSAGE);
|
|
133
|
+
ModalDialogSteps.verifyDialogBody('Create a FedX repository anyway?');
|
|
134
|
+
RepositorySteps.getFedxDeprecationDialogMigrationLink().should('have.text', 'Learn more in the GraphDB documentation')
|
|
135
|
+
.and('have.attr', 'href').and('match', /\/sparql-federation\.html$/);
|
|
136
|
+
ModalDialogSteps.getDialogBody().should('not.contain.text', '<br>');
|
|
137
|
+
|
|
138
|
+
// When I cancel
|
|
139
|
+
ModalDialogSteps.clickOnCancelButton();
|
|
140
|
+
|
|
141
|
+
// Then I stay on the repository type chooser
|
|
142
|
+
ModalDialogSteps.getDialog().should('not.exist');
|
|
143
|
+
cy.url().should('match', /\/repository\/create$/);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
it('should show the deprecation warning when a FedX repository is created', () => {
|
|
147
|
+
// Given I open the repository type chooser
|
|
148
|
+
RepositorySteps.visit();
|
|
149
|
+
RepositorySteps.createRepository();
|
|
150
|
+
|
|
151
|
+
// When I choose the FedX type and confirm
|
|
152
|
+
RepositorySteps.chooseRepositoryType('fedx');
|
|
153
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
154
|
+
|
|
155
|
+
// Then the FedX create page shows the deprecation warning with a link to the migration guide
|
|
156
|
+
cy.url().should('include', '/repository/create/fedx');
|
|
157
|
+
RepositorySteps.getFedxDeprecationWarning().should('be.visible').and('contain.text', DEPRECATION_MESSAGE);
|
|
158
|
+
RepositorySteps.getFedxMigrationLink().should('have.attr', 'href').and('match', /\/sparql-federation\.html$/);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('should show the deprecation warning when a FedX repository is edited', () => {
|
|
162
|
+
// When I edit the FedX repository
|
|
163
|
+
RepositorySteps.visitEditPage(fedxRepositoryId);
|
|
164
|
+
|
|
165
|
+
// Then the edit page shows the deprecation warning with a link to the migration guide
|
|
166
|
+
RepositorySteps.getFedxDeprecationWarning().should('be.visible').and('contain.text', DEPRECATION_MESSAGE);
|
|
167
|
+
RepositorySteps.getFedxMigrationLink().should('have.attr', 'href').and('match', /\/sparql-federation\.html$/);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it('should not show the deprecation warning when another repository is edited', () => {
|
|
171
|
+
// When I edit a GraphDB repository
|
|
172
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
173
|
+
|
|
174
|
+
// Then the edit page shows no deprecation warning
|
|
175
|
+
RepositorySteps.getRepositoryPage().should('be.visible');
|
|
176
|
+
RepositorySteps.getFedxDeprecationWarning().should('not.exist');
|
|
177
|
+
});
|
|
178
|
+
});
|