graphdb-workbench-tests 2.3.0-TR9 → 2.3.0

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/Dockerfile CHANGED
@@ -4,6 +4,6 @@ COPY . /workbench/tests-cypress/
4
4
 
5
5
  WORKDIR /workbench/tests-cypress/
6
6
 
7
- RUN npm install && npm install --save-dev cypress
7
+ RUN npm ci
8
8
 
9
9
  CMD ["npm", "test"]
@@ -431,7 +431,8 @@
431
431
  "security.free.access.is": "Free Access is",
432
432
  "security.free.access.non.admin": "free access to non-admin functionality",
433
433
  "security.using.external.auth.db": "Using external authentication and authorization database",
434
- "security.user.settings.modification": "You can modify the user settings for users that logged in previously but you cannot change their credentials or access rights.",
434
+ "security.user.settings.modification": "You can modify the user settings for users that logged in previously but you cannot change their credentials or access rights",
435
+ "security.user.settings.user_role": "You can see user role or access rights in the external authentication provider",
435
436
  "security.table.username": "Username",
436
437
  "security.table.role": "Role",
437
438
  "security.table.date.created": "Date created",
@@ -614,7 +615,7 @@
614
615
  "menu.system.information.label": "System information",
615
616
  "menu.rest.api.label": "REST API",
616
617
  "menu.documentation.label": "Documentation",
617
- "menu.developer.hub.label": "Developer Hub",
618
+ "menu.tutorials.label": "Tutorials",
618
619
  "menu.support.label": "Support",
619
620
  "menu.guides.label": "Interactive guides",
620
621
  "menu.plugins.label": "Plugins",
@@ -646,7 +647,7 @@
646
647
  "query.editor.autocomplete.hint": "Hint: \"abC\" matches \"abC*\", \"ab c*\" and \"ab-c*\"",
647
648
  "query.editor.progress.msg": "{{progressMessage}}... {{timeHuman}}",
648
649
  "query.editor.extra.msg": "\n{{extraMessage}}",
649
- "query.editor.warning.msg": "Explain only works with SELECT, CONSTRUCT or DESCRIBE queries.",
650
+ "query.editor.warning.msg": "Explain only works with SELECT, CONSTRUCT and DESCRIBE queries.",
650
651
  "query.editor.virtual.repo.warning.msg": "Explain not supported for Virtual repositories.",
651
652
  "query.editor.virtual.repo.update.warning.msg": "Updates are not supported for Virtual repositories.",
652
653
  "query.editor.get.saved.queries.error": "Error! Could not get saved queries",
@@ -677,6 +678,8 @@
677
678
  "query.editor.creating.connector": "Creating connector {{name}}",
678
679
  "query.editor.query.results.mismatch": "The query in your editor does not match the query results. Download will save the results from the last executed query.",
679
680
  "query.editor.automatically.execute.update.warning": "This is an update and it may change the data in the repository.<br>Are you sure you want to execute it automatically?",
681
+ "query.editor.error.show.full.message": "Show full exception message",
682
+ "query.editor.error.show.less.message": "Show less exception message",
680
683
  "sparql.tab.directive.close.last.warning": "Last tab must remain open.",
681
684
  "sparql.tab.directive.delete.all.tabs.warning": "Are you sure you want to delete all query tabs except selected tab?",
682
685
  "sparql.tab.directive.close.tab.warning": "Are you sure you want to close this query tab?",
@@ -951,17 +954,44 @@
951
954
  "fedx.repo.already.added.member.error": "Repository {{name}} already added as a FedX member",
952
955
  "fedx.repo.already.added.sparql.endpoint.error": "SPARQL endpoint {{name}} already added as a FedX member",
953
956
  "ontop.repo.configuration": "Ontop configuration",
957
+ "ontop.repo.connection.information": "Connection Information",
958
+ "ontop.repo.settings": "Ontop settings",
954
959
  "ontop.repo.database.driver": "Database driver",
960
+ "ontop.repo.database.host_name": "Host name",
961
+ "ontop.repo.database.host_name.placeholder": "Enter hostname",
962
+ "ontop.repo.database.snowflake.host_name": "Account identifier",
963
+ "ontop.repo.database.port": "Port",
964
+ "ontop.repo.database.port.placeholder": "Enter port",
965
+ "ontop.repo.database.username": "Username",
966
+ "ontop.repo.database.username.placeholder": "Enter username",
967
+ "ontop.repo.database.database_name": "Database name",
968
+ "ontop.repo.database.database_name.placeholder": "Enter data source name",
969
+ "ontop.repo.database.schema.database_name": "Schema",
970
+ "ontop.repo.database.http_path.database_name": "HttpPath",
971
+ "ontop.repo.database.warehouse.database_name": "Warehouse",
972
+ "ontop.repo.database.password": "Password",
973
+ "ontop.repo.database.password.placeholder": "Enter password",
974
+ "ontop.repo.database.driver_class": "Driver class",
975
+ "ontop.repo.database.driver_class.placeholder": "Enter data source driver class",
976
+ "ontop.repo.database.url": "JDBC URL",
955
977
  "ontop.repo.test.connection": "Test connection",
956
978
  "ontop.repo.download.jdbc.driver": "Download JDBC driver",
979
+ "ontop.repo.missing.jdbc.driver": "Missing JDBC Driver",
957
980
  "ontop.repo.missing.required.file.error": "Missing required ontop repo file",
981
+ "ontop.repo.missing.required.file": "Missing required ontop repo file '{{fileName}}'",
958
982
  "ontop.repo.successful.connection.msg": "Connection is successful",
959
983
  "ontop.repo.failed.to.connect": "Failed to connect",
960
984
  "ontop.repo.properties.label": "Additional Ontop/JDBC properties",
961
985
  "ontop.repo.properties.tooltip": "Allows to specify additional Ontop/JDBC in properties file format",
962
986
  "ontop.repo.properties.configuration.link": "Ontop configuration properties",
963
987
  "ontop.repo.properties.placeholder": "# Ontop/JDBC properties in properties file format",
988
+ "ontop.repo.file.obdaFile.name": "OBDA or R2RML file",
989
+ "ontop.repo.file.owlFile.name": "Ontology file",
990
+ "ontop.repo.file.constraintFile.name": "Constraint file",
991
+ "ontop.repo.file.lensesFile.name": "Lenses file",
992
+ "ontop.repo.file.dbMetadataFile.name": "DB metadata file",
964
993
  "missing.required.field.error": "Missing required field",
994
+ "missing.required.field": "Missing required field '{{fieldName}}'",
965
995
  "restart.repo.check.tooltip": "Check to restart the repository and apply the changes.",
966
996
  "restart.repo.label": "Restart repository",
967
997
  "delete.repo": "Delete repository",
@@ -1256,6 +1286,7 @@
1256
1286
  "signature.auth.info": "Signature authentication uses the token secret, which must be the same on all GraphDB instances. For more information on configuring the token secret, please refer to ",
1257
1287
  "signature.auth.info.last": " in the documentation.",
1258
1288
  "update.file.content.header": "Update file contents",
1289
+ "update.file.edit.content.header": "Edit \"{{fileName}}\" contents",
1259
1290
  "update.file.content.placeholder": "# Update ontop repository file content",
1260
1291
  "update.file.content.tooltip": "Update the contents of the file.",
1261
1292
  "upload.repo.config.header": "Upload Repository Configuration",
@@ -1645,6 +1676,7 @@
1645
1676
  "sparql.shortcuts.auto.indent.lines.less": "Indent current/selected line(s) less",
1646
1677
  "sparql.shortcuts.execute.query.update": "Execute query or update",
1647
1678
  "sparql.shortcuts.execute.explain.plan": "Execute explain plan for query",
1679
+ "sparql.shortcuts.execute.explain-gpt.plan": "Explain query/result using ChatGPT",
1648
1680
  "sparql.shortcuts.create.new.tab": "Create a new unnamed tab",
1649
1681
  "sparql.shortcuts.create.saved.query": "Create a saved query from the current state",
1650
1682
  "sparql.shortcuts.switch.next.tab": "Switch to next tab",
@@ -1,4 +1,4 @@
1
- import ClassViewsSteps from "../../steps/class-views-steps";
1
+ import ClassViewsSteps, {ALL_GRAPHS, GRAPH_FILE, NEWS_GRAPH} from "../../steps/class-views-steps";
2
2
 
3
3
  const INITIAL_CLASS_COUNT = 50;
4
4
  const CLASS_COUNT_OF_NEWS_GRAPH = 35;
@@ -182,10 +182,10 @@ describe('Class hierarchy screen validation', () => {
182
182
 
183
183
  // Reload diagram
184
184
  ClassViewsSteps.reloadDiagram();
185
-
185
+ cy.intercept('/rest/class-hierarchy*').as('hierarchyReload');
186
186
  ClassViewsSteps.confirmReloadWarningAppear(CLASS_HIERARCHY);
187
187
  ClassViewsSteps.confirmReload();
188
- cy.visit('/hierarchy#1');
188
+ cy.wait('@hierarchyReload');
189
189
  verifyCounterValue(INITIAL_CLASS_COUNT + CLASS_COUNT_OF_NEWS_GRAPH);
190
190
  ClassViewsSteps.clickGraphBtn();
191
191
  ClassViewsSteps.selectGraphFromDropDown(NEWS_GRAPH);
@@ -218,8 +218,7 @@ describe('Class hierarchy screen validation', () => {
218
218
  // as the rz-slider library doesn't provide a reliable way to get this. It just has multiple
219
219
  // '.rz-bubble' elements and no appropriate selector for the one which holds the visible
220
220
  // value.
221
- return cy.get('.rz-pointer[role="slider"]')
222
- .then(($element) => $element.attr('aria-valuenow'));
221
+ return cy.get('.rz-pointer[role="slider"]');
223
222
  }
224
223
 
225
224
  function searchForClass(name) {
@@ -262,9 +261,6 @@ describe('Class hierarchy screen validation', () => {
262
261
  }
263
262
 
264
263
  function verifyCounterValue(classCount) {
265
- getCurrentSliderValue()
266
- .then((currentValue) => {
267
- expect(currentValue === classCount);
268
- });
264
+ getCurrentSliderValue().should('be.visible').and('have.attr', 'aria-valuenow', classCount);
269
265
  }
270
266
  });
@@ -1,4 +1,4 @@
1
- import ClassViewsSteps from "../../steps/class-views-steps";
1
+ import ClassViewsSteps, {ALL_GRAPHS, GRAPH_FILE, NEWS_GRAPH} from "../../steps/class-views-steps";
2
2
 
3
3
  const FILE_TO_IMPORT = 'wine.rdf';
4
4
 
@@ -0,0 +1,157 @@
1
+ import {RepositorySteps} from "../../steps/repository-steps";
2
+ import {OntopRepositorySteps} from "../../steps/ontop-repository-steps";
3
+ import {ToasterSteps} from "../../steps/toaster-steps";
4
+
5
+ describe('Ontop repositories', () => {
6
+ let repositoryId;
7
+ beforeEach(() => {
8
+ repositoryId = 'repo-' + Date.now();
9
+ });
10
+
11
+ afterEach(() => {
12
+ cy.deleteRepository(repositoryId);
13
+ });
14
+
15
+ //Check that 'Ontop' type repository is available and that the configuration fields are present and active.
16
+ it('should check if Ontop repository type is available', () => {
17
+ RepositorySteps.visit();
18
+ RepositorySteps.getCreateRepositoryButton().click();
19
+ RepositorySteps.getRepositoryTypeButton('ontop').should('be.visible');
20
+ RepositorySteps.chooseRepositoryType('ontop');
21
+ cy.url().should('include', '/repository/create/ontop');
22
+
23
+ OntopRepositorySteps.getOBDAFileField().should('be.visible');
24
+ OntopRepositorySteps.getOntologyFileField().should('be.visible');
25
+ OntopRepositorySteps.getConstraintFileField().should('be.visible');
26
+ OntopRepositorySteps.getLensesFileField().should('be.visible');
27
+ OntopRepositorySteps.getOBDAUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
28
+ OntopRepositorySteps.getOntologyUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
29
+ OntopRepositorySteps.getConstraintUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
30
+ OntopRepositorySteps.getLensesUploadButton().scrollIntoView().should('be.visible').and('not.be.disabled');
31
+ });
32
+
33
+ it('should not allow creating of repository if required fields are not filled', () => {
34
+ // When I visit the create ontop page,
35
+ OntopRepositorySteps.visitCreate();
36
+ // and click on create button.
37
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
38
+
39
+ // Then I expect to see error message that describes repository id field is empty,
40
+ ToasterSteps.verifyError('Repository ID cannot be empty');
41
+ // and test connection button to be disabled.
42
+ OntopRepositorySteps.getTestConnectionButton().should('be.disabled');
43
+
44
+ // When I fill repository id,
45
+ RepositorySteps.getRepositoryIdField().type('ontop-repository-' + Date.now());
46
+ // and click on create button.
47
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
48
+
49
+ // Then I expect to see error message that describes driver class field is empty.
50
+ ToasterSteps.verifyError('Missing required field \'Driver class\'');
51
+
52
+ // When I fill driver class,
53
+ OntopRepositorySteps.getDriverClassInput().type('org.test.some.DriverClass');
54
+ // and click on create button.
55
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
56
+
57
+ // Then I expect to see error message that describes url field is empty.
58
+ ToasterSteps.verifyError('Missing required field \'JDBC URL\'');
59
+
60
+ // When I fill url,
61
+ OntopRepositorySteps.getUrlInput().type('url:to://database');
62
+ // and click on create button.
63
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
64
+
65
+ // Then I expect to see error message that describes obda file is not uploaded,
66
+ ToasterSteps.verifyError('Missing required ontop repo file \'OBDA or R2RML file\'');
67
+ // and test connection button to be enabled.
68
+ OntopRepositorySteps.getTestConnectionButton().should('not.be.disabled');
69
+
70
+ // When I select MySql database driver.
71
+ OntopRepositorySteps.selectMySqlDatabase();
72
+
73
+ // Then I expect
74
+ // the driver class to be changed,
75
+ OntopRepositorySteps.getDriverClassInput().should('have.value', 'com.mysql.cj.jdbc.Driver');
76
+ // and url placeholder to contains MySql url template.
77
+ OntopRepositorySteps.getUrlInput().should('have.attr', 'placeholder', 'jdbc:mysql://{hostport}/{database}');
78
+ // and test connection button to be disabled.
79
+ OntopRepositorySteps.getTestConnectionButton().should('be.disabled');
80
+
81
+ // When I click on create repository button.
82
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
83
+
84
+ // Then I expect to see error message that describes host name field is empty.
85
+ ToasterSteps.verifyError('Missing required field \'Host name\'');
86
+
87
+ const hostName = 'localhost';
88
+ // When I fill the host name.
89
+ OntopRepositorySteps.getHostNameInput().type(hostName);
90
+
91
+ // Then I expect url to be filed with the host name.
92
+ OntopRepositorySteps.getUrlInput().should('have.value', 'jdbc:mysql://localhost/{database}');
93
+
94
+ // When I click on create repository button.
95
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
96
+
97
+ // Then I expect to see error message that describes database name field is empty.
98
+ ToasterSteps.verifyError('Missing required field \'Database name\'');
99
+
100
+ // When I change the database driver for which the port field is required,
101
+ OntopRepositorySteps.selectOracleDatabase();
102
+
103
+ // Then I expect host name to be cleared,
104
+ // and if click on create repository button.
105
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
106
+
107
+ // Then I expect to see error message that describes host name field is empty.
108
+ ToasterSteps.verifyError('Missing required field \'Host name\'');
109
+
110
+ // When I fill host name,
111
+ OntopRepositorySteps.getHostNameInput().type(hostName);
112
+
113
+ // and click on create repository button.
114
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
115
+
116
+ // Then I expect to see error message that describes database name field is empty.
117
+ ToasterSteps.verifyError('Missing required field \'Port\'');
118
+
119
+ // When I fill the port field.
120
+ OntopRepositorySteps.getPortInput().type(5423);
121
+
122
+ // Then I expect url to be filed with the host name and port.
123
+ OntopRepositorySteps.getUrlInput().should('have.value', 'jdbc:oracle:thin:@localhost:5423:{database}');
124
+
125
+ // When I click on create repository button.
126
+ OntopRepositorySteps.clickOnCreateRepositoryButton();
127
+
128
+ // Then I expect to see error message that describes database name field is empty.
129
+ ToasterSteps.verifyError('Missing required field \'Database name\'');
130
+
131
+ // When I fill database name field.
132
+ OntopRepositorySteps.getDatabaseNameInput().type('database-name');
133
+
134
+ // Then I expect url to be filed with the host name and port,
135
+ OntopRepositorySteps.getUrlInput().should('have.value', 'jdbc:oracle:thin:@localhost:5423:database-name');
136
+ // and test connection button to be enabled.
137
+ OntopRepositorySteps.getTestConnectionButton().should('not.be.disabled');
138
+ });
139
+
140
+ it('should populate url when Snowflake driver is selected', () => {
141
+ // When I open create ontop repository page,
142
+ OntopRepositorySteps.visitCreate();
143
+ // and chose the Snowflake driver
144
+ OntopRepositorySteps.selectSnowflakeDatabase();
145
+ const hostName = 'someHostName';
146
+ const port = 1234;
147
+ const databaseName = 'test_database';
148
+ // When I enter all needed data to calculate the value of url.
149
+ OntopRepositorySteps.getHostNameInput().type(hostName);
150
+ OntopRepositorySteps.getPortInput().type(port);
151
+ OntopRepositorySteps.getDatabaseNameInput().type(databaseName);
152
+
153
+ // Then I expect url to be calculated properly
154
+ OntopRepositorySteps.getUrlInput().should('have.value', 'jdbc:snowflake://someHostName.snowflakecomputing.com:1234/?warehouse=test_database');
155
+
156
+ });
157
+ });