graphdb-workbench-tests 2.8.0-Test → 2.8.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/cypress.config.js +3 -0
- package/fixtures/cluster/2-nodes-cluster-group-status-deleted.json +30 -0
- package/fixtures/cluster/2-nodes-cluster-group-status.json +30 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-after-replace.json +44 -0
- package/fixtures/cluster/3-nodes-cluster-group-status-building-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-receiving-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-sending-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-waiting-for-snapshot.json +4 -1
- package/fixtures/cluster/3-nodes-cluster-group-status-with-tag.json +47 -0
- package/fixtures/cluster/3-nodes-cluster-group-status.json +12 -3
- package/fixtures/cluster/4-nodes-cluster-group-status.json +58 -0
- package/fixtures/cluster/cluster-config.json +1 -0
- package/fixtures/cluster/cluster-node-status.json +4 -1
- package/fixtures/cluster/no-cluster-group-status.json +2 -1
- package/fixtures/cluster/no-cluster-node-status.json +2 -1
- package/fixtures/cluster/save-cluster-configuration-response.json +10 -0
- package/fixtures/connectors/get-retrieval-connector.json +1 -1
- package/fixtures/connectors/get-ttyg-chatgpt-connectors.json +188 -0
- package/fixtures/locale-en.json +382 -101
- package/fixtures/remote-location/get-0-remote-locations.json +1 -2
- package/fixtures/remote-location/get-1-remote-locations.json +2 -4
- package/fixtures/remote-location/get-2-remote-locations.json +3 -6
- package/fixtures/remote-location/get-3-remote-locations.json +4 -8
- package/fixtures/remote-location/get-4-remote-locations.json +54 -0
- package/fixtures/remote-location/remote-location-status-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-location-status-not-in-cluster.json +1 -2
- package/fixtures/remote-location/remote-locations-filter.json +1 -2
- package/fixtures/repositories/get-locations.json +5 -10
- package/fixtures/repositories/get-ttyg-repositories.json +28 -0
- package/fixtures/security/get-admin-user.json +22 -0
- package/fixtures/similarity/get-ttyg-similarity-connectors.json +46 -0
- package/fixtures/ttyg/agent/create-agent.json +2 -1
- package/fixtures/ttyg/agent/get-agent-defaults.json +42 -0
- package/fixtures/ttyg/agent/get-agent-list-after-deleted.json +1 -1
- package/fixtures/ttyg/agent/get-agent-list-new-agent.json +2 -73
- package/fixtures/ttyg/agent/get-agent-list.json +1 -1
- package/fixtures/ttyg/agent/get-agent.json +25 -0
- package/fixtures/ttyg/chats/ask-question.json +25 -0
- package/fixtures/ttyg/chats/create/create-chat-response.json +16 -0
- package/fixtures/ttyg/chats/create/get-chats-after-create.json +12 -0
- package/fixtures/ttyg/chats/create/get-chats-before-create.json +7 -0
- package/fixtures/ttyg/chats/explain-response-1.json +59 -0
- package/fixtures/ttyg/chats/explain-response-2.json +59 -0
- package/fixtures/ttyg/chats/get-chat.json +199 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +97 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +70 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-properties.spec.js +95 -0
- package/integration/cluster/cluster-configuration/cluster-configuration.spec.js +38 -0
- package/integration/cluster/cluster-legend.spec.js +1 -0
- package/integration/cluster/edit-cluster-nodes-modal.spec.js +425 -0
- package/integration/explore/graphs.overview.spec.js +4 -0
- package/integration/explore/similariti-index-create.spec.js +1 -1
- package/integration/explore/similarity-index.spec.js +1 -1
- package/integration/explore/visual-graph/visual.graph.spec.js +31 -35
- package/integration/home/cookie-policy.spec.js +83 -0
- package/integration/home/create-repository.spec.js +35 -0
- package/integration/home/documentation-link.spec.js +60 -0
- package/integration/home/google-analytics.spec.js +60 -0
- package/integration/home/language-selector.spec.js +19 -0
- package/integration/home/rdf-resource-search.spec.js +192 -0
- package/integration/home/view-resource-autocomplete.spec.js +52 -0
- package/integration/home/workbench.home.spec.js +1 -277
- package/integration/import/import-user-data-file-upload.spec.js +13 -0
- package/integration/import/import-user-data.spec.js +6 -1
- package/integration/import/import-view.spec.js +6 -1
- package/integration/license/license.spec.js +26 -0
- package/integration/repository/attach-remote-location.spec.js +94 -40
- package/integration/repository/repositories.spec.js +1 -7
- package/integration/setup/my-settings.spec.js +13 -21
- package/integration/ttyg/agent-list.spec.js +27 -25
- package/integration/ttyg/agent-select-menu.spec.js +18 -16
- package/integration/ttyg/chat-list.spec.js +72 -9
- package/integration/ttyg/chat-panel.spec.js +106 -10
- package/integration/ttyg/clone-agent.spec.js +8 -4
- package/integration/ttyg/create-agent.spec.js +303 -51
- package/integration/ttyg/create-chat.spec.js +68 -0
- package/integration/ttyg/delete-agent.spec.js +6 -5
- package/integration/ttyg/edit-agent.spec.js +16 -5
- package/integration/ttyg/ttyg-permission.spec.js +66 -0
- package/integration/ttyg/ttyg-view.spec.js +8 -4
- package/npm-shrinkwrap.json +215 -220
- package/package.json +5 -6
- package/steps/alert-dialog-steps.js +25 -0
- package/steps/cluster/cluster-configuration-steps.js +173 -5
- package/steps/cluster/cluster-page-steps.js +8 -0
- package/steps/cluster/custer-nodes-configuration-steps.js +107 -0
- package/steps/home-steps.js +48 -5
- package/steps/import/import-steps.js +11 -7
- package/steps/license-steps.js +25 -0
- package/steps/repositories/attach-repository-steps.js +33 -0
- package/steps/repository-steps.js +26 -11
- package/steps/setup/settings-steps.js +17 -0
- package/steps/ttyg/chat-panel-steps.js +31 -6
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +82 -4
- package/steps/ttyg/ttyg-view-steps.js +77 -3
- package/steps/visual-graph-steps.js +29 -1
- package/stubs/cluster/cluster-stubs.js +162 -7
- package/stubs/cluster/remote-location-stubs.js +46 -0
- package/stubs/connector-stubs.js +24 -0
- package/stubs/environment-stubs.js +27 -0
- package/stubs/license-stubs.js +108 -0
- package/stubs/repositories/repositories-stubs.js +11 -8
- package/stubs/repositories-stub.js +15 -0
- package/stubs/security-stubs.js +29 -0
- package/stubs/similarity-index-stubs.js +25 -0
- package/stubs/stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +79 -40
- package/support/commands.js +2 -0
- package/support/index.js +18 -0
- package/support/security-command.js +25 -0
- package/support/settings-commands.js +4 -5
- package/support/user-commands.js +31 -0
- package/fixtures/ttyg/chats/get-chat-1.json +0 -43
- package/integration/cluster/cluster-management.spec.js +0 -220
- package/steps/cluster/add-remote-location-dialog-steps.js +0 -11
- package/steps/cluster/create-cluster-dialog-steps.js +0 -39
- package/steps/cluster/replace-nodes-dialog-steps.js +0 -39
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import HomeSteps from '../../steps/home-steps';
|
|
2
|
+
|
|
3
|
+
describe('View resource autocomplete', () => {
|
|
4
|
+
|
|
5
|
+
const FOAT_SNIPPET = '@base <http://example.org/> .\n' +
|
|
6
|
+
'@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n' +
|
|
7
|
+
'<#green-goblin>\n' +
|
|
8
|
+
'a foaf:Person ; # in the context of the Marvel universe\n' +
|
|
9
|
+
'foaf:name "Green Goblin" .\n';
|
|
10
|
+
const GOBLIN_URI = 'http://example.org/#green-goblin';
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
cy.viewport(1280, 1000);
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('Test homepage autocomplete when it is enabled', () => {
|
|
17
|
+
const repositoryId = HomeSteps.createRepo();
|
|
18
|
+
HomeSteps.selectRepo(repositoryId);
|
|
19
|
+
|
|
20
|
+
// Type an invalid resource
|
|
21
|
+
HomeSteps.getAutocompleteInput().type('hfsafa');
|
|
22
|
+
HomeSteps.noAutocompleteToast();
|
|
23
|
+
|
|
24
|
+
cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
|
|
25
|
+
cy.enableAutocomplete(repositoryId);
|
|
26
|
+
|
|
27
|
+
HomeSteps.visitAndWaitLoader(true).then((el) => el)
|
|
28
|
+
.then(() => HomeSteps.getAutocompleteDisplayTypeButton('table').click())
|
|
29
|
+
.then(() => HomeSteps.autocompleteText('Green', GOBLIN_URI))
|
|
30
|
+
.then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
|
|
31
|
+
.then(() => // Search result should be opened in new window
|
|
32
|
+
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
|
|
33
|
+
.then(() => HomeSteps.getAutocompleteDisplayTypeButton('visual').click())
|
|
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', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
|
|
37
|
+
cy.deleteRepository(repositoryId);
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it('should not suggest resources in "View resources" when autocomplete is not enabled', () => {
|
|
41
|
+
const repositoryId = HomeSteps.createRepo();
|
|
42
|
+
cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
|
|
43
|
+
|
|
44
|
+
HomeSteps.visitAndWaitLoader();
|
|
45
|
+
HomeSteps.selectRepo(repositoryId);
|
|
46
|
+
|
|
47
|
+
HomeSteps.getAutocompleteInput().type('Green');
|
|
48
|
+
HomeSteps.noAutocompleteToast();
|
|
49
|
+
|
|
50
|
+
cy.deleteRepository(repositoryId);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
@@ -1,199 +1,13 @@
|
|
|
1
1
|
import HomeSteps from '../../steps/home-steps';
|
|
2
2
|
|
|
3
|
-
const FILE_TO_IMPORT = 'wine.rdf';
|
|
4
|
-
|
|
5
3
|
describe('Home screen validation', () => {
|
|
6
4
|
|
|
7
|
-
const FOAT_SNIPPET = '@base <http://example.org/> .\n' +
|
|
8
|
-
'@prefix foaf: <http://xmlns.com/foaf/0.1/> .\n' +
|
|
9
|
-
'<#green-goblin>\n' +
|
|
10
|
-
'a foaf:Person ; # in the context of the Marvel universe\n' +
|
|
11
|
-
'foaf:name "Green Goblin" .\n';
|
|
12
|
-
const GOBLIN_URI = 'http://example.org/#green-goblin';
|
|
13
|
-
|
|
14
5
|
beforeEach(() => {
|
|
15
6
|
cy.viewport(1280, 1000);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
context('RDF resource search', () => {
|
|
19
|
-
it('Search button should not be present when no repo is selected', () => {
|
|
20
|
-
HomeSteps.visitAndWaitLoader();
|
|
21
|
-
cy.get('.search-rdf-btn').should('not.exist');
|
|
22
|
-
cy.get('.search-rdf-input').should('not.exist');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('Search should be made from home page search when repo is set and on home page', () => {
|
|
26
|
-
const repositoryId = '23repo' + Date.now();
|
|
27
|
-
cy.createRepository({id: repositoryId});
|
|
28
|
-
cy.initializeRepository(repositoryId);
|
|
29
|
-
cy.enableAutocomplete(repositoryId);
|
|
30
|
-
cy.presetRepository(repositoryId);
|
|
31
|
-
|
|
32
|
-
// When I visit home page with selected repository
|
|
33
|
-
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', '');
|
|
46
|
-
|
|
47
|
-
cy.deleteRepository(repositoryId);
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it('Search should be present when repo is set', () => {
|
|
51
|
-
const repositoryId = '23repo' + Date.now();
|
|
52
|
-
cy.createRepository({id: repositoryId});
|
|
53
|
-
cy.initializeRepository(repositoryId);
|
|
54
|
-
cy.enableAutocomplete(repositoryId);
|
|
55
|
-
cy.presetRepository(repositoryId);
|
|
56
|
-
|
|
57
|
-
// When I visit not home page with selected repository
|
|
58
|
-
cy.visit('/graphs');
|
|
59
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
60
|
-
cy.get('.ot-loader-new-content').should('not.exist');
|
|
61
|
-
// Search rdf button should be visible
|
|
62
|
-
cy.get('.search-rdf-btn').should('be.visible');
|
|
63
|
-
// When I click the button
|
|
64
|
-
HomeSteps.openRdfSearchBox();
|
|
65
|
-
// I should be able to type some text in the input
|
|
66
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input').type('hasPos');
|
|
67
|
-
// And the autocomplete dropdown should become visible
|
|
68
|
-
cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
|
|
69
|
-
// When I click the close button
|
|
70
|
-
cy.get('.close-rdf-search-btn').click();
|
|
71
|
-
// The input should not be cleared
|
|
72
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
|
|
73
|
-
// And the search bar should hide and not be visible
|
|
74
|
-
cy.get('.search-rdf-input').should('not.be.visible');
|
|
75
|
-
// And the suggestions list should not be visible
|
|
76
|
-
cy.get('.search-rdf-input #auto-complete-results-wrapper').should('not.be.visible');
|
|
77
|
-
// And the search button should be visible
|
|
78
|
-
cy.get('.search-rdf-btn').should('be.visible');
|
|
79
|
-
// When I open again the search box
|
|
80
|
-
HomeSteps.openRdfSearchBox();
|
|
81
|
-
// The input should have value 'hasPos'
|
|
82
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
|
|
83
|
-
// And dropdown should be visible
|
|
84
|
-
cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
|
|
85
|
-
// When I press 'escape'
|
|
86
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input').type('{esc}');
|
|
87
|
-
// Search box should not be visible
|
|
88
|
-
cy.get('.search-rdf-input').should('not.be.visible');
|
|
89
|
-
|
|
90
|
-
cy.deleteRepository(repositoryId);
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
it('Search should be persisted on page reload', () => {
|
|
94
|
-
const repositoryId = '23repo' + Date.now();
|
|
95
|
-
cy.createRepository({id: repositoryId});
|
|
96
|
-
cy.initializeRepository(repositoryId);
|
|
97
|
-
cy.enableAutocomplete(repositoryId);
|
|
98
|
-
cy.presetRepository(repositoryId);
|
|
99
|
-
|
|
100
|
-
cy.visit('/graphs', {
|
|
101
|
-
onBeforeLoad (win) {
|
|
102
|
-
cy.stub(win, 'open').as('window.open');
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
106
|
-
cy.get('.ot-loader-new-content').should('not.exist');
|
|
107
|
-
// Search rdf button should be visible
|
|
108
|
-
cy.get('.search-rdf-btn').should('be.visible');
|
|
109
|
-
// When I click the button
|
|
110
|
-
HomeSteps.openRdfSearchBox();
|
|
111
|
-
// I should be able to type some text in the input
|
|
112
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input')
|
|
113
|
-
.type('hasPos').then(() => {
|
|
114
|
-
// When I select option from suggestions
|
|
115
|
-
cy.get(".search-rdf-input #auto-complete-results-wrapper p")
|
|
116
|
-
.contains('hasPos')
|
|
117
|
-
.click()
|
|
118
|
-
.then(() => {
|
|
119
|
-
// Search result should be opened in new window
|
|
120
|
-
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// When I revisit the home page
|
|
125
|
-
cy.visit('/graphs');
|
|
126
|
-
// When I open again the search box
|
|
127
|
-
HomeSteps.openRdfSearchBox();
|
|
128
|
-
// The input should have value 'hasPos' from previous search
|
|
129
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input').should('have.value', 'hasPos');
|
|
130
|
-
// And dropdown should be visible
|
|
131
|
-
cy.get('.search-rdf-input #auto-complete-results-wrapper').should('be.visible');
|
|
132
|
-
// When I press 'escape'
|
|
133
|
-
cy.get('.search-rdf-input search-resource-input .view-res-input')
|
|
134
|
-
.type('{esc}')
|
|
135
|
-
.then(() => {
|
|
136
|
-
// Search box should not be visible
|
|
137
|
-
cy.get('.search-rdf-input').should('not.be.visible');
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
cy.deleteRepository(repositoryId);
|
|
141
|
-
});
|
|
142
|
-
|
|
143
|
-
it('Should test RDF resource search box', () => {
|
|
144
|
-
//Prepare repository, autocomplete and import data.
|
|
145
|
-
const repositoryId = 'repository-' + Date.now();
|
|
146
|
-
cy.createRepository({id: repositoryId});
|
|
147
|
-
cy.initializeRepository(repositoryId);
|
|
148
|
-
cy.presetRepository(repositoryId);
|
|
149
|
-
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|
|
150
|
-
cy.enableAutocomplete(repositoryId);
|
|
151
|
-
HomeSteps.visitAndWaitLoader();
|
|
152
|
-
|
|
153
|
-
//Verify that the main resource search box is focused
|
|
154
|
-
getRDFResourceSearchBox().click();
|
|
155
|
-
cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...');
|
|
156
|
-
|
|
157
|
-
//Navigate away from the Homepage, to be able to test the new resource search box
|
|
158
|
-
cy.visit('/graphs', {
|
|
159
|
-
onBeforeLoad (win) {
|
|
160
|
-
cy.stub(win, 'open').as('window.open');
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
cy.get('.ot-splash').should('not.be.visible');
|
|
165
|
-
cy.get('.ot-loader-new-content').should('not.exist');
|
|
166
|
-
|
|
167
|
-
getRDFResourceSearchBox().click();
|
|
168
|
-
//Verify that the new resource search box is focused
|
|
169
|
-
cy.focused().should('have.attr', 'placeholder', 'Search RDF resources...')
|
|
170
|
-
|
|
171
|
-
//Verify autocomplete suggestions count
|
|
172
|
-
cy.focused().then(() => {
|
|
173
|
-
cy.get('#search-resource-box input')
|
|
174
|
-
.should('be.visible')
|
|
175
|
-
.type('Dry');
|
|
176
|
-
cy.get('#auto-complete-results-wrapper')
|
|
177
|
-
.should('be.visible')
|
|
178
|
-
.children()
|
|
179
|
-
.should('have.length', 7);
|
|
180
|
-
})
|
|
181
|
-
|
|
182
|
-
//Test table and visual buttons.
|
|
183
|
-
cy.get("#auto_0").should('be.visible').click();
|
|
184
|
-
// Search result should be opened in new window
|
|
185
|
-
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
|
|
186
|
-
|
|
187
|
-
getVisualButton().click();
|
|
188
|
-
cy.get("#auto_0").should('be.visible').click();
|
|
189
|
-
cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
|
|
190
|
-
cy.deleteRepository(repositoryId);
|
|
191
|
-
});
|
|
7
|
+
HomeSteps.visitAndWaitLoader();
|
|
192
8
|
});
|
|
193
9
|
|
|
194
10
|
context('First visit', () => {
|
|
195
|
-
beforeEach(() => HomeSteps.visitAndWaitLoader());
|
|
196
|
-
|
|
197
11
|
it('Verify that tutorial panel exists', () => {
|
|
198
12
|
HomeSteps.verifyTutorialVisible(true);
|
|
199
13
|
});
|
|
@@ -213,94 +27,4 @@ describe('Home screen validation', () => {
|
|
|
213
27
|
HomeSteps.verifyTutorialVisible(false);
|
|
214
28
|
});
|
|
215
29
|
});
|
|
216
|
-
|
|
217
|
-
context('Creating repository', () => {
|
|
218
|
-
beforeEach(() => HomeSteps.visitAndWaitLoader());
|
|
219
|
-
|
|
220
|
-
it('Test create and select new repository via home page', () => {
|
|
221
|
-
HomeSteps.verifyCreateRepositoryLink();
|
|
222
|
-
|
|
223
|
-
const repositoryId = HomeSteps.createRepo();
|
|
224
|
-
// Initializing the repository to speed up retrieving repository info
|
|
225
|
-
cy.initializeRepository(repositoryId);
|
|
226
|
-
|
|
227
|
-
HomeSteps.selectRepo(repositoryId);
|
|
228
|
-
HomeSteps.verifyRepositoryIsSelected(repositoryId);
|
|
229
|
-
HomeSteps.hasRepositoryInfo(repositoryId);
|
|
230
|
-
|
|
231
|
-
cy.deleteRepository(repositoryId);
|
|
232
|
-
});
|
|
233
|
-
|
|
234
|
-
it('Test saved SPARQL queries links on home page and confirm dialog appearance', () => {
|
|
235
|
-
const repositoryId = HomeSteps.createRepo();
|
|
236
|
-
HomeSteps.selectRepo(repositoryId);
|
|
237
|
-
|
|
238
|
-
HomeSteps.verifyQueryLink('Add statements', true);
|
|
239
|
-
HomeSteps.verifyQueryLink('Clear graph', true);
|
|
240
|
-
HomeSteps.verifyQueryLink('Remove statements', true);
|
|
241
|
-
HomeSteps.verifyQueryLink('SPARQL Select template', false);
|
|
242
|
-
|
|
243
|
-
cy.deleteRepository(repositoryId);
|
|
244
|
-
});
|
|
245
|
-
});
|
|
246
|
-
|
|
247
|
-
context('"View resource" autocomplete', () => {
|
|
248
|
-
it('Test homepage autocomplete when it is enabled', () => {
|
|
249
|
-
const repositoryId = HomeSteps.createRepo();
|
|
250
|
-
HomeSteps.selectRepo(repositoryId);
|
|
251
|
-
|
|
252
|
-
// Type an invalid resource
|
|
253
|
-
HomeSteps.getAutocompleteInput().type('hfsafa');
|
|
254
|
-
HomeSteps.noAutocompleteToast();
|
|
255
|
-
|
|
256
|
-
cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
|
|
257
|
-
cy.enableAutocomplete(repositoryId);
|
|
258
|
-
|
|
259
|
-
HomeSteps.visitAndWaitLoader(true).then((el) => el)
|
|
260
|
-
.then(() => HomeSteps.getAutocompleteDisplayTypeButton('table').click())
|
|
261
|
-
.then(() => HomeSteps.autocompleteText('Green', GOBLIN_URI))
|
|
262
|
-
.then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
|
|
263
|
-
.then(() => // Search result should be opened in new window
|
|
264
|
-
cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
|
|
265
|
-
.then(() => HomeSteps.getAutocompleteDisplayTypeButton('visual').click())
|
|
266
|
-
.then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
|
|
267
|
-
.then(() => // Search result should be opened in new window
|
|
268
|
-
cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
|
|
269
|
-
cy.deleteRepository(repositoryId);
|
|
270
|
-
});
|
|
271
|
-
|
|
272
|
-
it('should not suggest resources in "View resources" when autocomplete is not enabled', () => {
|
|
273
|
-
const repositoryId = HomeSteps.createRepo();
|
|
274
|
-
cy.importRDFTextSnippet(repositoryId, FOAT_SNIPPET);
|
|
275
|
-
|
|
276
|
-
HomeSteps.visitAndWaitLoader();
|
|
277
|
-
HomeSteps.selectRepo(repositoryId);
|
|
278
|
-
|
|
279
|
-
HomeSteps.getAutocompleteInput().type('Green');
|
|
280
|
-
HomeSteps.noAutocompleteToast();
|
|
281
|
-
|
|
282
|
-
cy.deleteRepository(repositoryId);
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
context('Set preferred language', () => {
|
|
287
|
-
beforeEach(() => HomeSteps.visitAndWaitLoader());
|
|
288
|
-
it('language button should be visible and actionable', () => {
|
|
289
|
-
cy.get('#languageGroupDrop')
|
|
290
|
-
.should('be.visible')
|
|
291
|
-
.click()
|
|
292
|
-
.then(() => {
|
|
293
|
-
cy.get('.dropdown-menu .dropdown-item')
|
|
294
|
-
.should('have.length.at.least', 1);
|
|
295
|
-
});
|
|
296
|
-
});
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
function getRDFResourceSearchBox() {
|
|
300
|
-
return cy.get('rdf-resource-search').should('be.visible');
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
function getVisualButton() {
|
|
304
|
-
return cy.get('.display-type-visual-btn').should('be.visible');
|
|
305
|
-
}
|
|
306
30
|
});
|
|
@@ -99,11 +99,14 @@ describe('Import user data: File upload', () => {
|
|
|
99
99
|
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
100
100
|
// When I upload a file
|
|
101
101
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
102
|
+
// Then the import settings dialog should open automatically
|
|
103
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
102
104
|
ImportSettingsDialogSteps.import();
|
|
103
105
|
// Then I should see the uploaded file
|
|
104
106
|
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
105
107
|
// When I upload another file
|
|
106
108
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[1], jsonld));
|
|
109
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
107
110
|
ImportSettingsDialogSteps.import();
|
|
108
111
|
// Then I should see the uploaded file - it becomes first in the list
|
|
109
112
|
ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
|
|
@@ -111,6 +114,7 @@ describe('Import user data: File upload', () => {
|
|
|
111
114
|
// When I override the first file
|
|
112
115
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
113
116
|
FileOverwriteDialogSteps.overwrite();
|
|
117
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
114
118
|
ImportSettingsDialogSteps.import();
|
|
115
119
|
// Then I should see the uploaded file - it becomes first in the list
|
|
116
120
|
// TODO: timestamps currently seems to not be changed on reimport
|
|
@@ -119,6 +123,7 @@ describe('Import user data: File upload', () => {
|
|
|
119
123
|
// When I override the second file
|
|
120
124
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[1], jsonld));
|
|
121
125
|
FileOverwriteDialogSteps.overwrite();
|
|
126
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
122
127
|
ImportSettingsDialogSteps.import();
|
|
123
128
|
// Then I should see the uploaded file - it becomes first in the list
|
|
124
129
|
ImportUserDataSteps.checkImportedResource(0, 'jsonld.jsonld');
|
|
@@ -131,6 +136,7 @@ describe('Import user data: File upload', () => {
|
|
|
131
136
|
// When I start to upload a file
|
|
132
137
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
133
138
|
// Then the import settings dialog should open automatically
|
|
139
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
134
140
|
ImportSettingsDialogSteps.uploadOnly();
|
|
135
141
|
// Then I should see the uploaded file
|
|
136
142
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
@@ -149,6 +155,7 @@ describe('Import user data: File upload', () => {
|
|
|
149
155
|
const file2 = ImportUserDataSteps.createFile(testFiles[1], jsonld);
|
|
150
156
|
ImportUserDataSteps.selectFile([file1, file2]);
|
|
151
157
|
// Then the import settings dialog should open automatically
|
|
158
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
152
159
|
ImportSettingsDialogSteps.import();
|
|
153
160
|
// Then I should see the uploaded file
|
|
154
161
|
ImportUserDataSteps.getResources().should('have.length', 2);
|
|
@@ -165,6 +172,8 @@ describe('Import user data: File upload', () => {
|
|
|
165
172
|
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
166
173
|
const file1 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
|
|
167
174
|
ImportUserDataSteps.selectFile(file1);
|
|
175
|
+
// Then the import settings dialog should open automatically
|
|
176
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
168
177
|
ImportSettingsDialogSteps.import();
|
|
169
178
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
170
179
|
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
@@ -186,6 +195,8 @@ describe('Import user data: File upload', () => {
|
|
|
186
195
|
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
187
196
|
const file1 = ImportUserDataSteps.createFile(testFiles[0], bnodes);
|
|
188
197
|
ImportUserDataSteps.selectFile(file1);
|
|
198
|
+
// Then the import settings dialog should open automatically
|
|
199
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
189
200
|
ImportSettingsDialogSteps.import();
|
|
190
201
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
191
202
|
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
@@ -220,6 +231,8 @@ describe('Import user data: File upload', () => {
|
|
|
220
231
|
// When I upload a file with invalid format
|
|
221
232
|
const file1 = ImportUserDataSteps.createFile(testFiles[2], jsonld);
|
|
222
233
|
ImportUserDataSteps.selectFile(file1);
|
|
234
|
+
// Then the import settings dialog should open automatically
|
|
235
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
223
236
|
ImportSettingsDialogSteps.import();
|
|
224
237
|
// Then I should see an error message
|
|
225
238
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
@@ -28,7 +28,12 @@ describe('Import user data', () => {
|
|
|
28
28
|
cy.url().should('include', '/import#user');
|
|
29
29
|
// Then I should see the user help icons
|
|
30
30
|
ImportUserDataSteps.showPageInfoPopover();
|
|
31
|
-
ImportUserDataSteps.getPageInfoPopover()
|
|
31
|
+
ImportUserDataSteps.getPageInfoPopover()
|
|
32
|
+
.should('be.visible')
|
|
33
|
+
.find('a')
|
|
34
|
+
.should('have.attr', 'href', 'https://graphdb.ontotext.com/documentation/master/loading-data-using-the-workbench.html')
|
|
35
|
+
.and('contain.text', 'Learn more in the GraphDB documentation');
|
|
36
|
+
ImportUserDataSteps.hidePageInfoPopover();
|
|
32
37
|
// And user data import tab should be selected by default
|
|
33
38
|
ImportUserDataSteps.getActiveTab().should('have.text', 'User data');
|
|
34
39
|
ImportUserDataSteps.getUserDataTab().should('be.visible');
|
|
@@ -31,6 +31,8 @@ describe('Import view', () => {
|
|
|
31
31
|
// Given I have opened the user data tab and uploaded a single file
|
|
32
32
|
ImportUserDataSteps.getResourcesTable().should('be.hidden');
|
|
33
33
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
34
|
+
// Then the import settings dialog should open automatically
|
|
35
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
34
36
|
ImportSettingsDialogSteps.import();
|
|
35
37
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
36
38
|
ImportUserDataSteps.getResourceByName('bnodes.ttl').should('be.visible');
|
|
@@ -43,6 +45,7 @@ describe('Import view', () => {
|
|
|
43
45
|
// Then I should see the uploaded file
|
|
44
46
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
45
47
|
ImportUserDataSteps.getResourceByName('bnodes.ttl').should('be.visible');
|
|
48
|
+
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
46
49
|
});
|
|
47
50
|
|
|
48
51
|
it('Should display/hide help message depends on resource result', () => {
|
|
@@ -99,10 +102,12 @@ describe('Import view', () => {
|
|
|
99
102
|
// When I go to user tab and upload a file
|
|
100
103
|
ImportSteps.openUserDataTab();
|
|
101
104
|
// And I wait for tab data to load
|
|
102
|
-
cy.wait(100);
|
|
103
105
|
ImportUserDataSteps.selectFile(ImportUserDataSteps.createFile(testFiles[0], bnodes));
|
|
106
|
+
// Then the import settings dialog should open automatically
|
|
107
|
+
ImportSettingsDialogSteps.getDialog().should('be.visible');
|
|
104
108
|
ImportSettingsDialogSteps.import();
|
|
105
109
|
ImportUserDataSteps.getResources().should('have.length', 1);
|
|
110
|
+
ImportUserDataSteps.checkImportedResource(0, 'bnodes.ttl');
|
|
106
111
|
|
|
107
112
|
// Then I expect the help message not exist, because user because there are resource displayed
|
|
108
113
|
ImportUserDataSteps.getHelpMessage().should('not.exist');
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {LicenseSteps} from "../../steps/license-steps";
|
|
2
|
+
import {LicenseStubs} from "../../stubs/license-stubs";
|
|
3
|
+
|
|
4
|
+
describe('License', () => {
|
|
5
|
+
it('Should displays an informational message if the license is provided through a file (hardcoded)', () => {
|
|
6
|
+
LicenseStubs.stubLicenseHardcoded(true);
|
|
7
|
+
LicenseStubs.stubEnterpriseLicense();
|
|
8
|
+
LicenseSteps.visit();
|
|
9
|
+
LicenseSteps.getLicenseHeader().should('have.text', "GraphDB Enterprise Edition");
|
|
10
|
+
|
|
11
|
+
LicenseSteps.getHardcodedAlertMessage().should('exist');
|
|
12
|
+
LicenseSteps.getRevertToFreeLicenseButton().should('not.exist');
|
|
13
|
+
LicenseSteps.getSetNewLicenseElement().should('not.exist');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('Should not displays an informational message if the license is not provided through a file (not hardcoded)', () => {
|
|
17
|
+
LicenseStubs.stubLicenseHardcoded(false);
|
|
18
|
+
LicenseStubs.stubEnterpriseLicense();
|
|
19
|
+
LicenseSteps.visit();
|
|
20
|
+
LicenseSteps.getLicenseHeader().should('have.text', "GraphDB Enterprise Edition");
|
|
21
|
+
|
|
22
|
+
LicenseSteps.getHardcodedAlertMessage().should('not.exist');
|
|
23
|
+
LicenseSteps.getRevertToFreeLicenseButton().should('exist');
|
|
24
|
+
LicenseSteps.getSetNewLicenseElement().should('exist');
|
|
25
|
+
});
|
|
26
|
+
});
|