graphdb-workbench-tests 4.0.0-TR2 → 4.0.0-TR20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/e2e-flaky/import/import-server-files-operations.spec.js +8 -30
  2. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +7 -7
  3. package/e2e-flaky/import/import-user-data-url.spec.js +1 -1
  4. package/e2e-flaky/sparql-editor/lucene-connector.spec.js +1 -1
  5. package/e2e-legacy/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +27 -0
  6. package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +1 -1
  7. package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +31 -2
  8. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +35 -4
  9. package/e2e-legacy/graph-navigator/graph-navigator-restrictions.spec.js +216 -0
  10. package/e2e-legacy/graph-navigator/graph-navigator.spec.js +447 -0
  11. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +1 -1
  12. package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +6 -14
  13. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +26 -30
  14. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +12 -20
  15. package/e2e-legacy/home/home-page-without-repositories.spec.js +3 -1
  16. package/e2e-legacy/home/home-page-without-selected-repository.spec.js +2 -1
  17. package/e2e-legacy/import/import-server-files-batch-operations.spec.js +38 -5
  18. package/e2e-legacy/import/import-server-files.spec.js +39 -23
  19. package/e2e-legacy/import/import-user-data-file-upload.spec.js +47 -22
  20. package/e2e-legacy/import/import-user-data-settings-dialog.spec.js +81 -10
  21. package/e2e-legacy/import/import-user-data-text-snippet.spec.js +6 -45
  22. package/e2e-legacy/import/import-user-data-url.spec.js +9 -5
  23. package/e2e-legacy/import/import-view.spec.js +2 -2
  24. package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -17
  25. package/e2e-legacy/rdf-version/rdf-version-accept-header.spec.js +145 -0
  26. package/e2e-legacy/repository/ontop-repository.spec.js +25 -34
  27. package/e2e-legacy/repository/rename-repository-restrictions.spec.js +5 -1
  28. package/e2e-legacy/repository/repositories.spec.js +3 -3
  29. package/e2e-legacy/repository/repository-picker-tooltip.spec.js +72 -0
  30. package/e2e-legacy/repository/repository-selector-tooltip.spec.js +55 -0
  31. package/e2e-legacy/resource/resource.spec.js +177 -40
  32. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +14 -25
  33. package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +6 -6
  34. package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +15 -15
  35. package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
  36. package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +2 -2
  37. package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +2 -2
  38. package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +3 -3
  39. package/e2e-legacy/setup/aclmanagement/validate-uri.spec.js +152 -0
  40. package/e2e-legacy/setup/connectors/connectors-initial-state-with-selected-repository.spec.js +1 -1
  41. package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +1 -1
  42. package/e2e-legacy/setup/settings/my-settings.spec.js +25 -15
  43. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +34 -25
  44. package/e2e-legacy/sparql-editor/saved-query/abort-query.spec.js +1 -1
  45. package/e2e-legacy/sparql-editor/sparql-editor-navigation.spec.js +219 -0
  46. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +1 -1
  47. package/e2e-legacy/sparql-editor/yasr/download-as.spec.js +4 -7
  48. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +8 -8
  49. package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
  50. package/e2e-legacy/ttyg/create-agent.spec.js +6 -4
  51. package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
  52. package/e2e-legacy/ttyg/edit-agent.spec.js +57 -0
  53. package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +1 -1
  54. package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +1 -1
  55. package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +1 -1
  56. package/e2e-security/explore/visual-graph/graph-config-owner-actions.spec.js +52 -0
  57. package/e2e-security/setup/home/cookie-policy.spec.js +4 -0
  58. package/e2e-security/setup/license/license-loading.spec.js +57 -0
  59. package/e2e-security/setup/license/license-logout.spec.js +36 -0
  60. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +1 -1
  61. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +1 -1
  62. package/e2e-security/setup/users-and-access/user-and-access.spec.js +0 -1
  63. package/fixtures/cluster/3-nodes-cluster-group-status-no-leader.json +41 -0
  64. package/fixtures/cluster/cluster-config-with-tag.json +17 -0
  65. package/fixtures/connectors/get-connectors.json +0 -1
  66. package/fixtures/graph-navigator/graph-navigator-settings-invalid.ttl +149 -0
  67. package/fixtures/graph-navigator/graph-navigator-settings.ttl +148 -0
  68. package/fixtures/graphdb-import/wine.rdf +279 -285
  69. package/npm-shrinkwrap.json +1283 -1643
  70. package/package.json +10 -1
  71. package/steps/base-steps.js +4 -0
  72. package/steps/cluster/cluster-configuration-steps.js +4 -0
  73. package/steps/cookie-policy/cookie-consent-banner-steps.js +2 -2
  74. package/steps/error-steps.js +2 -2
  75. package/steps/explore/graphs-overview-steps.js +44 -0
  76. package/steps/graph-navigator-steps.js +145 -0
  77. package/steps/header-steps.js +5 -1
  78. package/steps/home-steps.js +3 -6
  79. package/steps/import/import-server-files-steps.js +8 -0
  80. package/steps/import/import-settings-dialog-steps.js +16 -0
  81. package/steps/import/import-steps.js +88 -17
  82. package/steps/import/import-test-constants.js +1 -1
  83. package/steps/import/import-user-data-steps.js +24 -24
  84. package/steps/language-selector-steps.js +4 -0
  85. package/steps/layout-steps.js +6 -0
  86. package/steps/login-steps.js +7 -3
  87. package/steps/main-menu-steps.js +14 -14
  88. package/steps/ontop-repository-steps.js +4 -0
  89. package/steps/page-restrictions-steps.js +24 -0
  90. package/steps/repository-picker-list-steps.js +54 -0
  91. package/steps/repository-selector-steps.js +16 -0
  92. package/steps/repository-steps.js +13 -9
  93. package/steps/resource/resource-steps.js +76 -9
  94. package/steps/setup/acl-management-steps.js +4 -24
  95. package/steps/setup/settings-steps.js +42 -0
  96. package/steps/setup/user-and-access-steps.js +18 -14
  97. package/steps/toaster-steps.js +4 -0
  98. package/steps/ttyg/ttyg-view-steps.js +1 -14
  99. package/steps/visual-graph-steps.js +8 -0
  100. package/steps/widgets/repository-errors-widget-steps.js +6 -2
  101. package/steps/yasgui/yasqe-steps.js +3 -1
  102. package/steps/yasgui/yasr-steps.js +8 -0
  103. package/stubs/browser-stubs.js +40 -0
  104. package/stubs/cluster/cluster-stubs.js +15 -1
  105. package/stubs/graph-navigator-stubs.js +27 -0
  106. package/stubs/license-stubs.js +4 -3
  107. package/stubs/repositories/repositories-stubs.js +44 -0
  108. package/stubs/yasgui/query-stubs.js +5 -0
  109. package/support/visual-graph-commands.js +19 -0
  110. package/e2e-legacy/home/solr-banner/solr-banner.spec.js +0 -137
  111. package/fixtures/graphdb-import/test-trigstar.trigs +0 -32
  112. package/fixtures/graphdb-import/test_turtlestar.ttls +0 -6
  113. package/fixtures/graphdb-import/turtlestar-data.ttls +0 -77
  114. package/steps/deprecation-banner/deprecation-banner-steps.js +0 -13
  115. package/steps/deprecation-steps.js +0 -13
@@ -7,8 +7,12 @@ export class RepositoryErrorsWidgetSteps {
7
7
  return RepositoryErrorsWidgetSteps.getWidget().find('.create-repository-btn');
8
8
  }
9
9
 
10
- static getShowRemoteLocationsBtn() {
11
- return RepositoryErrorsWidgetSteps.getWidget().find('.show-remote-locations-btn');
10
+ static getRepositoryFilter() {
11
+ return RepositoryErrorsWidgetSteps.getWidget().getByTestId('core-errors-repository-filter');
12
+ }
13
+
14
+ static getLocalOnlyCheckbox() {
15
+ return RepositoryErrorsWidgetSteps.getWidget().getByTestId('core-errors-local-only-checkbox');
12
16
  }
13
17
 
14
18
  static getInfoMessage() {
@@ -64,8 +64,10 @@ export class YasqeSteps {
64
64
  .should('be.visible');
65
65
  }
66
66
 
67
- static executeQueryWithoutWaiteResult() {
67
+ static executeQueryWithoutWaitingForResult() {
68
68
  this.clickExecuteQueryButtonAndHideTooltip();
69
+ // Make sure that the query is executed before Cypress continues.
70
+ YasqeSteps.getAbortQueryButton().should('be.visible');
69
71
  }
70
72
 
71
73
  static executeErrorQuery() {
@@ -142,4 +142,12 @@ export class YasrSteps extends BaseSteps {
142
142
  static toggleFullscreen() {
143
143
  YasrSteps.getFullscreenButton().click();
144
144
  }
145
+
146
+ static getGraphNavigatorButton() {
147
+ return YasrSteps.getYasr().find('.explore-graph-navigator');
148
+ }
149
+
150
+ static visualizeInGraphNavigator() {
151
+ YasrSteps.getGraphNavigatorButton().click();
152
+ }
145
153
  }
@@ -7,6 +7,10 @@ export class BrowserStubs {
7
7
  return isDefinition ? 'navigateToUrl' : '@navigateToUrl';
8
8
  }
9
9
 
10
+ static LINK_CLICKS_ALIAS = (isDefinition = false) => {
11
+ return isDefinition ? 'linkClicks' : '@linkClicks';
12
+ }
13
+
10
14
  static stubWindowOpen() {
11
15
  cy.window().then((win) => {
12
16
  cy.stub(win, 'open').as(BrowserStubs.WINDOW_OPEN_ALIAS(true))
@@ -18,4 +22,40 @@ export class BrowserStubs {
18
22
  cy.spy(win.singleSpa, 'navigateToUrl').as(BrowserStubs.NAVIGATE_TO_URL_ALIAS(true))
19
23
  })
20
24
  }
25
+
26
+ /**
27
+ * Checks what the browser would do with a clicked link, without following it.
28
+ *
29
+ * Use it for plain links (`<a href target="_blank">`) that the browser opens by itself. Such links do not call
30
+ * `window.open`, so {@link stubWindowOpen} cannot see them, and Cypress cannot follow a new window.
31
+ *
32
+ * For every clicked link it records:
33
+ * - `href`: the link address;
34
+ * - `target`: the link target, `_blank` for a new window;
35
+ * - `defaultPrevented`: `true` when the page handled the click itself, for example to navigate in the same window.
36
+ * The browser opens the link only when this is `false`.
37
+ *
38
+ * Then it stops the click, so the test stays on the same page.
39
+ *
40
+ * @example
41
+ * BrowserStubs.captureLinkClicks();
42
+ * cy.get('a.my-link').click();
43
+ * // The browser would open "cluster" in a new window.
44
+ * cy.get(BrowserStubs.LINK_CLICKS_ALIAS())
45
+ * .should('deep.equal', [{href: 'cluster', target: '_blank', defaultPrevented: false}]);
46
+ */
47
+ static captureLinkClicks() {
48
+ cy.window().then((win) => {
49
+ const clicks = [];
50
+ win.document.addEventListener('click', (event) => {
51
+ const link = event.target.closest('a');
52
+ if (!link) {
53
+ return;
54
+ }
55
+ clicks.push({href: link.getAttribute('href'), target: link.target, defaultPrevented: event.defaultPrevented});
56
+ event.preventDefault();
57
+ });
58
+ cy.wrap(clicks).as(BrowserStubs.LINK_CLICKS_ALIAS(true));
59
+ });
60
+ }
21
61
  }
@@ -77,6 +77,13 @@ export class ClusterStubs extends Stubs {
77
77
  }).as('cluster-config');
78
78
  }
79
79
 
80
+ static stubClusterConfigWithTag() {
81
+ cy.intercept('/rest/cluster/config', {
82
+ fixture: '/cluster/cluster-config-with-tag.json',
83
+ statusCode: 200
84
+ }).as('cluster-config-with-tag');
85
+ }
86
+
80
87
  static stubDeleteCluster() {
81
88
  cy.intercept('/rest/cluster/config?force=false', {
82
89
  fixture: '/cluster/delete-cluster.json',
@@ -132,7 +139,7 @@ export class ClusterStubs extends Stubs {
132
139
  added.forEach((node) => {
133
140
  response[node] = "Node was successfully added in the cluster.";
134
141
  });
135
- added.forEach((node) => {
142
+ removed.forEach((node) => {
136
143
  response[node] = "Node was successfully removed from the cluster.";
137
144
  });
138
145
 
@@ -210,6 +217,13 @@ export class ClusterStubs extends Stubs {
210
217
  }).as('3-nodes-cluster-group-status-tag');
211
218
  }
212
219
 
220
+ static stubClusterGroupStatusWithoutLeader() {
221
+ cy.intercept('/rest/cluster/group/status', {
222
+ fixture: '/cluster/3-nodes-cluster-group-status-no-leader.json',
223
+ statusCode: 200
224
+ }).as('3-nodes-cluster-group-status-no-leader');
225
+ }
226
+
213
227
  static stubDeleteTag(uri) {
214
228
  cy.intercept(`rest/cluster/config/tag`, {
215
229
  body: `"Removed primary tag '${uri}' from cluster`,
@@ -0,0 +1,27 @@
1
+ import {Stubs} from './stubs';
2
+
3
+ export class GraphNavigatorStubs extends Stubs {
4
+ /**
5
+ * Makes the full-text search of the Graph Navigator settings use the GraphDB autocomplete index.
6
+ */
7
+ static stubSettingsWithAutocomplete() {
8
+ cy.intercept('GET', '/rest/repositories/*/graph-navigator/settings', (req) => {
9
+ req.continue((res) => {
10
+ res.body.fullTextSearch.prefix = 'PREFIX auto: <http://www.ontotext.com/plugins/autocomplete#>';
11
+ });
12
+ }).as('graph-navigator-settings');
13
+ }
14
+
15
+ /**
16
+ * Aliases the SPARQL requests that look up entities by the given text as `entity-lookup`.
17
+ */
18
+ static spyEntityLookup(text) {
19
+ cy.intercept('POST', '/repositories/*', (req) => {
20
+ // The body is form-encoded (`query=...`), so decode it to match the SPARQL text.
21
+ const body = new URLSearchParams(String(req.body)).get('query') ?? '';
22
+ if (body.includes('SELECT ?inst ?class ?label WHERE') && body.includes(text)) {
23
+ req.alias = 'entity-lookup';
24
+ }
25
+ });
26
+ }
27
+ }
@@ -4,6 +4,10 @@ export class LicenseStubs {
4
4
  cy.intercept('GET', '/rest/graphdb-settings/license').as('get-license');
5
5
  }
6
6
 
7
+ static stubLicenseUnauthorized() {
8
+ cy.intercept('GET', '/rest/graphdb-settings/license', {statusCode: 401}).as('unauthorizedLicense');
9
+ }
10
+
7
11
  static stubFreeLicense() {
8
12
  cy.intercept('GET', '/rest/graphdb-settings/license', {
9
13
  statusCode: 200,
@@ -50,7 +54,6 @@ export class LicenseStubs {
50
54
  "productType": "enterprise",
51
55
  "licenseCapabilities": [
52
56
  "Lucene connector",
53
- "Solr connector",
54
57
  "Elasticsearch connector",
55
58
  "OpenSearch connector",
56
59
  "Kafka connector",
@@ -114,7 +117,6 @@ export class LicenseStubs {
114
117
  "OpenSearch connector",
115
118
  "Lucene connector",
116
119
  "Kafka connector",
117
- "Solr connector",
118
120
  "Cluster",
119
121
  "Elasticsearch connector"
120
122
  ],
@@ -140,7 +142,6 @@ export class LicenseStubs {
140
142
  "OpenSearch connector",
141
143
  "Lucene connector",
142
144
  "Kafka connector",
143
- "Solr connector",
144
145
  "Cluster",
145
146
  "Elasticsearch connector"
146
147
  ],
@@ -3,6 +3,14 @@ import {REPOSITORIES_URL} from '../../support/repository-commands';
3
3
  import {GlobalOperationsStatusesStub} from '../global-operations-statuses-stub.js';
4
4
  import repoTemplate from "../../fixtures/repo-template.json";
5
5
 
6
+ /**
7
+ * Returns the pattern that matches the request for the size of a repository, on any host and with any query.
8
+ *
9
+ * @param {string} repositoryId The id of the repository.
10
+ * @return {string} The pattern.
11
+ */
12
+ const getRepositorySizeUrl = (repositoryId) => `**${REPOSITORIES_URL}/${repositoryId}/size*`;
13
+
6
14
  export class RepositoriesStubs extends Stubs {
7
15
  static stubRepositories(withDelay = 0, fixture = '/repositories/get-repositories.json') {
8
16
  RepositoriesStubs.stubGetQueryResponse('/rest/repositories/all', fixture, 'get-all-repositories', withDelay);
@@ -20,6 +28,42 @@ export class RepositoriesStubs extends Stubs {
20
28
  cy.intercept('GET', '/rest/locations/active').as('getActiveLocations');
21
29
  }
22
30
 
31
+ static spyGetRepository(id) {
32
+ cy.intercept(`GET`, `${REPOSITORIES_URL}/${id}?location=`).as('getRepository');
33
+ }
34
+
35
+ /**
36
+ * Spies on the request for the size of a repository, without changing its response.
37
+ *
38
+ * @param {string} repositoryId The id of the repository.
39
+ * @param {string} alias The alias of the request, to wait for it with <code>cy.wait('@alias')</code>.
40
+ */
41
+ static spyGetRepositorySize(repositoryId, alias = 'getRepositorySize') {
42
+ cy.intercept('GET', getRepositorySizeUrl(repositoryId)).as(alias);
43
+ }
44
+
45
+ /**
46
+ * Records the requests for the size of a repository in a spy, without changing their response. Use it to check
47
+ * that the size was not requested: <code>cy.get('@alias').should('not.have.been.called')</code>.
48
+ *
49
+ * @param {string} repositoryId The id of the repository.
50
+ * @param {string} alias The alias of the spy.
51
+ */
52
+ static spyGetRepositorySizeCalls(repositoryId, alias = 'getRepositorySizeCalls') {
53
+ cy.intercept('GET', getRepositorySizeUrl(repositoryId), cy.spy().as(alias));
54
+ }
55
+
56
+ /**
57
+ * Makes the request for the size of a repository fail with a server error.
58
+ *
59
+ * @param {string} repositoryId The id of the repository.
60
+ * @param {string} alias The alias of the request, to wait for it with <code>cy.wait('@alias')</code>.
61
+ */
62
+ static stubGetRepositorySizeError(repositoryId, alias = 'getRepositorySizeError') {
63
+ cy.intercept('GET', getRepositorySizeUrl(repositoryId),
64
+ {statusCode: 500, body: 'Internal Server Error'}).as(alias);
65
+ }
66
+
23
67
  static stubLocations(withDelay = 0) {
24
68
  RepositoriesStubs.stubQueryResponse('/rest/locations', '/repositories/get-locations.json', 'get-locations', withDelay);
25
69
  }
@@ -225,6 +225,11 @@ export class QueryStubs {
225
225
  static interceptSavedQueryCreation() {
226
226
  cy.intercept('POST', '/rest/sparql/saved-queries').as('saveQuery');
227
227
  }
228
+
229
+ static spyAbortQuery() {
230
+ cy.intercept('DELETE', /\/rest\/monitor\/repository\/[^/]+\/query\?query=yasgui-component-.*/)
231
+ .as('abortQuery');
232
+ }
228
233
  }
229
234
 
230
235
  export class QueryStubDescription {
@@ -19,6 +19,25 @@ Cypress.Commands.add('searchEasyVisualGraph', (searchGraph) => {
19
19
  });
20
20
  });
21
21
 
22
+ Cypress.Commands.add('createGraphConfig', (name, repositoryId, secured = false) => {
23
+ let headers = {'Content-Type': 'application/json', 'X-GraphDB-Repository': repositoryId};
24
+ if (secured) {
25
+ headers = {...headers, 'Authorization': Cypress.env('adminToken')};
26
+ }
27
+ return cy.request({
28
+ method: 'POST',
29
+ url: GRAPH_CONFIG_URL,
30
+ headers,
31
+ body: {
32
+ name,
33
+ startMode: 'search',
34
+ startQueryIncludeInferred: true,
35
+ startQuerySameAs: true,
36
+ shared: false
37
+ }
38
+ });
39
+ });
40
+
22
41
  Cypress.Commands.add('deleteGraphConfig', (name) => {
23
42
  cy.request({
24
43
  method: 'GET',
@@ -1,137 +0,0 @@
1
- import HomeSteps from '../../../steps/home-steps.js';
2
- import {DeprecationSteps} from '../../../steps/deprecation-steps.js';
3
- import {LoginSteps} from '../../../steps/login-steps.js';
4
- import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
5
- import {GuideSteps} from '../../../steps/guides/guide-steps.js';
6
- import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
7
-
8
- describe('Solr deprecation banner', () => {
9
- context('Security disabled', () => {
10
- it('should keep the Solr deprecation banner hidden after the anonymous user dismisses it', () => {
11
- // GIVEN: I have opened the application with security disabled.
12
- HomeSteps.visit();
13
-
14
- // THEN: I expect the Solr deprecation banner to be visible.
15
- DeprecationSteps.getDeprecationBanner()
16
- .should('be.visible')
17
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
18
-
19
- // WHEN: I dismiss the Solr deprecation banner.
20
- DeprecationSteps.closeBanner();
21
- // THEN: I expect the Solr deprecation banner to be hidden.
22
- DeprecationSteps.getDeprecationBanner().should('not.exist');
23
-
24
- // WHEN: I reload the application.
25
- HomeSteps.visit();
26
- // THEN: I expect the Solr deprecation banner to remain hidden.
27
- DeprecationSteps.getDeprecationBanner().should('not.exist');
28
- });
29
- });
30
-
31
- context('Security enabled', () => {
32
- const PASSWORD = 'root';
33
- const USER_USERNAME = 'username';
34
-
35
- beforeEach(() => {
36
- cy.createUser({
37
- username: USER_USERNAME,
38
- password: PASSWORD
39
- });
40
-
41
- cy.switchOnSecurity()
42
- .then(() => cy.loginAsAdmin())
43
- .then(() => cy.switchOnFreeAccess(true));
44
- });
45
-
46
- afterEach(() => {
47
- cy.loginAsAdmin()
48
- .then(() => {
49
- cy.deleteUser(USER_USERNAME, true);
50
- cy.switchOffFreeAccess(true);
51
- cy.switchOffSecurity(true);
52
- });
53
- });
54
-
55
- it('should persist separate Solr banner states for anonymous and logged-in users', () => {
56
- // GIVEN: Security and free access are enabled, and no user is logged in.
57
- HomeSteps.visit();
58
-
59
- // THEN: I expect the Solr deprecation banner to be visible for the anonymous user.
60
- DeprecationSteps.getDeprecationBanner()
61
- .should('be.visible')
62
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
63
-
64
- // WHEN: The anonymous user dismisses the banner.
65
- DeprecationSteps.closeBanner();
66
- // THEN: I expect the banner to be hidden for the anonymous user.
67
- DeprecationSteps.getDeprecationBanner().should('not.exist');
68
-
69
- // WHEN: I log in as a user who has not dismissed the banner.
70
- cy.loginAs(USER_USERNAME, PASSWORD);
71
- HomeSteps.visit();
72
-
73
- // THEN: I expect the banner to be visible for the logged-in user.
74
- DeprecationSteps.getDeprecationBanner()
75
- .should('be.visible')
76
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
77
-
78
- // WHEN: The logged-in user dismisses the banner.
79
- DeprecationSteps.closeBanner();
80
- // THEN: I expect the banner to be hidden for the logged-in user.
81
- DeprecationSteps.getDeprecationBanner().should('not.exist');
82
-
83
- // WHEN: The user logs out.
84
- LoginSteps.logout();
85
- // THEN: I expect the banner to remain hidden because the anonymous user has already dismissed it.
86
- DeprecationSteps.getDeprecationBanner().should('not.exist');
87
-
88
- // WHEN: I log in as the administrator, who has not dismissed the banner.
89
- cy.loginAs('admin', 'root');
90
- HomeSteps.visit();
91
- // THEN: I expect the banner to be visible for the administrator.
92
- DeprecationSteps.getDeprecationBanner()
93
- .should('be.visible')
94
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
95
-
96
- // WHEN: The administrator logs out.
97
- LoginSteps.logout();
98
- // THEN: I expect the banner to remain hidden because the anonymous user has already dismissed it.
99
- DeprecationSteps.getDeprecationBanner().should('not.exist');
100
-
101
- // WHEN: I log in again as the user who previously dismissed the banner.
102
- cy.loginAs(USER_USERNAME, PASSWORD);
103
- HomeSteps.visit();
104
- // THEN: I expect the banner to remain hidden for the logged-in user.
105
- DeprecationSteps.getDeprecationBanner().should('not.exist');
106
- });
107
- });
108
-
109
- context('User guides', () => {
110
- it('should hide the Solr deprecation banner while a guide is running', () => {
111
- // GIVEN: The guides are loaded and ready to be started.
112
- GuidesStubs.stubMainMenuGuide();
113
- GuideSteps.visit();
114
- GuideSteps.verifyGuidesListExists();
115
- cy.wait('@getGuides');
116
-
117
- // WHEN: I am on an application page, and the Solr deprecation banner has not been dismissed by the current user.
118
- // THEN: I expect the Solr deprecation banner to be visible because it has not been dismissed by the current user.
119
- DeprecationSteps.getDeprecationBanner()
120
- .should('be.visible')
121
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
122
-
123
- // WHEN: I start a guide.
124
- GuideSteps.runFirstGuide();
125
- // THEN: I expect the Solr deprecation banner to be hidden while the guide is running.
126
- DeprecationSteps.getDeprecationBanner().should('not.exist');
127
-
128
- // WHEN: I cancel the guide.
129
- GuideDialogSteps.clickOnCancelButton();
130
- GuideDialogSteps.clickConfirmCancelDialogExitButton();
131
- // THEN: I expect the Solr deprecation banner to be visible again.
132
- DeprecationSteps.getDeprecationBanner()
133
- .should('be.visible')
134
- .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
135
- });
136
- });
137
- });
@@ -1,32 +0,0 @@
1
- @prefix ex: <http://example.com/> .
2
- @prefix dct: <http://purl.org/dc/terms/> .
3
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
4
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
5
- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
6
-
7
-
8
- graph ex:rdfstar {
9
- ex:bob foaf:knows << ex:alice foaf:knows<<ex:bob dct:created ex:book>> >> .
10
-
11
- <<<< ex:bob dct:created ex:book >> foaf:knows ex:alice >> dct:source ex:otherbook .
12
-
13
- ex:bobshomepage dct:source<< ex:book dct:creator ex:alice >> .
14
-
15
- << ex:book dct:creator ex:alice >> dct:source ex:bobshomepage .
16
-
17
- << ex:book dct:creator ex:alice >> dct:requires << ex:alice dct:created ex:book >> .
18
-
19
- <<<http://example.org/a>ex:b ex:c>>ex:valid "1999-08-16"^^xsd:date .
20
-
21
- << # Start of triple
22
- ex:bob # triple subject
23
- foaf:birthday # triple predicate
24
- "1908-03-18"^^xsd:date # triple object
25
- >> # end of triple
26
- dct:source ex:bobshomepage .
27
-
28
- << ex:book dct:title "Example book"@en >> dct:source ex:bobshomepage .
29
- << ex:book dct:title "Beispielbuch"@de>> dct:source ex:bobshomepage.
30
- << ex:book dct:title "Example Book"@en-US>> dct:source ex:bobshomepage.
31
-
32
- }
@@ -1,6 +0,0 @@
1
- @prefix ex:<http:/base.org/> .
2
-
3
- ex:foo ex:pred ex:obj .
4
- <<ex:foo rdfs:label "label">> ex:author "guest" .
5
- ex:obj ex:quote <<ex:meta ex:data ex:foo>> .
6
- <<<<ex:foo rdfs:label "label">> ex:data ex:foo>> ex:recursive true .
@@ -1,77 +0,0 @@
1
- @prefix foaf: <http://xmlns.com/foaf/0.1/> .
2
- @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
3
- @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
4
- @prefix dc: <http://purl.org/dc/terms/> .
5
- @prefix re: <http://reasoner.example.com/engines#> .
6
- @prefix rr: <http://reasoner.example.com/rules#> .
7
- @prefix rv: <http://reasoner.example.com/vocabulary#> .
8
- @prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
9
- @prefix bd: <http://bigdata.com/RDF#> .
10
-
11
- bd:alice
12
- rdf:type foaf:Person ;
13
- foaf:name "Alice" ;
14
- foaf:mbox <mailto:alice@work> ;
15
- foaf:knows bd:bob.
16
-
17
- # The terse syntax:
18
- <<bd:alice foaf:mbox <mailto:alice@work>>>
19
- dc:source <http://hr.example.com/employees#bob> ;
20
- dc:created "2012-02-05T12:34:00Z"^^xsd:dateTime .
21
- # The expanded syntax.
22
- #_:s1 rdf:subject bd:alice .
23
- #_:s1 rdf:predicate foaf:mbox .
24
- #_:s1 rdf:object <mailto:alice@work> .
25
- #_:s1 rdf:type rdf:Statement .
26
- #_:s1 dc:source <http://hr.example.com/employees#bob> ;
27
- # dc:created "2012-02-05T12:34:00Z"^^xsd:dateTime .
28
-
29
- # Terse
30
- <<bd:alice foaf:knows bd:bob>>
31
- dc:source re:engine_1;
32
- rv:rule rr:rule524 ;
33
- rv:confidence 0.9835 .
34
- # Expanded
35
- #_:s2 rdf:subject bd:alice .
36
- #_:s2 rdf:predicate foaf:knows .
37
- #_:s2 rdf:object bd:bob .
38
- #_:s2 rdf:type rdf:Statement .
39
- #_:s2
40
- # dc:source re:engine_1;
41
- # rv:rule rr:rule524 ;
42
- # rv:confidence 0.9835 .
43
-
44
- bd:bob
45
- rdf:type foaf:Person ;
46
- foaf:name "Bob" ;
47
- foaf:knows bd:alice ;
48
- foaf:mbox <mailto:bob@work> ;
49
- foaf:mbox <mailto:bob@home> .
50
-
51
- # Terse
52
- <<bd:bob foaf:mbox <mailto:bob@home>>>
53
- dc:creator <http://hr.example.com/infra/crawlers#we1> ;
54
- dc:created "2012-02-05T12:34:00Z"^^xsd:dateTime ;
55
- dc:source <http://whatever.nu/profile/bob1975> .
56
- # Expanded
57
- #_:s3 rdf:subject bd:bob .
58
- #_:s3 rdf:predicate foaf:mbox .
59
- #_:s3 rdf:object <mailto:bob@home> .
60
- #_:s3 rdf:type rdf:Statement .
61
- #_:s3
62
- # dc:creator <http://hr.example.com/infra/crawlers#we1> ;
63
- # dc:created "2011-04-05T12:00:00Z"^^xsd:dateTime ;
64
- # dc:source <http://whatever.nu/profile/bob1975> .
65
-
66
- # Terse
67
- <<bd:bob foaf:mbox <mailto:bob@home>>>
68
- dc:source <http://hr.example.com/employees/bob> ;
69
- dc:created "2012-02-05T12:34:00Z"^^xsd:dateTime .
70
- # Expanded
71
- #_:s4 rdf:subject bd:bob .
72
- #_:s4 rdf:predicate foaf:mbox .
73
- #_:s4 rdf:object <mailto:bob@home> .
74
- #_:s4 rdf:type rdf:Statement .
75
- #_:s4
76
- # dc:source <http://hr.example.com/employees/bob> ;
77
- # dc:created "2012-02-05T12:34:00Z"^^xsd:dateTime .
@@ -1,13 +0,0 @@
1
- export class DeprecationSteps {
2
- static getDeprecationBanner() {
3
- return cy.get('onto-deprecation-banner');
4
- }
5
-
6
- static getCloseButton() {
7
- return DeprecationSteps.getDeprecationBanner().find('.close-button');
8
- }
9
-
10
- static closeBanner() {
11
- DeprecationSteps.getCloseButton().click();
12
- }
13
- }
@@ -1,13 +0,0 @@
1
- export class DeprecationSteps {
2
- static getDeprecationBanner() {
3
- return cy.get('onto-deprecation-banner');
4
- }
5
-
6
- static getCloseButton() {
7
- return DeprecationSteps.getDeprecationBanner().find('.close-button');
8
- }
9
-
10
- static closeBanner() {
11
- DeprecationSteps.getCloseButton().click();
12
- }
13
- }