graphdb-workbench-tests 2.5.1 → 2.6.0-RC2

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 (114) hide show
  1. package/fixtures/graphdb-import/resource-test-data.ttl +99 -0
  2. package/fixtures/graphql-editor/default-query-response.json +517 -0
  3. package/fixtures/guides/guides.json +764 -0
  4. package/fixtures/guides/movies.ttl +629 -0
  5. package/fixtures/guides/starwars.ttl +4384 -0
  6. package/fixtures/locale-en.json +53 -12
  7. package/fixtures/namespaces/ontotext-generated-namespace.json +22 -0
  8. package/fixtures/queries/empty-query-response.json +11 -0
  9. package/integration/cluster/cluster-management.spec.js +1 -2
  10. package/integration/explore/graphs.overview.spec.js +4 -2
  11. package/integration/explore/similariti-index-create.spec.js +333 -0
  12. package/integration/explore/similarity-index.spec.js +88 -0
  13. package/integration/explore/similarity.spec.js +180 -56
  14. package/integration/explore/visual-graph/graphs-config.spec.js +453 -0
  15. package/integration/explore/{visual.graph.spec.js → visual-graph/visual.graph.spec.js} +146 -347
  16. package/integration/guides/movies-interactive-guide.spec.js +73 -0
  17. package/integration/guides/star-wars-interactive-guide.js +60 -0
  18. package/integration/home/language-change.spec.js +3 -3
  19. package/integration/import/import.user.data.spec.js +2 -0
  20. package/integration/resource/resource.spec.js +357 -0
  21. package/integration/setup/aclmanagement/create-rule.spec.js +88 -11
  22. package/integration/setup/aclmanagement/delete-rule.spec.js +6 -4
  23. package/integration/setup/aclmanagement/edit-rule.spec.js +13 -8
  24. package/integration/setup/aclmanagement/render-rules.spec.js +4 -2
  25. package/integration/setup/aclmanagement/reorder-rules.spec.js +5 -3
  26. package/integration/setup/aclmanagement/revert-rules.spec.js +4 -3
  27. package/integration/setup/aclmanagement/scopes.spec.js +228 -0
  28. package/integration/setup/aclmanagement/update-rules.spec.js +17 -9
  29. package/integration/setup/jdbc-create.spec.js +330 -0
  30. package/integration/setup/jdbc.spec.js +78 -154
  31. package/integration/setup/my-settings.spec.js +9 -41
  32. package/integration/setup/sparql-template-create.js +150 -0
  33. package/integration/setup/sparql-templates.spec.js +82 -146
  34. package/integration/sparql-editor/actions/execute-query.spec.js +44 -0
  35. package/integration/sparql-editor/actions/expand-results-over-sameas.spec.js +136 -0
  36. package/integration/sparql-editor/actions/include-inferred-statements.spec.js +100 -0
  37. package/integration/sparql-editor/actions/inferred-sameas.spec.js +47 -0
  38. package/integration/sparql-editor/actions/save-query.spec.js +70 -0
  39. package/integration/sparql-editor/actions/show-saved-queries.spec.js +61 -0
  40. package/integration/sparql-editor/internationalization.spec.js +41 -0
  41. package/integration/sparql-editor/saved-query/abort-query.spec.js +51 -0
  42. package/integration/sparql-editor/saved-query/delete-query.spec.js +56 -0
  43. package/integration/sparql-editor/saved-query/edit-query.spec.js +68 -0
  44. package/integration/sparql-editor/saved-query/share-query.spec.js +78 -0
  45. package/integration/sparql-editor/sparql-editor.spec.js +55 -0
  46. package/integration/sparql-editor/yasgui-tabs.spec.js +107 -0
  47. package/integration/sparql-editor/yasr/download-as.spec.js +54 -0
  48. package/integration/sparql-editor/yasr/pagination.spec.js +234 -0
  49. package/integration/sparql-editor/yasr/table-plugin.spec.js +39 -0
  50. package/integration/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +57 -0
  51. package/integration-flaky/explore/visual.graph.spec.js +3 -2
  52. package/integration-flaky/setup/sparql-template-create.js +139 -0
  53. package/integration-flaky/sparql-editor/actions/execute-update-query.spec.js +89 -0
  54. package/integration-flaky/sparql-editor/actions/share-query.spec.js +84 -0
  55. package/integration-flaky/sparql-editor/lucene-connector.spec.js +62 -0
  56. package/integration-flaky/sparql-editor/plugins/error-plugin.spec.js +83 -0
  57. package/integration-flaky/sparql-editor/yasr/table-plugin.spec.js +81 -0
  58. package/package.json +3 -1
  59. package/steps/application-steps.js +5 -0
  60. package/steps/autocomplete-steps.js +10 -0
  61. package/steps/error-steps.js +9 -0
  62. package/steps/explore/graphs-overview-steps.js +24 -0
  63. package/steps/explore/similarity-index-create-steps.js +113 -0
  64. package/steps/explore/similarity-indexes-steps.js +18 -0
  65. package/steps/guides/guide-dialog-steps.js +38 -0
  66. package/steps/guides/guide-steps.js +278 -0
  67. package/steps/guides/movies-guide-steps.js +241 -0
  68. package/steps/guides/star-wars-guide-steps.js +188 -0
  69. package/steps/import-steps.js +16 -0
  70. package/steps/language-selector-steps.js +22 -0
  71. package/steps/loader-steps.js +10 -0
  72. package/steps/lucene-connector-steps.js +43 -0
  73. package/steps/main-menu-steps.js +67 -0
  74. package/steps/repository-selector-steps.js +26 -0
  75. package/steps/repository-steps.js +4 -0
  76. package/steps/resource/resource-edit-steps.js +111 -0
  77. package/steps/resource/resource-steps.js +149 -0
  78. package/steps/setup/acl-management-steps.js +201 -39
  79. package/steps/setup/jdbc-create-steps.js +97 -0
  80. package/steps/setup/jdbc-steps.js +42 -0
  81. package/steps/setup/sparql-create-update-steps.js +55 -0
  82. package/steps/setup/sparql-templates-steps.js +38 -0
  83. package/steps/sparql-editor-steps.js +20 -0
  84. package/steps/sparql-steps.js +0 -6
  85. package/steps/visual-graph-steps.js +365 -6
  86. package/steps/yasgui/confirmation-dialog-steps.js +13 -0
  87. package/steps/yasgui/pagination-steps.js +47 -0
  88. package/steps/yasgui/plugin/error-plugin-steps.js +30 -0
  89. package/steps/yasgui/save-query-dialog.js +61 -0
  90. package/steps/yasgui/saved-queries-dialog.js +29 -0
  91. package/steps/yasgui/saved-query.js +25 -0
  92. package/steps/yasgui/share-saved-query-dialog.js +25 -0
  93. package/steps/yasgui/table-plugin-steps.js +29 -0
  94. package/steps/yasgui/yasgui-loader.js +10 -0
  95. package/steps/yasgui/yasgui-steps.js +191 -0
  96. package/steps/yasgui/yasqe-steps.js +187 -0
  97. package/steps/yasgui/yasr-steps.js +108 -0
  98. package/stubs/namespace-stubs.js +10 -0
  99. package/stubs/repositories-stub.js +58 -0
  100. package/stubs/security-stubs.js +69 -0
  101. package/stubs/yasgui/connectors-stubs.js +12 -0
  102. package/stubs/yasgui/query-stubs.js +253 -0
  103. package/support/index.js +3 -0
  104. package/support/repository-commands.js +5 -5
  105. package/support/sparql-commands.js +1 -1
  106. package/support/visual-graph-commands.js +25 -0
  107. package/integration/sparql/main.menu.spec.js +0 -232
  108. package/integration/sparql/sparql-error-handling.spec.js +0 -74
  109. package/integration/sparql/sparql-language-change.spec.js +0 -58
  110. package/integration/sparql/sparql-result-formating.spec.js +0 -84
  111. package/integration/sparql/sparql.menu.spec.js +0 -1253
  112. package/integration-flaky/setup/sparql-templates.spec.js +0 -125
  113. package/integration-flaky/sparql/sparql-language-change.spec.js +0 -45
  114. package/integration-flaky/sparql/sparql.menu.spec.js +0 -75
@@ -1,125 +0,0 @@
1
- describe('SPARQL Templates', () => {
2
-
3
- let repositoryId;
4
- const TEMPLATE_NAME = "http://example.com/salary_template";
5
- const SPARQL_TEMPLATE = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
6
- "PREFIX factory: <http://factory/>\n" +
7
- "PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>\n" +
8
- "PREFIX spif: <http://spinrdf.org/spif#>\n" +
9
- "INSERT {\n" +
10
- "?id <http://factory/updatedOn> \"2021-10-01T07:55:38.238Z\"^^xsd:dateTime .\n" +
11
- "?split spif:split (\"blaaa/blaa\" \"/\")\n" +
12
- "} WHERE {\n" +
13
- "?id rdf:type <http://factory/Factory> .\n" +
14
- "?worker <http://factory/worksIn> ?id .\n" +
15
- "?worker <http://factory/hasSalary> ?oldSalary .\n" +
16
- "FILTER regex(STR(?id), \"fac\", \"i\")\n" +
17
- "?split spif:split (\"blaaa/blaa\" \"/\")\n" +
18
- "bind(now() as ?now)\n" +
19
- "}";
20
- const DEFAULT_QUERY = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n" +
21
- "PREFIX ex: <http://example.com#>\n" +
22
- "DELETE {\n" +
23
- " ?subject ex:myPredicate ?oldValue .\n" +
24
- "} INSERT {\n" +
25
- " ?subject ex:myPredicate ?newValue .\n" +
26
- "} WHERE {\n" +
27
- " ?id rdf:type ex:MyType .\n" +
28
- " ?subject ex:isRelatedTo ?id .\n" +
29
- "}\n";
30
-
31
- before(() => {
32
- repositoryId = 'sparql-templates-repo' + Date.now();
33
- cy.createRepository({id: repositoryId});
34
- });
35
-
36
- beforeEach(() => {
37
- cy.visit('/sparql-templates', {
38
- onBeforeLoad: (win) => {
39
- win.localStorage.setItem('ls.repository-id', repositoryId);
40
- }
41
- });
42
- cy.window()
43
- .then(() => getTemplatesTable().scrollIntoView().should('be.visible'));
44
- });
45
-
46
- after(() => {
47
- cy.deleteRepository(repositoryId);
48
- });
49
-
50
- it('Should create/edit/delete a SPARQL template', () => {
51
- // The test is flaky because it depends on an asynchronous DB insert which can not be easily observed from the UI
52
- //Click create template button
53
- getCreateSparqlTemplateButton().click();
54
- cy.waitUntilQueryIsVisible();
55
- //Type a valid Template IRI value in the filed
56
- getTemplateNameField().type(TEMPLATE_NAME);
57
- //Paste new template query and verify content
58
- cy.pasteQuery(SPARQL_TEMPLATE);
59
- verifyQueryAreaEquals(SPARQL_TEMPLATE);
60
- getSaveButton()
61
- .scrollIntoView()
62
- .click()
63
- .then(() => {
64
- cy.waitUntil(() =>
65
- cy.get('.edit-query-btn')
66
- .then((editBtn) => editBtn));
67
- });
68
- //Verify new template is stored in the templates table
69
- getTemplatesTable().should('be.visible').and('contain', TEMPLATE_NAME);
70
- //Edit template
71
- getEditTemplateButton(TEMPLATE_NAME);
72
- cy.waitUntilQueryIsVisible();
73
- verifyQueryAreaEquals(SPARQL_TEMPLATE);
74
- //Change query to the default template again
75
- cy.pasteQuery(DEFAULT_QUERY);
76
- verifyQueryAreaEquals(DEFAULT_QUERY);
77
- getSaveButton()
78
- .click()
79
- .then(() => {
80
- cy.waitUntil(() => cy.get('.edit-query-btn').should('be.visible'));
81
- });
82
- //Verify change to default template is persisted
83
- getEditTemplateButton(TEMPLATE_NAME);
84
- cy.waitUntilQueryIsVisible();
85
- verifyQueryAreaEquals(DEFAULT_QUERY);
86
- });
87
-
88
- function getTemplatesTable() {
89
- return cy.get('.sparql-templates-list');
90
- }
91
-
92
- function getCreateSparqlTemplateButton() {
93
- return cy.get('.clearfix .create-sql-table-configuration');
94
- }
95
-
96
- function getTemplateNameField() {
97
- return cy.get('.sparql-template-name');
98
- }
99
-
100
- function verifyQueryAreaEquals(query) {
101
- // Using the CodeMirror instance because getting the value from the DOM is very cumbersome
102
- getQueryArea().should((codeMirrorEl) => {
103
- const cm = codeMirrorEl[0].CodeMirror;
104
- expect(cm.getValue().trim()).to.equal(query.trim());
105
- });
106
- }
107
-
108
- function getQueryArea() {
109
- return cy.get('#queryEditor .CodeMirror');
110
- }
111
-
112
- function getSaveButton() {
113
- return cy.get('.save-query-btn');
114
- }
115
-
116
- function getEditTemplateButton(templateName) {
117
- return cy.get('#configurations-table tr')
118
- .contains(templateName)
119
- .parent()
120
- .parent()
121
- .within(() => {
122
- cy.get('.icon-edit').click();
123
- });
124
- }
125
- });
@@ -1,45 +0,0 @@
1
- import SparqlSteps from '../../steps/sparql-steps';
2
-
3
- describe('YASQE and YASR language change validation', () => {
4
- let repositoryId;
5
-
6
- beforeEach(() => {
7
- repositoryId = 'sparql-' + Date.now();
8
- SparqlSteps.createRepoAndVisit(repositoryId);
9
- });
10
-
11
- afterEach(() => {
12
- // Change the language back to English
13
- SparqlSteps.changeLanguage('en');
14
-
15
- cy.deleteRepository(repositoryId);
16
- });
17
-
18
- context('Default language should be active and language change should affect labels', () => {
19
- it('should change labels in SPARQL results view', function () {
20
- SparqlSteps.selectSavedQuery('Add statements');
21
- SparqlSteps.executeQuery();
22
- SparqlSteps.selectSavedQuery('SPARQL Select template');
23
- SparqlSteps.executeQuery();
24
-
25
- // Go to Results only view
26
- SparqlSteps.getResultsOnlyBtn().click();
27
-
28
- // Check some labels are in default language
29
- SparqlSteps.getTabWithTableText().should('contain', 'Table');
30
- SparqlSteps.getTabWithRawResponseText().should('contain', 'Raw Response');
31
- SparqlSteps.getTabWithPivotTableText().should('contain', 'Pivot Table');
32
- SparqlSteps.getTabWithGoogleChartText().should('contain', 'Google Chart');
33
- SparqlSteps.getResultsDescription().should('contain', 'Showing results from');
34
-
35
- SparqlSteps.changeLanguage('fr');
36
-
37
- // The text in the labels should change
38
- SparqlSteps.getTabWithTableText().should('contain', 'Tableau');
39
- SparqlSteps.getTabWithRawResponseText().should('contain', 'Réponse brute');
40
- SparqlSteps.getTabWithPivotTableText().should('contain', 'Table de pivotement');
41
- SparqlSteps.getTabWithGoogleChartText().should('contain', 'Graphique Google');
42
- SparqlSteps.getResultsDescription().should('contain', 'Liste de résultats de');
43
- });
44
- });
45
- })
@@ -1,75 +0,0 @@
1
- import SparqlSteps from '../../steps/sparql-steps';
2
-
3
- describe('SPARQL screen validation', () => {
4
- let repositoryId;
5
-
6
- const DEFAULT_QUERY = 'select * where { \n' +
7
- '\t?s ?p ?o .\n' +
8
- '} limit 100';
9
-
10
- afterEach(() => {
11
- cy.deleteRepository(repositoryId);
12
- });
13
-
14
- context('SPARQL queries & filtering', () => {
15
- beforeEach(() => {
16
- repositoryId = 'sparql-' + Date.now();
17
- SparqlSteps.createRepoAndVisit(repositoryId)
18
- });
19
-
20
- it('Test execute query with and without "Including inferred" selected', () => {
21
- let insertQuery = 'INSERT DATA { <urn:a> <http://a/b> <urn:b> . <urn:b> <http://a/b> <urn:c> . }';
22
-
23
- cy.pasteQuery(insertQuery);
24
- SparqlSteps.executeQuery();
25
-
26
- getUpdateMessage().should('be.visible');
27
- getResultsWrapper().should('not.be.visible');
28
-
29
- // Should be enabled by default
30
- getInferenceButton()
31
- .find('.icon-inferred-on')
32
- .should('be.visible');
33
-
34
- cy.pasteQuery(DEFAULT_QUERY);
35
- SparqlSteps.executeQuery();
36
-
37
- // Confirm that all statements are available (70 from ruleset, 2 explicit and 2 inferred)
38
- getResultsWrapper().should('be.visible');
39
-
40
- verifyResultsPageLength(74);
41
-
42
- // Uncheck ‘Include inferred’
43
- cy.waitUntil(() =>
44
- getInferenceButton().find('.icon-inferred-on')
45
- .then(infBtn => infBtn && cy.wrap(infBtn).click()))
46
- .then(() =>
47
- cy.get('.icon-inferred-off').should('be.visible'));
48
-
49
- // Confirm that only inferred statements (only 2) are available
50
- SparqlSteps.executeQuery();
51
- verifyResultsPageLength(2);
52
- });
53
- });
54
-
55
- function getTableResultRows() {
56
- return getResultsWrapper().find('.resultsTable tbody tr');
57
- }
58
-
59
- function verifyResultsPageLength(resultLength) {
60
- getTableResultRows()
61
- .should('have.length', resultLength);
62
- }
63
-
64
- function getUpdateMessage() {
65
- return cy.get('#yasr-inner .alert-info.update-info');
66
- }
67
-
68
- function getResultsWrapper() {
69
- return cy.get('#yasr-inner .yasr_results');
70
- }
71
-
72
- function getInferenceButton() {
73
- return cy.get('#inference').scrollIntoView();
74
- }
75
- });