graphdb-workbench-tests 2.8.0 → 2.8.1-TR1

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 CHANGED
@@ -6,7 +6,7 @@ module.exports = defineConfig({
6
6
  screenshotsFolder: 'report/screenshots',
7
7
  videosFolder: 'report/videos',
8
8
  video: true,
9
- defaultCommandTimeout: 15000,
9
+ defaultCommandTimeout: 25000,
10
10
  numTestsKeptInMemory: 10,
11
11
  e2e: {
12
12
  // We've imported your old cypress plugins here.
@@ -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."
@@ -2552,6 +2551,7 @@
2552
2551
  "repo.page.location.label": "Location",
2553
2552
  "repo.page.location.input.field.tooltip": "The location where to create repository. The default is the local one.",
2554
2553
  "repo.page.repository.info.loading.error": "Currently selected repository cannot be edited due to an error during repository metadata loading.",
2554
+ "guides.loading.message.failure": "Failed to load guides!",
2555
2555
  "guide.button.guide-paused": "Guide paused",
2556
2556
  "guide.button.guide-resume": "Continue the guide",
2557
2557
  "guide.validate.no-next": "Cannot continue to next",
@@ -2597,7 +2597,8 @@
2597
2597
  "guide.step_plugin.visual-graph-link-focus.title": "Visual graph links",
2598
2598
  "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}} &rarr; {{iriLabel}} &rarr; {{toIriLabel}}</b>.",
2599
2599
  "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=\"{{resourceUrl}}\" target=\"_blank\">download {{resourceFile}}</a>.",
2600
+ "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>.",
2601
+ "guide.step_plugin.download-guide-resource.download.message.failure": "Failed to download the '{{resourceFile}}' file!",
2601
2602
  "guide.step_plugin.choose-repository.content": "Click on the repository selection dropdown.",
2602
2603
  "guide.step_plugin.select-repository.content": "Click on the <b>{{getRepositoryId()}}</b> repository button.",
2603
2604
  "guide.step_plugin.select-repository-plug.content": "Click on the plug icon of the <b>{{repositoryId}}</b> repository.",
@@ -1,6 +1,6 @@
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";
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}';
@@ -1,8 +1,8 @@
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";
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 "../../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 {RepositorySelectorSteps} from "../../steps/repository-selector-steps";
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$/);
@@ -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
- function createRepository() {
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 "../../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";
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 "../../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";
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
- const EDIT_QUERY = "PREFIX ex:<http://example.com/#>\n" +
8
- "PREFIX base:<http://example/base/>\n" +
9
- "PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>\n" +
10
- "PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
11
- "PREFIX foaf: <http://xmlns.com/foaf/0.1/>\n" +
12
- "\n" +
13
- "select ?id ?fraud_score ?customer_loyalty where { \n" +
14
- "\t?id rdf:type ex:Customer;\n" +
15
- " \tex:fraudScore ?fraud_score;\n" +
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 not create a new JDBC configuration click on cancel button', () => {
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
  });