graphdb-workbench-tests 3.1.0-WBM-8 → 3.1.0-plugins1

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 (124) hide show
  1. package/.nycrc +10 -0
  2. package/cypress-legacy.config.js +9 -1
  3. package/cypress-security.config.js +40 -0
  4. package/cypress.config.js +3 -1
  5. package/e2e-flaky/import/import-user-data-url.spec.js +63 -0
  6. package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +44 -0
  7. package/e2e-legacy/explore/class-hierarchy/class.hierarchy.spec.js +1 -2
  8. package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +2 -3
  9. package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +5 -18
  10. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +1 -2
  11. package/e2e-legacy/graphql/activate-deactivate-graphql-endpoint.spec.js +1 -1
  12. package/e2e-legacy/graphql/create-graphql-endpoint.spec.js +1 -3
  13. package/e2e-legacy/graphql/delete-graphql-endpoint.spec.js +1 -1
  14. package/e2e-legacy/graphql/edit-graphql-enpoint.spec.js +1 -1
  15. package/e2e-legacy/graphql/export-graphql-endpoint-definition.spec.js +1 -1
  16. package/e2e-legacy/graphql/filter-graphql-endpoints-on-management-view.spec.js +2 -2
  17. package/e2e-legacy/graphql/graphql-endpoint-management-view.spec.js +5 -5
  18. package/e2e-legacy/graphql/graphql-playground.spec.js +1 -1
  19. package/e2e-legacy/graphql/import-graphql-endpoint-definitions.spec.js +1 -7
  20. package/e2e-legacy/graphql/set-default-graphql-endpoint.spec.js +1 -1
  21. package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
  22. package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
  23. package/e2e-legacy/{guides → help/guides}/movies-interactive-guide.spec.js +2 -2
  24. package/e2e-legacy/{guides → help/guides}/star-wars-interactive-guide.js +2 -2
  25. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
  26. package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
  27. package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
  28. package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
  29. package/e2e-legacy/home/cookie-policy.spec.js +78 -59
  30. package/e2e-legacy/home/create-repository.spec.js +2 -6
  31. package/e2e-legacy/home/documentation-link.spec.js +31 -33
  32. package/e2e-legacy/home/google-analytics.spec.js +4 -6
  33. package/e2e-legacy/home/rdf-resource-search.spec.js +106 -138
  34. package/e2e-legacy/home/view-resource-autocomplete.spec.js +30 -21
  35. package/e2e-legacy/import/import-server-files-batch-operations.spec.js +1 -2
  36. package/e2e-legacy/import/import-server-files.spec.js +1 -2
  37. package/e2e-legacy/import/import-user-data-url.spec.js +1 -25
  38. package/e2e-legacy/import/import-user-data.spec.js +4 -2
  39. package/e2e-legacy/import/import-view.spec.js +1 -2
  40. package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -9
  41. package/e2e-legacy/repository/attach-remote-location.spec.js +2 -5
  42. package/e2e-legacy/repository/ontop-repository.spec.js +3 -12
  43. package/e2e-legacy/repository/repositories.spec.js +35 -46
  44. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -2
  45. package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -2
  46. package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -2
  47. package/e2e-legacy/setup/aclmanagement/scopes.spec.js +1 -2
  48. package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
  49. package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
  50. package/e2e-legacy/setup/{autocomplete.spec.js → autocomplete/autocomplete.spec.js} +5 -6
  51. package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
  52. package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
  53. package/e2e-legacy/setup/connectors-lucene.spec.js +1 -2
  54. package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +2 -2
  55. package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
  56. package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
  57. package/e2e-legacy/setup/{namespaces.spec.js → namespaces/namespaces.spec.js} +4 -4
  58. package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
  59. package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
  60. package/e2e-legacy/setup/{plugins.spec.js → plugins/plugins.spec.js} +3 -3
  61. package/e2e-legacy/setup/sparql-template/sparql-template-create.js +10 -3
  62. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +38 -9
  63. package/e2e-legacy/sparql-editor/saved-query/edit-query.spec.js +3 -6
  64. package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +7 -13
  65. package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +2 -4
  66. package/e2e-legacy/sparql-editor/sparql-editor.spec.js +1 -4
  67. package/e2e-legacy/ttyg/agent-list.spec.js +38 -6
  68. package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
  69. package/e2e-legacy/ttyg/clone-agent.spec.js +1 -0
  70. package/e2e-legacy/ttyg/create-agent.spec.js +10 -16
  71. package/e2e-legacy/ttyg/edit-agent.spec.js +69 -9
  72. package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
  73. package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +45 -0
  74. package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
  75. package/e2e-legacy/ttyg/ttyg-permission.spec.js +28 -20
  76. package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -1
  77. package/e2e-security/setup/home/cookie-policy.spec.js +64 -0
  78. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +184 -0
  79. package/e2e-security/setup/users-and-access/graphql-user.spec.js +123 -0
  80. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +69 -0
  81. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +87 -0
  82. package/e2e-security/setup/users-and-access/user-and-access.spec.js +87 -0
  83. package/e2e-security/setup/users-and-access/users-and-access-initial-state.spec.js +38 -0
  84. package/fixtures/repositories/free-access.json +13 -0
  85. package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
  86. package/fixtures/ttyg/agent/get-agent-defaults-assistant-api.json +44 -0
  87. package/fixtures/ttyg/agent/get-agent-defaults.json +2 -0
  88. package/npm-shrinkwrap.json +7633 -1817
  89. package/package.json +13 -7
  90. package/plugins/index.js +3 -2
  91. package/steps/base-steps.js +4 -0
  92. package/steps/cluster/cluster-page-steps.js +12 -2
  93. package/steps/error-steps.js +4 -7
  94. package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
  95. package/steps/guides/guide-steps.js +20 -1
  96. package/steps/home-steps.js +59 -37
  97. package/steps/import/import-steps.js +8 -3
  98. package/steps/login-steps.js +14 -3
  99. package/steps/main-menu-steps.js +76 -6
  100. package/steps/operations-statuses-component-steps.js +5 -10
  101. package/steps/rdf-resource-search-steps.js +55 -0
  102. package/steps/repository-steps.js +17 -17
  103. package/steps/rest-api-documentation-steps.js +15 -0
  104. package/steps/setup/autocomplete-steps.js +17 -3
  105. package/steps/setup/namespace-steps.js +8 -2
  106. package/steps/setup/plugins-steps.js +11 -1
  107. package/steps/setup/settings-steps.js +18 -0
  108. package/steps/setup/user-and-access-steps.js +28 -2
  109. package/steps/system-information-steps.js +70 -0
  110. package/steps/ttyg/ttyg-agent-settings-modal.steps.js +74 -11
  111. package/steps/ttyg/ttyg-view-steps.js +39 -6
  112. package/steps/widgets/active-repository-widget-steps.js +4 -0
  113. package/steps/yasgui/yasr-steps.js +4 -0
  114. package/stubs/browser-stubs.js +21 -0
  115. package/stubs/environment-stubs.js +9 -1
  116. package/stubs/repositories/repositories-stubs.js +4 -0
  117. package/stubs/security-stubs.js +4 -0
  118. package/stubs/ttyg/ttyg-stubs.js +18 -2
  119. package/support/e2e.js +2 -1
  120. package/support/repository-commands.js +14 -1
  121. package/e2e-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -57
  122. package/e2e-flaky/ttyg/ttyg-permission.spec.js +0 -67
  123. package/fixtures/locale-en.json +0 -3361
  124. /package/e2e-legacy/help/{system-information.spec.js → system-information/system-information.spec.js} +0 -0
@@ -1,15 +1,16 @@
1
1
  import HomeSteps from '../../steps/home-steps';
2
+ import {RdfResourceSearchSteps} from "../../steps/rdf-resource-search-steps";
3
+ import ImportSteps from "../../steps/import/import-steps";
4
+ import {BaseSteps} from "../../steps/base-steps";
5
+ import {BrowserStubs} from "../../stubs/browser-stubs";
2
6
 
3
7
  const FILE_TO_IMPORT = 'wine.rdf';
4
8
 
5
- /**
6
- * TODO: Fix me. Broken due to migration (The issue GDB-11314 not implemented)
7
- */
8
- describe.skip('RDF resource search', () => {
9
+ describe('RDF resource search', () => {
9
10
  let repositoryId;
10
11
  beforeEach(() => {
11
12
  cy.viewport(1280, 1000);
12
- repositoryId = '23repo' + Date.now();
13
+ repositoryId = 'rdf-resource-search-' + Date.now();
13
14
  cy.createRepository({id: repositoryId});
14
15
  cy.initializeRepository(repositoryId);
15
16
  cy.enableAutocomplete(repositoryId);
@@ -21,160 +22,127 @@ describe.skip('RDF resource search', () => {
21
22
 
22
23
  it('Search button should not be present when no repo is selected', () => {
23
24
  HomeSteps.visitAndWaitLoader();
24
- // Given the page has loaded the license label (otherwise locally test passes after the loader disappears and before other elements are rendered)
25
- HomeSteps.getLicenseAsLabel().should('be.visible');
26
- cy.get('.search-rdf-btn').should('not.exist');
27
- cy.get('.search-rdf-input').should('not.exist');
25
+ RdfResourceSearchSteps.getComponent().should('not.exist');
28
26
  });
29
27
 
30
- it('Search should be made from home page search when repo is set and on home page', () => {
31
- // When I visit home page with selected repository
28
+ it('Search should only be triggered from the home page when a repository is selected', () => {
29
+ // When: I visit home page with selected repository
32
30
  cy.presetRepository(repositoryId);
33
31
  HomeSteps.visitAndWaitLoader();
34
- // Search rdf button should be visible
35
- cy.get('.search-rdf-btn').should('be.visible');
36
- // When I click the button
37
- HomeSteps.doNotOpenRdfSearchBoxButFocusResourceSearch();
38
- // I should be able to type some text in the input on home page
39
- cy.get('#search-resource-input-home > #search-resource-box > input').type('hasPos');
40
- // And the autocomplete dropdown should become visible
41
- cy.get('#search-resource-input-home > #auto-complete-results-wrapper').should('be.visible');
42
- // // When I click the close button
43
- cy.get('#search-resource-input-home > #search-resource-box > .clear-icon').click();
44
- // // The input should be cleared
45
- cy.get('#search-resource-input-home > #search-resource-box > input').should('have.value', '');
32
+ // And: I click the button
33
+ RdfResourceSearchSteps.clickOnShowViewResourceMessageButton();
34
+ // Then: I should be able to type some text in the input on home page
35
+ HomeSteps.getRdfResourceSearchInput().type('hasPos');
36
+ // And: the autocomplete dropdown should become visible
37
+ HomeSteps.getAutocompleteResultsContainer().should('be.visible');
38
+ // When: I click the close button
39
+ HomeSteps.closeRdfResourceSearchBox();
40
+ // The input should be cleared
41
+ HomeSteps.getRdfResourceSearchInput().should('have.value', '');
46
42
  });
47
43
 
48
- it('Search should be present when repo is set', () => {
49
- // When I visit not home page with selected repository
44
+ it('should be visible when a repository is selected and the user is not on the Home page', () => {
45
+ // When: There is a repository selected and I visit a page other than home.
50
46
  cy.presetRepository(repositoryId);
51
- cy.visit('/graphs');
52
- cy.get('.ot-splash').should('not.be.visible');
53
- cy.get('.ot-loader-new-content').should('not.exist');
54
- // Search rdf button should be visible
55
- cy.get('.search-rdf-btn').should('be.visible');
56
- // When I click the button
57
- HomeSteps.openRdfSearchBox();
58
- // I should be able to type some text in the input
59
- cy.get('.search-rdf-input search-resource-input .view-res-input').type('hasPos');
60
- // And the autocomplete dropdown should become visible
61
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
62
- // When I click the close button
63
- cy.get('.close-rdf-search-btn').click();
64
- // The input should not be cleared
65
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
66
- // And the search bar should hide and not be visible
67
- cy.get('.search-rdf-input').should('not.be.visible');
68
- // And the suggestions list should not be visible
69
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('not.be.visible');
70
- // And the search button should be visible
71
- cy.get('.search-rdf-btn').should('be.visible');
72
- // When I open again the search box
73
- HomeSteps.openRdfSearchBox();
74
- // The input should have value 'hasPos'
75
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
76
- // And dropdown should be visible
77
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
78
- // When I press 'escape'
79
- cy.get('.search-rdf-input search-resource-input .view-res-input').type('{esc}');
80
- // Search box should not be visible
81
- cy.get('.search-rdf-input').should('not.be.visible');
47
+ ImportSteps.visit();
48
+ // Then: Search rdf button should be visible
49
+ RdfResourceSearchSteps.getOpenButton().should('be.visible');
50
+
51
+ // When: I click the button
52
+ RdfResourceSearchSteps.openRdfSearchBox();
53
+ // Then: I should be able to type some text in the input
54
+ RdfResourceSearchSteps.getRDFResourceSearchInput().type('hasPos');
55
+ // And: the autocomplete dropdown should become visible
56
+ RdfResourceSearchSteps.getAutocompleteResults().should('be.visible');
57
+
58
+ // When: I close the RDF search box
59
+ RdfResourceSearchSteps.closeRDFSearchBox();
60
+ // And: open again the search box
61
+ RdfResourceSearchSteps.openRdfSearchBox();
62
+ // Then: The input should have value 'hasPos'
63
+ RdfResourceSearchSteps.getRDFResourceSearchInput().should('have.value', 'hasPos');
64
+ // And: the autocomplete dropdown should become visible
65
+ RdfResourceSearchSteps.getAutocompleteResults().should('be.visible');
66
+
67
+ // When: I press 'escape'
68
+ BaseSteps.typeEscapeKey();
69
+ // Then: Search box should not be visible
70
+ RdfResourceSearchSteps.getRDFResourceSearchInput().should('not.be.visible');
82
71
  });
83
72
 
84
73
  it('Search should be persisted on page reload', () => {
85
- // Given I've selected a repository and visit the page
74
+ // Given: There is a repository selected and I visit a page other than home.
86
75
  cy.presetRepository(repositoryId);
87
- cy.visit('/graphs', {
88
- onBeforeLoad(win) {
89
- cy.stub(win, 'open').as('window.open');
90
- }
91
- });
92
- cy.get('.ot-splash').should('not.be.visible');
93
- cy.get('.ot-loader-new-content').should('not.exist');
94
- // Search rdf button should be visible
95
- cy.get('.search-rdf-btn').should('be.visible');
96
- // When I click the button
97
- HomeSteps.openRdfSearchBox();
98
- // I should be able to type some text in the input
99
- cy.get('.search-rdf-input search-resource-input .view-res-input')
100
- .type('hasPos').then(() => {
101
- // When I select option from suggestions
102
- cy.get(".search-rdf-input #auto-complete-results-wrapper p")
103
- .contains('hasPos')
104
- .click()
105
- .then(() => {
106
- // Search result should be opened in new window
107
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
108
- });
109
- });
110
-
111
- // When I revisit the home page
112
- cy.visit('/graphs');
113
- // When I open again the search box
114
- HomeSteps.openRdfSearchBox();
115
- // The input should have value 'hasPos' from previous search
116
- cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
117
- // And dropdown should be visible
118
- cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
119
- // When I press 'escape'
120
- cy.get('.search-rdf-input search-resource-input .view-res-input')
121
- .type('{esc}')
76
+ ImportSteps.visit();
77
+ BrowserStubs.stubWindowOpen();
78
+ // When: I open the search resource component
79
+ RdfResourceSearchSteps.openRdfSearchBox();
80
+ //Then: I should be able to type some text in the input
81
+ RdfResourceSearchSteps.getRDFResourceSearchInput().type('hasPos')
122
82
  .then(() => {
123
- // Search box should not be visible
124
- cy.get('.search-rdf-input').should('not.be.visible');
83
+ // When: I select option from suggestions
84
+ RdfResourceSearchSteps.clickOnAutocompleteSuggestionByPartialText('hasPos')
85
+ .then(() => {
86
+ // Then: Search result should be opened in new window
87
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost`, "_blank");
88
+ });
125
89
  });
90
+
91
+ // When: I revisit the home page
92
+ ImportSteps.visit();
93
+ // And: I open again the search box
94
+ RdfResourceSearchSteps.openRdfSearchBox();
95
+ // Then: The input should have value 'hasPos' from previous search
96
+ RdfResourceSearchSteps.getRDFResourceSearchInput().should('have.value', 'hasPos');
97
+ // And: the autocomplete dropdown should become visible
98
+ RdfResourceSearchSteps.getAutocompleteResults().should('be.visible');
99
+
100
+ // When: I press 'escape'
101
+ BaseSteps.typeEscapeKey();
102
+ // Then: Search box should not be visible
103
+ RdfResourceSearchSteps.getRDFResourceSearchInput().should('not.be.visible');
126
104
  });
127
105
 
128
106
  it('Should test RDF resource search box', () => {
129
- //Prepare repository and import data.
107
+ // Given: I have a repository with RDF data
130
108
  cy.presetRepository(repositoryId);
131
109
  cy.importServerFile(repositoryId, FILE_TO_IMPORT);
110
+ // And: I visit the home page
132
111
  HomeSteps.visitAndWaitLoader();
133
112
 
134
- //Verify that the main resource search box is focused
135
- getRDFResourceSearchBox().click();
136
- cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...');
113
+ // When: I click on the RDF resource search button
114
+ RdfResourceSearchSteps.clickOnShowViewResourceMessageButton();
115
+ // Then: The input for RDF resource search should be visible (This is the legacy component used prior to the migration)
116
+ HomeSteps.getRdfResourceSearchInput().should('have.attr', 'placeholder', 'Search RDF resources...')
117
+ .and('be.focused');
137
118
 
138
119
  //Navigate away from the Homepage, to be able to test the new resource search box
139
- cy.visit('/graphs', {
140
- onBeforeLoad(win) {
141
- cy.stub(win, 'open').as('window.open');
142
- }
143
- });
144
-
145
- cy.get('.ot-splash').should('not.be.visible');
146
- cy.get('.ot-loader-new-content').should('not.exist');
147
-
148
- getRDFResourceSearchBox().click();
149
- //Verify that the new resource search box is focused
150
- cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...');
151
-
152
- //Verify autocomplete suggestions count
153
- cy.focused().then(() => {
154
- cy.get('#search-resource-box input')
155
- .should('be.visible')
156
- .type('Dry');
157
- cy.get('#auto-complete-results-wrapper')
158
- .should('be.visible')
159
- .children()
160
- .should('have.length', 7);
161
- });
162
-
163
- //Test table and visual buttons.
164
- cy.get("#auto_0").should('be.visible').click();
165
- // Search result should be opened in new window
166
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
167
-
168
- getVisualButton().click();
169
- cy.get("#auto_0").should('be.visible').click();
170
- cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
120
+ HomeSteps.visitAndWaitLoader();
121
+ BrowserStubs.stubWindowOpen();
122
+ // When: I click on the RDF resource search button
123
+ RdfResourceSearchSteps.clickOnShowViewResourceMessageButton();
124
+ // Then: The input for RDF resource search should be visible (This is the legacy component used prior to the migration)
125
+ HomeSteps.getRdfResourceSearchInput().should('have.attr', 'placeholder', 'Search RDF resources...')
126
+ .and('be.focused');
127
+
128
+ // When: I type some text in the input
129
+ HomeSteps.getRdfResourceSearchInput().type('Dry');
130
+ // Then: The autocomplete results should be visible
131
+ HomeSteps.getAutocompleteSuggestion().should('be.visible')
132
+ .and('have.length', 7);
133
+
134
+ // When: The table display button is active
135
+ HomeSteps.getTableDisplayButton().click();
136
+ // And: click on some suggestion
137
+ HomeSteps.getAutocompleteSuggestionByPartialText('http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#').click();
138
+ // Then: The clicked suggestion should be opened in new window
139
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry`);
140
+
141
+ // When: The visual display button is active
142
+ HomeSteps.getVisualDisplayButton().click();
143
+ // And: click on some suggestion
144
+ HomeSteps.getAutocompleteSuggestionByPartialText('http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#').click();
145
+ // Then: The clicked suggestion should be opened in new window
146
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry`);
171
147
  });
172
148
  });
173
-
174
- function getRDFResourceSearchBox() {
175
- return cy.get('rdf-resource-search').should('be.visible');
176
- }
177
-
178
- function getVisualButton() {
179
- return cy.get('.display-type-visual-btn').should('be.visible');
180
- }
@@ -1,7 +1,7 @@
1
1
  import HomeSteps from '../../steps/home-steps';
2
+ import {BrowserStubs} from "../../stubs/browser-stubs";
2
3
 
3
- // TODO: Fix me. Broken due to migration (Error unknown)
4
- describe.skip('View resource autocomplete', () => {
4
+ describe('View resource autocomplete', () => {
5
5
 
6
6
  const FOAT_SNIPPET = '@base <http://example.org/> .\n' +
7
7
  '@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n' +
@@ -10,15 +10,20 @@ describe.skip('View resource autocomplete', () => {
10
10
  'foaf:name "Green Goblin" .\n';
11
11
  const GOBLIN_URI = 'http://example.org/#green-goblin';
12
12
 
13
+ let repositoryId;
14
+
13
15
  beforeEach(() => {
14
16
  cy.viewport(1280, 1000);
17
+ repositoryId = 'view-resource-autocomplete-' + Date.now();
18
+ cy.createRepository({id: repositoryId});
19
+ BrowserStubs.stubWindowOpen();
15
20
  });
16
21
 
17
- /**
18
- * TODO: Fix me. Broken due to migration (The issue GDB-10501 not implemented)
19
- */
20
- it.skip('Test homepage autocomplete when it is enabled', () => {
21
- const repositoryId = HomeSteps.createRepo();
22
+ afterEach(() => {
23
+ cy.deleteRepository(repositoryId);
24
+ });
25
+
26
+ it('Test homepage autocomplete when it is enabled', () => {
22
27
  HomeSteps.selectRepo(repositoryId);
23
28
 
24
29
  // Type an invalid resource
@@ -28,21 +33,27 @@ describe.skip('View resource autocomplete', () => {
28
33
  cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
29
34
  cy.enableAutocomplete(repositoryId);
30
35
 
31
- HomeSteps.visitAndWaitLoader(true).then((el) => el)
32
- .then(() => HomeSteps.getAutocompleteDisplayTypeButton('table').click())
33
- .then(() => HomeSteps.autocompleteText('Green', GOBLIN_URI))
34
- .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
35
- .then(() => // Search result should be opened in new window
36
- cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
37
- .then(() => HomeSteps.getAutocompleteDisplayTypeButton('visual').click())
38
- .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
39
- .then(() => // Search result should be opened in new window
40
- cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
41
- cy.deleteRepository(repositoryId);
36
+ HomeSteps.visitAndWaitLoader();
37
+ BrowserStubs.stubWindowOpen();
38
+
39
+ // When: The table display button is active
40
+ HomeSteps.getAutocompleteDisplayTypeButton('table').click();
41
+ // And: select an autocomplete suggestion
42
+ HomeSteps.autocompleteText('Green', GOBLIN_URI)
43
+ HomeSteps.autocompleteText('Green', GOBLIN_URI)
44
+ HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click()
45
+ // Then: The clicked suggestion should be opened in new window
46
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin');
47
+
48
+ // When: The visual display button is active
49
+ HomeSteps.getAutocompleteDisplayTypeButton('visual').click();
50
+ // And: select an autocomplete suggestion
51
+ HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click()
52
+ // Then: clicked suggestion should be opened in new window
53
+ cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin')
42
54
  });
43
55
 
44
56
  it('should not suggest resources in "View resources" when autocomplete is not enabled', () => {
45
- const repositoryId = HomeSteps.createRepo();
46
57
  cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
47
58
 
48
59
  HomeSteps.visitAndWaitLoader();
@@ -50,7 +61,5 @@ describe.skip('View resource autocomplete', () => {
50
61
 
51
62
  HomeSteps.getAutocompleteInput().type('Green');
52
63
  HomeSteps.noAutocompleteToast();
53
-
54
- cy.deleteRepository(repositoryId);
55
64
  });
56
65
  });
@@ -2,8 +2,7 @@ import {ImportServerFilesSteps} from "../../steps/import/import-server-files-ste
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
3
  import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
4
4
 
5
- // TODO: Fix me. Broken due to migration (Error: beforeEach)
6
- describe.skip('Import server files - Batch operations', () => {
5
+ describe('Import server files - Batch operations', () => {
7
6
 
8
7
  let repositoryId;
9
8
 
@@ -4,8 +4,7 @@ import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dial
4
4
  import {ImportResourceMessageDialog} from "../../steps/import/import-resource-message-dialog";
5
5
  import {SERVER_FILES_COUNT} from "../../steps/import/import-test-constants";
6
6
 
7
- // TODO: Fix me. Broken due to migration (Error: beforeEach)
8
- describe.skip('Import server files', () => {
7
+ describe('Import server files', () => {
9
8
 
10
9
  let repositoryId;
11
10
 
@@ -1,8 +1,7 @@
1
1
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
2
2
  import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
3
3
 
4
- // TODO: Fix me. Broken due to migration (Error: beforeEach)
5
- describe.skip('Import user data: URL import', () => {
4
+ describe('Import user data: URL import', () => {
6
5
 
7
6
  let repositoryId;
8
7
 
@@ -78,27 +77,4 @@ describe.skip('Import user data: URL import', () => {
78
77
  ImportSettingsDialogSteps.import();
79
78
  ImportUserDataSteps.checkImportedResource(0, IMPORT_URL);
80
79
  });
81
-
82
- it('should import JSON-LD file via URL with correct request body', () => {
83
- ImportUserDataSteps.stubPostJSONLDFromURL(repositoryId);
84
- ImportUserDataSteps.openImportURLDialog(IMPORT_JSONLD_URL);
85
- ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
86
- ImportUserDataSteps.clickImportUrlButton();
87
- ImportSettingsDialogSteps.import();
88
- cy.wait('@postJsonldUrl').then((xhr) => {
89
- expect(xhr.request.body.name).to.eq('https://example.com/0007-context.jsonld');
90
- expect(xhr.request.body.data).to.eq('https://example.com/0007-context.jsonld');
91
- expect(xhr.request.body.type).to.eq('url');
92
- expect(xhr.request.body.hasContextLink).to.be.true;
93
- });
94
- });
95
-
96
- it('should show error on invalid JSON-LD URL', () => {
97
- ImportUserDataSteps.stubPostJSONLDFromURL();
98
- ImportUserDataSteps.openImportURLDialog(IMPORT_JSONLD_URL);
99
- ImportUserDataSteps.selectRDFFormat(JSONLD_FORMAT);
100
- ImportUserDataSteps.clickImportUrlButton();
101
- ImportSettingsDialogSteps.import();
102
- ImportUserDataSteps.checkImportedResource(0, IMPORT_JSONLD_URL, 'https://example.com/0007-context.jsonld');
103
- });
104
80
  });
@@ -7,8 +7,7 @@ const RDF_TEXT_SNIPPET = '@prefix ab:<http://learningsparql.com/ns/addressbook#>
7
7
  'ab:richard ab:homeTel "(229)276-5135".\n' +
8
8
  'ab:richard ab:email "richard491@hotmail.com".';
9
9
 
10
- // TODO: Fix me. Broken due to migration (Error: unknown)
11
- describe.skip('Import user data', () => {
10
+ describe('Import user data', () => {
12
11
 
13
12
  let repositoryId;
14
13
 
@@ -29,6 +28,9 @@ describe.skip('Import user data', () => {
29
28
  cy.url().should('include', '/import#user');
30
29
  // Then I should see the user help icons
31
30
  ImportUserDataSteps.showPageInfoPopover();
31
+ ImportUserDataSteps.getPageInfoPopoverTitle()
32
+ .should('be.visible')
33
+ .and('not.be.empty');
32
34
  ImportUserDataSteps.getPageInfoPopover()
33
35
  .should('be.visible')
34
36
  .find('a')
@@ -49,8 +49,7 @@ describe('Import view', () => {
49
49
  ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
50
50
  });
51
51
 
52
- // TODO: Fix me. Broken due to migration (Error: unknown)
53
- it.skip('Should display/hide help message depends on resource result', () => {
52
+ it('Should display/hide help message depends on resource result', () => {
54
53
  // Given I am on import page
55
54
 
56
55
  // Then help message has to be displayed, because the result of imported files are empty.
@@ -2,11 +2,9 @@ import HomeSteps from "../../steps/home-steps";
2
2
  import {OperationsStatusesComponentSteps} from "../../steps/operations-statuses-component-steps";
3
3
  import {GlobalOperationsStatusesStub} from "../../stubs/global-operations-statuses-stub";
4
4
  import {ImportUserDataSteps} from "../../steps/import/import-user-data-steps";
5
+ import {BrowserStubs} from "../../stubs/browser-stubs";
5
6
 
6
- /**
7
- * TODO: Fix me. Broken due to migration (The issue GDB-11318 is not implemented)
8
- */
9
- describe.skip('Operations Status Component', () => {
7
+ describe('Operations Status Component', () => {
10
8
 
11
9
  const repositoryId = 'backup-and-restore-' + Date.now();
12
10
  beforeEach(() => {
@@ -75,7 +73,7 @@ describe.skip('Operations Status Component', () => {
75
73
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
76
74
  // When I click on "Running query" operation element.
77
75
  // Then I expect to be redirected to "Query and Update monitoring" view.
78
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 3);
76
+ checkOperationElementUrl('monitor/queries', 3);
79
77
  // Then I expect "Global Operations Component" to still be displayed.
80
78
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
81
79
  });
@@ -90,7 +88,7 @@ describe.skip('Operations Status Component', () => {
90
88
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
91
89
  // When I click on "Running updates" operation element.
92
90
  // Then I expect to be redirected to "Query and Update monitoring" view.
93
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 4);
91
+ checkOperationElementUrl('monitor/queries', 4);
94
92
  // Then I expect "Global Operations Component" to still be displayed.
95
93
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
96
94
  });
@@ -105,7 +103,7 @@ describe.skip('Operations Status Component', () => {
105
103
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
106
104
  // When I click on "Running imports" operation element.
107
105
  // Then I expect to be redirected to "Query and Update monitoring" view.
108
- OperationsStatusesComponentSteps.checkOperationElementUrl('import', 2);
106
+ checkOperationElementUrl('import', 2);
109
107
  // Then I expect "Global Operations Component" to still be displayed.
110
108
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
111
109
  });
@@ -120,7 +118,7 @@ describe.skip('Operations Status Component', () => {
120
118
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
121
119
  // When I click on "Creating backup" operation element.
122
120
  // Then I expect to be redirected to "Backup and Restore" view.
123
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/backup-and-restore', 1);
121
+ checkOperationElementUrl('monitor/backup-and-restore', 1);
124
122
  // Then I expect "Global Operations Component" to still be displayed.
125
123
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
126
124
 
@@ -136,9 +134,15 @@ describe.skip('Operations Status Component', () => {
136
134
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
137
135
  // When I click on "Unavailable nodes" operation element.
138
136
  // Then I expect to be redirected to "Cluster Monitoring" view.
139
- OperationsStatusesComponentSteps.checkOperationElementUrl('cluster', 0);
137
+ checkOperationElementUrl('cluster', 0);
140
138
  // Then I expect "Global Operations Component" to still be displayed.
141
139
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
142
140
 
143
141
  });
142
+
143
+ function checkOperationElementUrl(expectedUrl, operationIndex = 0) {
144
+ BrowserStubs.spyNavigateToUrl();
145
+ OperationsStatusesComponentSteps.getOperationStatuses().eq(operationIndex).click();
146
+ cy.get(BrowserStubs.NAVIGATE_TO_URL_ALIAS()).should('have.been.calledWithMatch', expectedUrl)
147
+ }
144
148
  });
@@ -3,10 +3,7 @@ import {AttachRepositorySteps} from "../../steps/repositories/attach-repository-
3
3
  import {ModalDialogSteps} from "../../steps/modal-dialog-steps";
4
4
  import {RepositoriesStubs} from "../../stubs/repositories/repositories-stubs";
5
5
 
6
- /**
7
- * TODO: Fix me. Broken due to migration (loader is not implemented)
8
- */
9
- describe.skip('Attach remote location', () => {
6
+ describe('Attach remote location', () => {
10
7
 
11
8
  it('Should create and delete remote instance', () => {
12
9
  cy.visit('/repository');
@@ -121,9 +118,9 @@ describe.skip('Attach remote location', () => {
121
118
  RepositoriesStubs.stubRepositories();
122
119
  RepositoriesStubs.stubLocations();
123
120
  cy.visit('/repository');
124
- cy.wait('@get-all-repositories');
125
121
  RepositorySteps.waitLoader();
126
122
  RepositorySteps.waitUntilRepositoriesPageIsLoaded();
123
+ cy.wait('@get-all-repositories');
127
124
 
128
125
  // When I open the Repositories view that contains all possible kind of locations.
129
126
  RepositorySteps.getLocalGraphDBTable().should('exist');
@@ -15,10 +15,7 @@ describe('Ontop repositories', () => {
15
15
  });
16
16
 
17
17
  //Check that 'Ontop' type repository is available and that the configuration fields are present and active.
18
- /**
19
- * TODO: Fix me. Broken due to migration (loader is not implemented)
20
- */
21
- it.skip('should check if Ontop repository type is available', () => {
18
+ it('should check if Ontop repository type is available', () => {
22
19
  RepositorySteps.visit();
23
20
  RepositorySteps.getCreateRepositoryButton().click();
24
21
  RepositorySteps.getRepositoryTypeButton('ontop').should('be.visible');
@@ -142,10 +139,7 @@ describe('Ontop repositories', () => {
142
139
  OntopRepositorySteps.getTestConnectionButton().should('not.be.disabled');
143
140
  });
144
141
 
145
- /**
146
- * TODO: Fix me. Broken due to migration (Repository selector changed)
147
- */
148
- it.skip('should create ontop repository', () => {
142
+ it('should create ontop repository', () => {
149
143
  RepositoryStubs.stubRepoCreationEndpoints(repositoryId);
150
144
  // When I visit the create ontop page
151
145
  OntopRepositorySteps.visitCreate();
@@ -206,10 +200,7 @@ describe('Ontop repositories', () => {
206
200
  RepositorySteps.getRepoIcon('ontop').should('be.visible');
207
201
  });
208
202
 
209
- /**
210
- * TODO: Fix me. Broken due to migration (loader is not implemented)
211
- */
212
- it.skip('should edit ontop repository', () => {
203
+ it('should edit ontop repository', () => {
213
204
  RepositoryStubs.stubEditOntopResponse(repositoryId);
214
205
  RepositoryStubs.stubSaveOntopResponse(repositoryId);
215
206
  RepositoryStubs.stubRepoCreationEndpoints(repositoryId);