graphdb-workbench-tests 2.8.0 → 2.8.1-RC1
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/cypress.config.js +1 -1
- package/fixtures/locale-en.json +4 -2
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/integration/explore/{similariti-index-create.spec.js → similarity-index/similarity-index-create.spec.js} +3 -3
- package/integration/explore/{similarity-index.spec.js → similarity-index/similarity-index.spec.js} +5 -5
- package/integration/explore/{similarity.spec.js → similarity-index/similarity.spec.js} +7 -8
- package/integration/explore/visual-graph/visual.graph.spec.js +3 -0
- package/integration/repository/repositories.spec.js +39 -0
- package/integration/setup/autocomplete.spec.js +21 -70
- package/integration/setup/{jdbc-create.spec.js → jdbc/jdbc-create.spec.js} +9 -10
- package/integration/setup/{jdbc.spec.js → jdbc/jdbc.spec.js} +56 -25
- package/integration/setup/namespaces.spec.js +132 -264
- package/integration/setup/plugins.spec.js +22 -51
- package/integration/setup/rdf-rank.spec.js +42 -138
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/guides/guide-steps.js +1 -1
- package/steps/repository-steps.js +14 -0
- package/steps/setup/autocomplete-steps.js +59 -0
- package/steps/setup/namespace-steps.js +211 -0
- package/steps/setup/plugins-steps.js +37 -0
- package/steps/setup/rdf-rank-steps.js +106 -0
- package/steps/yasgui/yasqe-steps.js +3 -0
- package/stubs/jdbc/jdbc-stubs.js +19 -0
- package/stubs/license-stubs.js +4 -0
- package/stubs/namespace-stubs.js +5 -0
- package/stubs/setup/plugins-stubs.js +5 -0
- package/steps/autocomplete-steps.js +0 -10
package/cypress.config.js
CHANGED
|
@@ -6,7 +6,7 @@ module.exports = defineConfig({
|
|
|
6
6
|
screenshotsFolder: 'report/screenshots',
|
|
7
7
|
videosFolder: 'report/videos',
|
|
8
8
|
video: true,
|
|
9
|
-
defaultCommandTimeout:
|
|
9
|
+
defaultCommandTimeout: 25000,
|
|
10
10
|
numTestsKeptInMemory: 10,
|
|
11
11
|
e2e: {
|
|
12
12
|
// We've imported your old cypress plugins here.
|
package/fixtures/locale-en.json
CHANGED
|
@@ -325,7 +325,6 @@
|
|
|
325
325
|
}
|
|
326
326
|
},
|
|
327
327
|
"messages": {
|
|
328
|
-
"create_failure": "Failed to create new conversation. Please try again.",
|
|
329
328
|
"rename_failure": "Failed to rename the conversation. Please try again.",
|
|
330
329
|
"delete_failure": "Failed to delete the conversation. Please try again.",
|
|
331
330
|
"export_failure": "Failed to export the conversation. Please try again."
|
|
@@ -1756,6 +1755,7 @@
|
|
|
1756
1755
|
"delete.repo.warning.msg": "<p>Are you sure you want to delete the repository <strong>{{repositoryId}}</strong>?</p><p><span class=\"icon-2x icon-warning\" style=\"color: var(--primary-color-dark)\"></span>All data in the repository will be lost.</p>",
|
|
1757
1756
|
"confirm.restart.repo": "Confirm restart",
|
|
1758
1757
|
"confirm.restart.repo.warning.msg": "<p>Are you sure you want to restart the repository <strong>{{repositoryId}}</strong>?</p><p><span class=\"icon-2x icon-warning\" style=\"color: var(--primary-color-dark)\"></span>The repository will be shut down immediately and all running queries and updates will be cancelled.</p>",
|
|
1758
|
+
"restart.repo.in.cluster.tooltip": "Restarting a repository is not supported in a cluster environment. To apply configuration changes, restart all cluster nodes.",
|
|
1759
1759
|
"location.cannot.be.empty.error": "Location cannot be empty",
|
|
1760
1760
|
"required.field": "This field is required",
|
|
1761
1761
|
"created.repo.success.msg": "The repository {{repoId}} has been created.",
|
|
@@ -2552,6 +2552,7 @@
|
|
|
2552
2552
|
"repo.page.location.label": "Location",
|
|
2553
2553
|
"repo.page.location.input.field.tooltip": "The location where to create repository. The default is the local one.",
|
|
2554
2554
|
"repo.page.repository.info.loading.error": "Currently selected repository cannot be edited due to an error during repository metadata loading.",
|
|
2555
|
+
"guides.loading.message.failure": "Failed to load guides!",
|
|
2555
2556
|
"guide.button.guide-paused": "Guide paused",
|
|
2556
2557
|
"guide.button.guide-resume": "Continue the guide",
|
|
2557
2558
|
"guide.validate.no-next": "Cannot continue to next",
|
|
@@ -2597,7 +2598,8 @@
|
|
|
2597
2598
|
"guide.step_plugin.visual-graph-link-focus.title": "Visual graph links",
|
|
2598
2599
|
"guide.step_plugin.visual-graph-link-focus.content": "An arrow with a label represents one or more links between nodes. In this case, the arrow shows the relation <b>{{fromIriLabel}} → {{iriLabel}} → {{toIriLabel}}</b>.",
|
|
2599
2600
|
"guide.step_plugin.download-guide-resource.title": "Download guide resources",
|
|
2600
|
-
"guide.step_plugin.download-guide-resource.content": "This guide requires a file to be downloaded.<br>Please <a href=\"{{
|
|
2601
|
+
"guide.step_plugin.download-guide-resource.content": "This guide requires a file to be downloaded.<br>Please <a href=\"#\" ng-click=\"downloadGuidesFile('{{resourcePath}}', '{{resourceFile}}')\">download {{resourceFile}}</a>.",
|
|
2602
|
+
"guide.step_plugin.download-guide-resource.download.message.failure": "Failed to download the '{{resourceFile}}' file!",
|
|
2601
2603
|
"guide.step_plugin.choose-repository.content": "Click on the repository selection dropdown.",
|
|
2602
2604
|
"guide.step_plugin.select-repository.content": "Click on the <b>{{getRepositoryId()}}</b> repository button.",
|
|
2603
2605
|
"guide.step_plugin.select-repository-plug.content": "Click on the plug icon of the <b>{{repositoryId}}</b> repository.",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"": [
|
|
3
|
+
{
|
|
4
|
+
"id": "test",
|
|
5
|
+
"title": "",
|
|
6
|
+
"uri": "http://localhost:8080/graphdb/repositories/test",
|
|
7
|
+
"externalUrl": "http://boyantonchev:9000/repositories/test",
|
|
8
|
+
"local": true,
|
|
9
|
+
"type": "graphdb",
|
|
10
|
+
"sesameType": "graphdb:SailRepository",
|
|
11
|
+
"location": "",
|
|
12
|
+
"readable": true,
|
|
13
|
+
"writable": true,
|
|
14
|
+
"unsupported": false,
|
|
15
|
+
"state": "RUNNING"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"http://localhost:7201": [
|
|
19
|
+
{
|
|
20
|
+
"id": "movies",
|
|
21
|
+
"title": "",
|
|
22
|
+
"uri": "http://localhost:7202/repositories/movies",
|
|
23
|
+
"externalUrl": "http://localhost:7202/repositories/movies",
|
|
24
|
+
"local": false,
|
|
25
|
+
"type": "graphdb",
|
|
26
|
+
"sesameType": "graphdb:SailRepository",
|
|
27
|
+
"location": "http://localhost:7202",
|
|
28
|
+
"readable": true,
|
|
29
|
+
"writable": true,
|
|
30
|
+
"unsupported": false,
|
|
31
|
+
"state": "RUNNING"
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {SimilarityIndexCreateSteps} from "
|
|
2
|
-
import {ErrorSteps} from "
|
|
3
|
-
import {YasqeSteps} from "
|
|
1
|
+
import {SimilarityIndexCreateSteps} from "../../../steps/explore/similarity-index-create-steps";
|
|
2
|
+
import {ErrorSteps} from "../../../steps/error-steps";
|
|
3
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
4
4
|
|
|
5
5
|
const FILE_TO_IMPORT = 'people.zip';
|
|
6
6
|
const INSERT_QUERY = 'PREFIX dc: <http://purl.org/dc/elements/1.1/>\n INSERT DATA\n{\nGRAPH <http://example> {\n<http://example/book1> dc:title "A new book" ;\ndc:creator "A.N.Other" .\n}\n}';
|
package/integration/explore/{similarity-index.spec.js → similarity-index/similarity-index.spec.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {SimilarityIndexCreateSteps} from "
|
|
2
|
-
import {RepositorySelectorSteps} from "
|
|
3
|
-
import {YasqeSteps} from "
|
|
4
|
-
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "
|
|
5
|
-
import {SimilarityIndexesSteps} from "
|
|
1
|
+
import {SimilarityIndexCreateSteps} from "../../../steps/explore/similarity-index-create-steps";
|
|
2
|
+
import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
|
|
3
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
4
|
+
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "../../../steps/modal-dialog-steps";
|
|
5
|
+
import {SimilarityIndexesSteps} from "../../../steps/explore/similarity-indexes-steps";
|
|
6
6
|
|
|
7
7
|
const FILE_TO_IMPORT = 'people.zip';
|
|
8
8
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {SparqlEditorSteps} from "
|
|
2
|
-
import {YasqeSteps} from "
|
|
3
|
-
import {YasrSteps} from "
|
|
4
|
-
import {SimilarityIndexCreateSteps} from "
|
|
5
|
-
import {SimilarityIndexesSteps} from "
|
|
6
|
-
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "
|
|
7
|
-
import {
|
|
8
|
-
import {ErrorSteps} from "../../steps/error-steps";
|
|
1
|
+
import {SparqlEditorSteps} from "../../../steps/sparql-editor-steps";
|
|
2
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
3
|
+
import {YasrSteps} from "../../../steps/yasgui/yasr-steps";
|
|
4
|
+
import {SimilarityIndexCreateSteps} from "../../../steps/explore/similarity-index-create-steps";
|
|
5
|
+
import {SimilarityIndexesSteps} from "../../../steps/explore/similarity-indexes-steps";
|
|
6
|
+
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "../../../steps/modal-dialog-steps";
|
|
7
|
+
import {ErrorSteps} from "../../../steps/error-steps";
|
|
9
8
|
|
|
10
9
|
const INDEX_NAME = 'index-' + Date.now();
|
|
11
10
|
const FILE_TO_IMPORT = 'people.zip';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {VisualGraphSteps} from "../../../steps/visual-graph-steps";
|
|
2
2
|
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
3
|
+
import {LicenseStubs} from "../../../stubs/license-stubs";
|
|
3
4
|
|
|
4
5
|
const FILE_TO_IMPORT = 'wine.rdf';
|
|
5
6
|
const VALID_RESOURCE = 'USRegion';
|
|
@@ -14,6 +15,7 @@ describe('Visual graph screen validation', () => {
|
|
|
14
15
|
cy.createRepository({id: repositoryId});
|
|
15
16
|
cy.presetRepository(repositoryId);
|
|
16
17
|
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|
|
18
|
+
LicenseStubs.spyGetLicense();
|
|
17
19
|
});
|
|
18
20
|
|
|
19
21
|
afterEach(() => {
|
|
@@ -53,6 +55,7 @@ describe('Visual graph screen validation', () => {
|
|
|
53
55
|
|
|
54
56
|
it('Test search for a valid resource', () => {
|
|
55
57
|
VisualGraphSteps.visit();
|
|
58
|
+
cy.wait('@get-license');
|
|
56
59
|
VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
|
|
57
60
|
// Verify redirection to existing visual graph
|
|
58
61
|
cy.url().should('match', /USRegion$/);
|
|
@@ -5,6 +5,8 @@ import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-status
|
|
|
5
5
|
import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
|
|
6
6
|
import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
|
|
7
7
|
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
8
|
+
import {ClusterStubs} from "../../stubs/cluster/cluster-stubs";
|
|
9
|
+
import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
|
|
8
10
|
|
|
9
11
|
describe('Repositories', () => {
|
|
10
12
|
|
|
@@ -503,6 +505,43 @@ describe('Repositories', () => {
|
|
|
503
505
|
ModalDialogSteps.verifyDialogBody('Changing the repository ID is a dangerous operation since it renames the repository folder and enforces repository shutdown.');
|
|
504
506
|
});
|
|
505
507
|
|
|
508
|
+
it('should NOT allow restart of LOCAL repository from EDIT PAGE, if node is in cluster', () => {
|
|
509
|
+
// Given I create a repository
|
|
510
|
+
cy.createRepository({id: repositoryId});
|
|
511
|
+
// When I set the node in a cluster
|
|
512
|
+
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
513
|
+
// Then go to the local repository's edit page
|
|
514
|
+
RepositorySteps.visitEditPage(repositoryId);
|
|
515
|
+
// I expect the repository restart checkbox button to be disabled
|
|
516
|
+
RepositorySteps.getEditViewRestartButton().should('be.visible');
|
|
517
|
+
RepositorySteps.getEditViewRestartButton().should('be.disabled');
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
it('should NOT allow restart of LOCAL repositories from REPOSITORIES PAGE, if node is in cluster', () => {
|
|
521
|
+
// Given I create a repository
|
|
522
|
+
cy.createRepository({id: repositoryId});
|
|
523
|
+
// When I set the node in a cluster
|
|
524
|
+
GlobalOperationsStatusesStub.stubGlobalOperationsStatusesResponse(repositoryId);
|
|
525
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
526
|
+
// Then go to the repositories page
|
|
527
|
+
RepositorySteps.visit();
|
|
528
|
+
// I expect the local repository's restart button to be disabled
|
|
529
|
+
RepositorySteps.getRepositoryRestartButton(repositoryId).should('be.visible');
|
|
530
|
+
RepositorySteps.getRepositoryRestartButton(repositoryId).should('be.disabled');
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
it('should ALLOW restart of REMOTE repositories from REPOSITORIES PAGE, if node is in cluster', () => {
|
|
534
|
+
// Given I have a remote location
|
|
535
|
+
RepositoriesStubs.stubRepositories(0, '/repositories/get-remote-and-local-repositories.json');
|
|
536
|
+
RepositoriesStubs.stubLocations();
|
|
537
|
+
// When I set the node in a cluster
|
|
538
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
539
|
+
// Then go to the repositories page
|
|
540
|
+
RepositorySteps.visit();
|
|
541
|
+
// Then I expect the remote repository's restart button to be enabled
|
|
542
|
+
RepositorySteps.getRestartRemoteRepoButton(0).should('be.enabled');
|
|
543
|
+
});
|
|
544
|
+
|
|
506
545
|
function interceptRulesetFileUpload() {
|
|
507
546
|
cy.intercept(
|
|
508
547
|
{
|
|
@@ -1,32 +1,16 @@
|
|
|
1
|
+
import {AutocompleteSteps} from "../../steps/setup/autocomplete-steps";
|
|
2
|
+
import {LicenseStubs} from "../../stubs/license-stubs";
|
|
3
|
+
|
|
1
4
|
describe('Autocomplete ', () => {
|
|
2
5
|
|
|
3
6
|
let repositoryId;
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
beforeEach(() => {
|
|
6
9
|
repositoryId = 'autocomplete-' + Date.now();
|
|
7
10
|
cy.createRepository({id: repositoryId});
|
|
8
11
|
cy.presetRepository(repositoryId);
|
|
9
12
|
cy.initializeRepository(repositoryId);
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function waitUntilAutocompletePageIsLoaded() {
|
|
13
|
-
// Workbench loading screen should not be visible
|
|
14
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
15
|
-
|
|
16
|
-
// No active loader
|
|
17
|
-
cy.get('.ot-loader').should('not.exist');
|
|
18
|
-
|
|
19
|
-
// No warnings should be present
|
|
20
|
-
getAutocompletePage().find('.alert-warning').should('not.be.visible');
|
|
21
|
-
|
|
22
|
-
getAutocompleteIndex().should('be.visible');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
createRepository();
|
|
27
|
-
cy.visit('/autocomplete');
|
|
28
|
-
cy.window();
|
|
29
|
-
waitUntilAutocompletePageIsLoaded();
|
|
13
|
+
LicenseStubs.spyGetLicense();
|
|
30
14
|
});
|
|
31
15
|
|
|
32
16
|
afterEach(() => {
|
|
@@ -34,85 +18,52 @@ describe('Autocomplete ', () => {
|
|
|
34
18
|
});
|
|
35
19
|
|
|
36
20
|
it('should allow to enable the autocomplete', () => {
|
|
21
|
+
AutocompleteSteps.visit();
|
|
22
|
+
cy.wait('@get-license');
|
|
23
|
+
AutocompleteSteps.waitUntilAutocompletePageIsLoaded();
|
|
24
|
+
|
|
37
25
|
// Verify initial status is OFF
|
|
38
|
-
getAutocompleteHeader()
|
|
26
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
39
27
|
.should('be.visible')
|
|
40
28
|
.and('contain', repositoryId);
|
|
41
|
-
getAutocompleteHeader()
|
|
29
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
42
30
|
.find('.tag-default')
|
|
43
31
|
.should('be.visible')
|
|
44
32
|
.and('contain', 'OFF');
|
|
45
|
-
getAutocompleteSwitch()
|
|
33
|
+
AutocompleteSteps.getAutocompleteSwitch()
|
|
46
34
|
.find('input')
|
|
47
35
|
.should('not.be.checked');
|
|
48
|
-
getAutocompleteStatus().should('not.be.visible');
|
|
49
|
-
getBuildButton().should('not.be.visible');
|
|
36
|
+
AutocompleteSteps.getAutocompleteStatus().should('not.be.visible');
|
|
37
|
+
AutocompleteSteps.getBuildButton().should('not.be.visible');
|
|
50
38
|
|
|
51
39
|
// Should allow to add autocomplete labels
|
|
52
|
-
getToggleIRIButton()
|
|
40
|
+
AutocompleteSteps.getToggleIRIButton()
|
|
53
41
|
.should('be.visible')
|
|
54
42
|
.and('not.be.disabled');
|
|
55
|
-
getAddLabelButton()
|
|
43
|
+
AutocompleteSteps.getAddLabelButton()
|
|
56
44
|
.should('be.visible')
|
|
57
45
|
.and('not.be.disabled');
|
|
58
46
|
|
|
59
47
|
// Should have default labels
|
|
60
|
-
getAutocompleteLabels()
|
|
48
|
+
AutocompleteSteps.getAutocompleteLabels()
|
|
61
49
|
.should('be.visible')
|
|
62
50
|
.find('.wb-autocomplete-labels-row')
|
|
63
51
|
.should('have.length', 1)
|
|
64
52
|
.and('contain', 'http://www.w3.org/2000/01/rdf-schema#label');
|
|
65
53
|
|
|
66
54
|
// Enable autocomplete and verify status is OK (possible slow operation)
|
|
67
|
-
getAutocompleteSwitch().click();
|
|
68
|
-
getAutocompleteHeader()
|
|
55
|
+
AutocompleteSteps.getAutocompleteSwitch().click();
|
|
56
|
+
AutocompleteSteps.getAutocompleteHeader()
|
|
69
57
|
.find('.tag-primary')
|
|
70
58
|
.should('be.visible')
|
|
71
59
|
.and('contain', 'ON');
|
|
72
|
-
getAutocompleteStatus()
|
|
60
|
+
AutocompleteSteps.getAutocompleteStatus()
|
|
73
61
|
.should('be.visible')
|
|
74
62
|
.find('.tag-success')
|
|
75
63
|
.should('be.visible')
|
|
76
64
|
.and('contain', 'Ready');
|
|
77
|
-
getBuildButton()
|
|
65
|
+
AutocompleteSteps.getBuildButton()
|
|
78
66
|
.should('be.visible')
|
|
79
67
|
.and('not.be.disabled');
|
|
80
68
|
});
|
|
81
|
-
|
|
82
|
-
function getAutocompletePage() {
|
|
83
|
-
return cy.get('#autocomplete');
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function getAutocompleteIndex() {
|
|
87
|
-
return getAutocompletePage().find('#toggleIndex');
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
function getAutocompleteHeader() {
|
|
91
|
-
return getAutocompleteIndex().find('.autocomplete-header');
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function getAutocompleteSwitch() {
|
|
95
|
-
return getAutocompleteIndex().find('.autocomplete-switch');
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function getAutocompleteStatus() {
|
|
99
|
-
return getAutocompleteIndex().find('.autocomplete-status');
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function getBuildButton() {
|
|
103
|
-
return getAutocompleteIndex().find('.build-index-btn');
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function getToggleIRIButton() {
|
|
107
|
-
return getAutocompletePage().find('#toggleIRIs');
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
function getAddLabelButton() {
|
|
111
|
-
return getAutocompletePage().find('#wb-autocomplete-addLabel');
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function getAutocompleteLabels() {
|
|
115
|
-
return getAutocompletePage().find('#wb-autocomplete-labels');
|
|
116
|
-
}
|
|
117
|
-
|
|
118
69
|
});
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {JdbcSteps} from "
|
|
2
|
-
import {JdbcCreateSteps} from "
|
|
3
|
-
import {ToasterSteps} from "
|
|
4
|
-
import {YasrSteps} from "
|
|
5
|
-
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "
|
|
6
|
-
import {YasqeSteps} from "
|
|
7
|
-
import {MainMenuSteps} from "
|
|
8
|
-
import {RepositorySelectorSteps} from "
|
|
9
|
-
import {YasguiLoader} from "
|
|
1
|
+
import {JdbcSteps} from "../../../steps/setup/jdbc-steps";
|
|
2
|
+
import {JdbcCreateSteps} from "../../../steps/setup/jdbc-create-steps";
|
|
3
|
+
import {ToasterSteps} from "../../../steps/toaster-steps";
|
|
4
|
+
import {YasrSteps} from "../../../steps/yasgui/yasr-steps";
|
|
5
|
+
import {ModalDialogSteps, VerifyConfirmationDialogOptions} from "../../../steps/modal-dialog-steps";
|
|
6
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
7
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
8
|
+
import {RepositorySelectorSteps} from "../../../steps/repository-selector-steps";
|
|
9
|
+
import {YasguiLoader} from "../../../steps/yasgui/yasgui-loader";
|
|
10
10
|
|
|
11
11
|
const FILE_TO_IMPORT = '200-row-allianz.ttl';
|
|
12
12
|
const DEFAULT_QUERY = 'PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>\n' +
|
|
@@ -230,7 +230,6 @@ describe('JDBC configuration', () => {
|
|
|
230
230
|
JdbcSteps.verifyUrl();
|
|
231
231
|
});
|
|
232
232
|
|
|
233
|
-
|
|
234
233
|
it('should display confirm message when configuration name is changed', () => {
|
|
235
234
|
// When I open the create JDBC configuration page,
|
|
236
235
|
// type configuration name,
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
import {JdbcSteps} from "
|
|
2
|
-
import {JdbcCreateSteps} from "
|
|
3
|
-
import {ModalDialogSteps} from "
|
|
4
|
-
import {YasqeSteps} from "
|
|
1
|
+
import {JdbcSteps} from "../../../steps/setup/jdbc-steps";
|
|
2
|
+
import {JdbcCreateSteps} from "../../../steps/setup/jdbc-create-steps";
|
|
3
|
+
import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
|
|
4
|
+
import {YasqeSteps} from "../../../steps/yasgui/yasqe-steps";
|
|
5
|
+
import {JdbcStubs} from "../../../stubs/jdbc/jdbc-stubs";
|
|
6
|
+
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
5
7
|
|
|
6
8
|
const FILE_TO_IMPORT = '200-row-allianz.ttl';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
" \tex:customerLoyalty ?customer_loyalty_id.\n" +
|
|
17
|
-
" ?customer_loyalty_id rdfs:label ?customer_loyalty.\n" +
|
|
18
|
-
" # !filter\n" +
|
|
19
|
-
"} ";
|
|
9
|
+
|
|
10
|
+
// The closing brace is intentionally omitted because when cypress types in the query, the editor will automatically add it.
|
|
11
|
+
const EDIT_QUERY = `
|
|
12
|
+
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
|
|
13
|
+
SELECT ?id ?label {
|
|
14
|
+
?id rdfs:label ?label
|
|
15
|
+
#!filter
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
20
18
|
|
|
21
19
|
describe('JDBC configuration', () => {
|
|
22
20
|
|
|
@@ -34,7 +32,7 @@ describe('JDBC configuration', () => {
|
|
|
34
32
|
cy.deleteRepository(repositoryId);
|
|
35
33
|
});
|
|
36
34
|
|
|
37
|
-
it('Should
|
|
35
|
+
it('Should be able to cancel JDBC configuration creation', () => {
|
|
38
36
|
// When I am on JDBC configurations page and click on create a new table configuration button.
|
|
39
37
|
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
40
38
|
|
|
@@ -82,6 +80,7 @@ describe('JDBC configuration', () => {
|
|
|
82
80
|
// When I click on edit button,
|
|
83
81
|
JdbcSteps.clickOnEditButton();
|
|
84
82
|
// change the query,
|
|
83
|
+
YasqeSteps.clearEditor();
|
|
85
84
|
YasqeSteps.pasteQuery(EDIT_QUERY);
|
|
86
85
|
// and click on save button.
|
|
87
86
|
JdbcCreateSteps.clickOnSave();
|
|
@@ -112,13 +111,6 @@ describe('JDBC configuration', () => {
|
|
|
112
111
|
// When I click on delete button.
|
|
113
112
|
JdbcSteps.clickOnDeleteButton();
|
|
114
113
|
|
|
115
|
-
// Then I expect to be asked to confirm the deletion,
|
|
116
|
-
// and click on cancel dialog button.
|
|
117
|
-
ModalDialogSteps.clickOnCancelButton();
|
|
118
|
-
|
|
119
|
-
// When I click on delete button.
|
|
120
|
-
JdbcSteps.clickOnDeleteButton();
|
|
121
|
-
|
|
122
114
|
// Then I expect to be asked to confirm the deletion,
|
|
123
115
|
// and when click on confirm dialog button.
|
|
124
116
|
ModalDialogSteps.clickOnConfirmButton();
|
|
@@ -127,4 +119,43 @@ describe('JDBC configuration', () => {
|
|
|
127
119
|
JdbcSteps.getJDBCConfigurations().should('contain', 'No tables are defined');
|
|
128
120
|
});
|
|
129
121
|
|
|
122
|
+
it('Should show error notification on server error during jdbc configuration creation', () => {
|
|
123
|
+
// Given that the server will return an error on saving the JDBC configuration
|
|
124
|
+
JdbcStubs.stubJdbcCreateError();
|
|
125
|
+
// And I have configured a new JDBC configuration
|
|
126
|
+
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
127
|
+
JdbcCreateSteps.verifyUrl();
|
|
128
|
+
JdbcCreateSteps.typeTableName('JdbcTest');
|
|
129
|
+
JdbcCreateSteps.openColumnTypesTab();
|
|
130
|
+
JdbcCreateSteps.getColumnSuggestionRows().should('have.length', 2);
|
|
131
|
+
// When I click on save button.
|
|
132
|
+
JdbcCreateSteps.clickOnSave();
|
|
133
|
+
// Then I expect to see a notification with the error message.
|
|
134
|
+
ApplicationSteps.getErrorNotifications().should('contain', 'Could not save SQL table configuration');
|
|
135
|
+
// And the configuration to not be created.
|
|
136
|
+
cy.url().should('include', '/jdbc/configuration/create');
|
|
137
|
+
JdbcCreateSteps.getSaveButton().should('be.visible').and('be.enabled');
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it('Should show error notification on server error during jdbc configuration creation', () => {
|
|
141
|
+
// Given that the server will return an error on saving the JDBC configuration
|
|
142
|
+
JdbcStubs.stubJdbcUpdateError();
|
|
143
|
+
// And I have configured and saved a new JDBC configuration
|
|
144
|
+
JdbcSteps.clickOnCreateJdbcConfigurationButton();
|
|
145
|
+
JdbcCreateSteps.verifyUrl();
|
|
146
|
+
JdbcCreateSteps.typeTableName('JdbcTest2');
|
|
147
|
+
JdbcCreateSteps.openColumnTypesTab();
|
|
148
|
+
JdbcCreateSteps.getColumnSuggestionRows().should('have.length', 2);
|
|
149
|
+
JdbcCreateSteps.clickOnSave();
|
|
150
|
+
JdbcSteps.verifyUrl();
|
|
151
|
+
JdbcSteps.getJDBCConfigurationResults().should('have.length', 1);
|
|
152
|
+
// When I edit the configuration
|
|
153
|
+
JdbcSteps.clickOnEditButton();
|
|
154
|
+
YasqeSteps.clearEditor();
|
|
155
|
+
YasqeSteps.pasteQuery(EDIT_QUERY);
|
|
156
|
+
// And click on save button.
|
|
157
|
+
JdbcCreateSteps.clickOnSave();
|
|
158
|
+
// Then I expect to see a notification with the error message.
|
|
159
|
+
ApplicationSteps.getErrorNotifications().should('contain', 'Could not save SQL table configuration');
|
|
160
|
+
});
|
|
130
161
|
});
|