graphdb-workbench-tests 3.3.3 → 3.4.0-TR1
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-flaky.config.js +2 -0
- package/cypress-legacy.config.js +2 -2
- package/cypress-security.config.js +3 -14
- package/e2e-flaky/import/import-server-files-operations.spec.js +1 -1
- package/e2e-flaky/import/import-user-data-batch-operations.spec.js +1 -1
- package/e2e-flaky/setup/sparql-template-create.js +3 -18
- package/e2e-flaky/sparql-editor/actions/execute-update-query.spec.js +2 -12
- package/e2e-flaky/sparql-editor/actions/share-query.spec.js +1 -7
- package/e2e-flaky/sparql-editor/yasr/table-plugin.spec.js +1 -6
- package/e2e-legacy/explore/visual-graph/visual-graph-links-limit.spec.js +140 -0
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +57 -85
- package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
- package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
- package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
- package/e2e-legacy/guides/navigation/navigation-guide.spec.js +64 -0
- package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
- package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +167 -0
- package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +2 -2
- package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +372 -0
- package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
- package/e2e-legacy/help/guides/guides-autostart.spec.js +36 -3
- package/e2e-legacy/help/guides/guides-confirm-cancel-dialog.js +83 -0
- package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
- package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +1 -0
- package/e2e-legacy/resource/resource.spec.js +1 -6
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
- package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
- package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +1 -1
- package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
- package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
- package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
- package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
- package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +1 -6
- package/e2e-legacy/sparql-editor/yasr/yasr.spec.js +80 -0
- package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
- package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
- package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +73 -61
- package/fixtures/guides/confirm-cancel-dialog/confirm-cancel-dialog-guide.json +15 -0
- package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
- package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
- package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
- package/fixtures/guides/navigation/navigation-guide.json +60 -0
- package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
- package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
- package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
- package/fixtures/guides/visual-graph/visual-graph-config-guide.json +39 -0
- package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
- package/fixtures/guides/welcome/welcome-guide.json +18 -0
- package/npm-shrinkwrap.json +329 -276
- package/package.json +1 -1
- package/steps/guides/guide-dialog-steps.js +60 -2
- package/steps/main-menu-steps.js +1 -0
- package/steps/setup/acl-management-steps.js +4 -0
- package/steps/sparql-editor-steps.js +5 -4
- package/steps/sparql-steps.js +13 -1
- package/steps/visual-graph-steps.js +76 -2
- package/steps/yasgui/yasqe-steps.js +29 -4
- package/steps/yasgui/yasr-steps.js +27 -1
- package/stubs/guides/guides-stubs.js +41 -1
package/cypress-flaky.config.js
CHANGED
package/cypress-legacy.config.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { defineConfig } from 'cypress';
|
|
2
2
|
import setupPlugins from './plugins/index.js';
|
|
3
3
|
|
|
4
|
-
const isCoverage = process.env.COVERAGE === 'true';
|
|
5
|
-
|
|
6
|
-
const loadCodeCoverage = async (on, config) => {
|
|
7
|
-
const mod = await import('@bahmutov/cypress-code-coverage/plugin');
|
|
8
|
-
const plugin = ('default' in mod) ? mod.default : mod;
|
|
9
|
-
plugin(on, config);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
4
|
export default defineConfig({
|
|
13
5
|
projectId: 'v35btb',
|
|
14
6
|
fixturesFolder: 'fixtures',
|
|
@@ -17,8 +9,8 @@ export default defineConfig({
|
|
|
17
9
|
video: true,
|
|
18
10
|
defaultCommandTimeout: 25000,
|
|
19
11
|
numTestsKeptInMemory: 10,
|
|
20
|
-
viewportWidth:
|
|
21
|
-
viewportHeight:
|
|
12
|
+
viewportWidth: 1600,
|
|
13
|
+
viewportHeight: 1200,
|
|
22
14
|
e2e: {
|
|
23
15
|
retries: {
|
|
24
16
|
runMode: 2,
|
|
@@ -28,14 +20,11 @@ export default defineConfig({
|
|
|
28
20
|
// You may want to clean this up later by importing these.
|
|
29
21
|
async setupNodeEvents(on, config) {
|
|
30
22
|
setupPlugins(on, config);
|
|
31
|
-
if (isCoverage) {
|
|
32
|
-
await loadCodeCoverage(on, config);
|
|
33
|
-
}
|
|
34
23
|
return config;
|
|
35
24
|
},
|
|
36
25
|
baseUrl: 'http://localhost:9000',
|
|
37
26
|
specPattern: 'e2e-security/**/*.{js,jsx,ts,tsx}',
|
|
38
|
-
supportFile: 'support/e2e.js',
|
|
27
|
+
supportFile: 'support/e2e-security.js',
|
|
39
28
|
reporter: "cypress-multi-reporters",
|
|
40
29
|
reporterOptions: {
|
|
41
30
|
configFile: 'cypress-reporter-config.json'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {ImportServerFilesSteps} from "../../steps/import/import-server-files-steps";
|
|
2
2
|
import {ImportSettingsDialogSteps} from "../../steps/import/import-settings-dialog-steps";
|
|
3
3
|
|
|
4
|
-
describe('Import server files - Operations',
|
|
4
|
+
describe('Import server files - Operations', () => {
|
|
5
5
|
|
|
6
6
|
let repositoryId;
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ const jsonld = JSON.stringify({
|
|
|
14
14
|
"ab:email": "richard491@hotmail.com"
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
describe('Import user data: Batch operations',
|
|
17
|
+
describe('Import user data: Batch operations', () => {
|
|
18
18
|
|
|
19
19
|
let repositoryId;
|
|
20
20
|
const testFiles = [
|
|
@@ -26,12 +26,7 @@ describe('SPARQL create template', () => {
|
|
|
26
26
|
cy.deleteRepository(secondRepositoryId);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
it('should has error message described that query is invalid', {
|
|
30
|
-
retries: {
|
|
31
|
-
runMode: 1,
|
|
32
|
-
openMode: 0
|
|
33
|
-
}
|
|
34
|
-
}, () => {
|
|
29
|
+
it('should has error message described that query is invalid', () => {
|
|
35
30
|
// When I visit 'Sparql create template' view,
|
|
36
31
|
// and fill valid template id.
|
|
37
32
|
SparqlCreateUpdateSteps.typeTemplateId('http://test');
|
|
@@ -48,12 +43,7 @@ describe('SPARQL create template', () => {
|
|
|
48
43
|
/**
|
|
49
44
|
* TODO: Fix me. Broken due to migration (Repository selector changed)
|
|
50
45
|
*/
|
|
51
|
-
it.skip('should display confirm dialog I am updating a sparql template and change the repository', {
|
|
52
|
-
retries: {
|
|
53
|
-
runMode: 1,
|
|
54
|
-
openMode: 0
|
|
55
|
-
}
|
|
56
|
-
}, () => {
|
|
46
|
+
it.skip('should display confirm dialog I am updating a sparql template and change the repository', () => {
|
|
57
47
|
// When I visit 'Sparql create template' view,
|
|
58
48
|
// create a SPARQL template
|
|
59
49
|
const templateId = 'http://' + Date.now();
|
|
@@ -119,12 +109,7 @@ describe('SPARQL create template', () => {
|
|
|
119
109
|
/**
|
|
120
110
|
* TODO: Fix me. Broken due to migration (Changes in main menu)
|
|
121
111
|
*/
|
|
122
|
-
it.skip('should confirm me before navigate when query is changed', {
|
|
123
|
-
retries: {
|
|
124
|
-
runMode: 1,
|
|
125
|
-
openMode: 0
|
|
126
|
-
}
|
|
127
|
-
}, () => {
|
|
112
|
+
it.skip('should confirm me before navigate when query is changed', () => {
|
|
128
113
|
// When I visit 'Sparql create template' view,
|
|
129
114
|
// and change the query in ontotext-yasgui editor.
|
|
130
115
|
// When I fill non update query (select for example).
|
|
@@ -22,12 +22,7 @@ describe('Execute of update query', () => {
|
|
|
22
22
|
cy.deleteRepository(repositoryId);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
-
it('should display properly result message info when insert 2 statements', {
|
|
26
|
-
retries: {
|
|
27
|
-
runMode: 1,
|
|
28
|
-
openMode: 0
|
|
29
|
-
}
|
|
30
|
-
}, () => {
|
|
25
|
+
it('should display properly result message info when insert 2 statements', () => {
|
|
31
26
|
// When I execute insert query which adds 2 results
|
|
32
27
|
YasqeSteps.pasteQuery(
|
|
33
28
|
'PREFIX : <http://bedrock/> ' +
|
|
@@ -56,12 +51,7 @@ describe('Execute of update query', () => {
|
|
|
56
51
|
TablePluginSteps.getQueryResultInfo().contains('The number of statements did not change.');
|
|
57
52
|
});
|
|
58
53
|
|
|
59
|
-
it('should display result message info which describes that two statements are removed', {
|
|
60
|
-
retries: {
|
|
61
|
-
runMode: 1,
|
|
62
|
-
openMode: 0
|
|
63
|
-
}
|
|
64
|
-
}, () => {
|
|
54
|
+
it('should display result message info which describes that two statements are removed', () => {
|
|
65
55
|
// When I visit a page with "ontotext-yasgui-web-component" in it,
|
|
66
56
|
// and selected repository has some inserted statements.
|
|
67
57
|
YasqeSteps.pasteQuery(
|
|
@@ -47,13 +47,7 @@ describe('Share query', () => {
|
|
|
47
47
|
ApplicationSteps.getSuccessNotifications().should('be.visible');
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
it('Should be able to open a share link in a new editor tab',
|
|
51
|
-
{
|
|
52
|
-
retries: {
|
|
53
|
-
runMode: 1,
|
|
54
|
-
openMode: 0
|
|
55
|
-
}
|
|
56
|
-
}, () => {
|
|
50
|
+
it('Should be able to open a share link in a new editor tab',() => {
|
|
57
51
|
// Given I have opened the sparql editor
|
|
58
52
|
YasguiSteps.getTabs().should('have.length', 1);
|
|
59
53
|
// When I get the shareable link for current query
|
|
@@ -35,12 +35,7 @@ describe.skip('Yasr Table plugin', () => {
|
|
|
35
35
|
YasrSteps.getCopyResourceLink(28, 2).should('be.visible');
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
it('Should be able to copy a link', {
|
|
39
|
-
retries: {
|
|
40
|
-
runMode: 1,
|
|
41
|
-
openMode: 0
|
|
42
|
-
}
|
|
43
|
-
}, () => {
|
|
38
|
+
it('Should be able to copy a link', () => {
|
|
44
39
|
// When I execute a query which returns results of type is uri.
|
|
45
40
|
QueryStubs.stubDefaultQueryResponse();
|
|
46
41
|
YasqeSteps.executeQuery();
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import {VisualGraphSteps} from '../../../steps/visual-graph-steps';
|
|
2
|
+
import {MainMenuSteps} from '../../../steps/main-menu-steps.js';
|
|
3
|
+
import {LicenseStubs} from '../../../stubs/license-stubs';
|
|
4
|
+
import {ApplicationSteps} from '../../../steps/application-steps';
|
|
5
|
+
import HomeSteps from '../../../steps/home-steps.js';
|
|
6
|
+
import {BaseSteps} from "../../../steps/base-steps.js";
|
|
7
|
+
import SparqlSteps from "../../../steps/sparql-steps.js";
|
|
8
|
+
|
|
9
|
+
const FILE_TO_IMPORT = 'wine.rdf';
|
|
10
|
+
const VALID_RESOURCE = 'USRegion';
|
|
11
|
+
const DEFAULT_LINKS_LIMIT = 100;
|
|
12
|
+
|
|
13
|
+
describe('Visual graph linksLimit URL parameter', () => {
|
|
14
|
+
|
|
15
|
+
let repositoryId;
|
|
16
|
+
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
cy.clearLocalStorage('ls.graphs-viz');
|
|
19
|
+
repositoryId = 'graphRepo-' + Date.now();
|
|
20
|
+
cy.createRepository({id: repositoryId});
|
|
21
|
+
cy.presetRepository(repositoryId);
|
|
22
|
+
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|
|
23
|
+
cy.enableAutocomplete(repositoryId);
|
|
24
|
+
|
|
25
|
+
LicenseStubs.spyGetLicense();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
afterEach(() => {
|
|
29
|
+
cy.clearLocalStorage('ls.graphs-viz');
|
|
30
|
+
cy.deleteRepository(repositoryId);
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('Should include linksLimit as a URL parameter and respect its value', () => {
|
|
34
|
+
// Given I am on the home page, and I don't have a linkLimit in the URL
|
|
35
|
+
HomeSteps.visit();
|
|
36
|
+
BaseSteps.getUrl().should('not.include', 'linksLimit');
|
|
37
|
+
|
|
38
|
+
// When, I visit the visual graph via the main menu and open a resource
|
|
39
|
+
MainMenuSteps.clickOnVisualGraph();
|
|
40
|
+
VisualGraphSteps.verifyPageLoaded();
|
|
41
|
+
VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
|
|
42
|
+
|
|
43
|
+
// Then, I expect to see the visual graph with the default linksLimit
|
|
44
|
+
BaseSteps.getUrl().should('include', `linksLimit=${DEFAULT_LINKS_LIMIT}`);
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// When, I update the link limit from the input field
|
|
48
|
+
VisualGraphSteps.updateLinksLimitField(5);
|
|
49
|
+
|
|
50
|
+
// Then I expect the URL to include the updated linksLimit in the URL
|
|
51
|
+
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
52
|
+
// And, I expect to see the visual graph with the updated linksLimit
|
|
53
|
+
VisualGraphSteps.getNodes().should('have.length', 6); // 5 links plus the main node
|
|
54
|
+
|
|
55
|
+
// When, I change the linksLimit URL param directly to 10 and navigate to the updated URL
|
|
56
|
+
BaseSteps.getUrl().then((url) => {
|
|
57
|
+
const newUrl = new URL(url);
|
|
58
|
+
newUrl.searchParams.set('linksLimit', '10');
|
|
59
|
+
BaseSteps.visit(newUrl.toString().replace(Cypress.config('baseUrl'), ''));
|
|
60
|
+
});
|
|
61
|
+
// Then, I expect to see the visual graph with the updated linksLimit
|
|
62
|
+
VisualGraphSteps.getNodes().should('have.length', 11) // 10 links plus the main node;
|
|
63
|
+
// And, I expect the menu to be updated with the new linksLimit
|
|
64
|
+
VisualGraphSteps.getLinksNumberField().should('have.value', '10');
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('Should show an error toast and ignore linksLimit when the URL param value is invalid', () => {
|
|
68
|
+
// Given, I visit the visual graph with an invalid linksLimit URL param (outside the 1-1000 range)
|
|
69
|
+
BaseSteps.visit(`/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23${VALID_RESOURCE}&linksLimit=9999`);
|
|
70
|
+
|
|
71
|
+
// Then, I expect to see an error notification about the invalid links limit
|
|
72
|
+
ApplicationSteps.getErrorNotifications()
|
|
73
|
+
.should('be.visible')
|
|
74
|
+
.and('contain', 'Invalid links limit');
|
|
75
|
+
// And I expect to see the visual graph with the default linksLimit
|
|
76
|
+
BaseSteps.getUrl().should('include', 'linksLimit=100');
|
|
77
|
+
VisualGraphSteps.getLinksNumberField().should('have.value', String(DEFAULT_LINKS_LIMIT));
|
|
78
|
+
|
|
79
|
+
// When, I try to set the limit to an invalid value via the form
|
|
80
|
+
VisualGraphSteps.updateLinksLimitField(1001);
|
|
81
|
+
|
|
82
|
+
// Then, I should see a warning message that the link limit is invalid
|
|
83
|
+
VisualGraphSteps.getInvalidLinksMessage().should('be.visible').and('contain', 'Enter a number up to 1000');
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
describe('When the user has a custom graph config', () => {
|
|
87
|
+
const configName = 'linkLimitConfig';
|
|
88
|
+
|
|
89
|
+
it('should change link limit, when starting point is query', () => {
|
|
90
|
+
// Given, I visit the visual graph and create a config with query starting point
|
|
91
|
+
VisualGraphSteps.visit();
|
|
92
|
+
VisualGraphSteps.createCustomGraph();
|
|
93
|
+
VisualGraphSteps.typeGraphConfigName(configName);
|
|
94
|
+
VisualGraphSteps.selectStartMode('query');
|
|
95
|
+
VisualGraphSteps.selectPredefinedQuerySample(0);
|
|
96
|
+
VisualGraphSteps.saveConfig();
|
|
97
|
+
VisualGraphSteps.openGraphConfig(configName);
|
|
98
|
+
|
|
99
|
+
// Then, I expect to see 10 nodes before changing the limit
|
|
100
|
+
BaseSteps.getUrl().should('include', 'linksLimit=10');
|
|
101
|
+
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
102
|
+
|
|
103
|
+
// When, I update the link limit from the input field
|
|
104
|
+
VisualGraphSteps.updateLinksLimitField(5);
|
|
105
|
+
|
|
106
|
+
// Then I expect the URL to include the updated linksLimit in the URL
|
|
107
|
+
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
108
|
+
// And, I expect to see the visual graph with the updated linksLimit
|
|
109
|
+
VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
afterEach(() => {
|
|
113
|
+
cy.deleteGraphConfig(configName)
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
describe('When the user has opened a graph with construct query', () => {
|
|
118
|
+
it('should change link limit, when is graph is opened in queryResultsMode', () => {
|
|
119
|
+
// Given, I open a graph in queryResultsMode (after construct query in the SPARQL editor)
|
|
120
|
+
// And enter a construct query, so I can visualize the results in a graph
|
|
121
|
+
SparqlSteps.visit();
|
|
122
|
+
SparqlSteps.typeQuery(`CONSTRUCT WHERE {?s ?p ?o} LIMIT 10`);
|
|
123
|
+
SparqlSteps.executeQuery();
|
|
124
|
+
SparqlSteps.visualizeConstructQuery();
|
|
125
|
+
|
|
126
|
+
// Then, I expect to see 10 nodes before changing the limit
|
|
127
|
+
VisualGraphSteps.getNodes().should('have.length', 10); // 10 nodes total, since we don't have a root node
|
|
128
|
+
|
|
129
|
+
// When, I update the link limit from the input field
|
|
130
|
+
VisualGraphSteps.updateLinksLimitField(5);
|
|
131
|
+
|
|
132
|
+
// Then I expect the URL to include the updated linksLimit in the URL
|
|
133
|
+
BaseSteps.getUrl().should('include', 'linksLimit=5');
|
|
134
|
+
// And, I expect to see the visual graph with the updated linksLimit
|
|
135
|
+
VisualGraphSteps.getNodes().should('have.length', 5); // 5 nodes total, since we don't have a root node
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
|
|
@@ -26,9 +26,9 @@ describe('Visual graph screen validation', () => {
|
|
|
26
26
|
cy.deleteRepository(repositoryId);
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
describe('Embedded', () => {
|
|
30
30
|
it('Should not show main manu, header and footer in embedded mode', () => {
|
|
31
|
-
cy.visit('/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Chardonnay&embedded')
|
|
31
|
+
cy.visit('/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Chardonnay&embedded');
|
|
32
32
|
VisualGraphSteps.verifyPageLoaded();
|
|
33
33
|
MainMenuSteps.getMainMenu().should('not.exist');
|
|
34
34
|
HomeSteps.getPageFooter().should('not.exist');
|
|
@@ -36,7 +36,7 @@ describe('Visual graph screen validation', () => {
|
|
|
36
36
|
});
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
describe('When autocomplete is disabled', () => {
|
|
40
40
|
it('Test notification when autocomplete is disabled', () => {
|
|
41
41
|
cy.visit('graphs-visualizations');
|
|
42
42
|
cy.window();
|
|
@@ -50,7 +50,7 @@ describe('Visual graph screen validation', () => {
|
|
|
50
50
|
});
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
describe('When autocomplete is enabled', () => {
|
|
54
54
|
beforeEach(() => {
|
|
55
55
|
cy.enableAutocomplete(repositoryId);
|
|
56
56
|
//http://localhost:9000/graphs-visualizations?uri=http:%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23USRegion
|
|
@@ -66,12 +66,7 @@ describe('Visual graph screen validation', () => {
|
|
|
66
66
|
ApplicationSteps.getErrorNotifications().should('be.visible').and('contain', 'Invalid IRI');
|
|
67
67
|
});
|
|
68
68
|
|
|
69
|
-
it('Test search for a valid resource', {
|
|
70
|
-
retries: {
|
|
71
|
-
openMode: 0,
|
|
72
|
-
runMode: 1,
|
|
73
|
-
},
|
|
74
|
-
}, () => {
|
|
69
|
+
it('Test search for a valid resource', () => {
|
|
75
70
|
AutocompleteStubs.spyAutocompleteStatus();
|
|
76
71
|
VisualGraphSteps.visit();
|
|
77
72
|
// Verify autocomplete is ON, because sometimes in CI it is OFF and fails when searching for Resource
|
|
@@ -89,12 +84,12 @@ describe('Visual graph screen validation', () => {
|
|
|
89
84
|
|
|
90
85
|
it('Test default graph state', () => {
|
|
91
86
|
VisualGraphSteps.openUSRegionUri();
|
|
92
|
-
|
|
87
|
+
// Verify that the default settings are as follows:
|
|
88
|
+
// Maximum links to show: 100
|
|
89
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '100');
|
|
93
90
|
|
|
91
|
+
VisualGraphSteps.openVisualGraphSettings();
|
|
94
92
|
cy.get('.filter-sidepanel').as('sidepanel').should('be.visible').within(() => {
|
|
95
|
-
// Verify that the default settings are as follows:
|
|
96
|
-
// Maximum links to show: 20
|
|
97
|
-
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
98
93
|
// Preferred lang: en
|
|
99
94
|
cy.get('.preferred-languages .tag-item').should('have.length', 1)
|
|
100
95
|
.and('contain', 'en');
|
|
@@ -131,32 +126,17 @@ describe('Visual graph screen validation', () => {
|
|
|
131
126
|
|
|
132
127
|
it('Test invalid links limit should show error to user ', () => {
|
|
133
128
|
VisualGraphSteps.openUSRegionUri();
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
.should('be.visible')
|
|
146
|
-
.and('contain.text', 'Invalid links limit');
|
|
147
|
-
});
|
|
148
|
-
// Try to save the invalid value
|
|
149
|
-
VisualGraphSteps.getSaveSettingsButton().and('not.be.disabled')
|
|
150
|
-
.click();
|
|
151
|
-
// Then reset to default settings
|
|
152
|
-
VisualGraphSteps.getResetSettingsButton().and('not.be.disabled')
|
|
153
|
-
.click()
|
|
154
|
-
.then(() => {
|
|
155
|
-
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
156
|
-
cy.get('.idError')
|
|
157
|
-
.should('not.exist');
|
|
158
|
-
});
|
|
159
|
-
});
|
|
129
|
+
// Verify that the default settings are as follows:
|
|
130
|
+
// Maximum links to show: 100
|
|
131
|
+
VisualGraphSteps.getLinksNumberField().and('have.value', '100');
|
|
132
|
+
// Update default 100
|
|
133
|
+
VisualGraphSteps.updateLinksLimitField('1001')
|
|
134
|
+
.then(() => {
|
|
135
|
+
// Try to put invalid value such as 1001
|
|
136
|
+
cy.get('.idError')
|
|
137
|
+
.should('be.visible')
|
|
138
|
+
.and('contain.text', 'Enter a number up to 1000');
|
|
139
|
+
});
|
|
160
140
|
});
|
|
161
141
|
|
|
162
142
|
it('Test search for a valid resource with links', () => {
|
|
@@ -167,10 +147,10 @@ describe('Visual graph screen validation', () => {
|
|
|
167
147
|
VisualGraphSteps.openVisualGraphHome();
|
|
168
148
|
// Search for "USRegion" again
|
|
169
149
|
VisualGraphSteps.searchForResourceAndOpen(VALID_RESOURCE, VALID_RESOURCE);
|
|
170
|
-
// Verify that
|
|
171
|
-
VisualGraphSteps.getPredicates().should('have.length',
|
|
150
|
+
// Verify that 36 links (nodes) are displayed
|
|
151
|
+
VisualGraphSteps.getPredicates().should('have.length', 36);
|
|
172
152
|
// Verify that links are counted by nodes and not by triples (predicates)
|
|
173
|
-
VisualGraphSteps.getNodes().and('have.length',
|
|
153
|
+
VisualGraphSteps.getNodes().and('have.length', 37);
|
|
174
154
|
});
|
|
175
155
|
|
|
176
156
|
it('Test collapse and expand a node', () => {
|
|
@@ -218,6 +198,7 @@ describe('Visual graph screen validation', () => {
|
|
|
218
198
|
// Verify that before given node is removed there are 4 of them
|
|
219
199
|
VisualGraphSteps.getNodes().and('have.length', 4);
|
|
220
200
|
// Click once on node different than parent one with the mouse
|
|
201
|
+
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
|
221
202
|
cy.get('.node-wrapper circle').eq(1)
|
|
222
203
|
// The wait is needed because mouseover event will result in
|
|
223
204
|
// pop-up of menu icons only if nodes are not moving
|
|
@@ -269,34 +250,34 @@ describe('Visual graph screen validation', () => {
|
|
|
269
250
|
});
|
|
270
251
|
|
|
271
252
|
it('Test verify mouse/keyboard actions', () => {
|
|
272
|
-
const mouseActions = '
|
|
273
|
-
'\n
|
|
274
|
-
'
|
|
275
|
-
'
|
|
276
|
-
'
|
|
277
|
-
'
|
|
278
|
-
'
|
|
279
|
-
'Removes a node and its links\n
|
|
280
|
-
'Ctrl
|
|
281
|
-
'
|
|
282
|
-
'Click
|
|
283
|
-
'
|
|
284
|
-
'
|
|
285
|
-
'
|
|
286
|
-
'
|
|
287
|
-
'
|
|
288
|
-
|
|
289
|
-
'
|
|
290
|
-
|
|
291
|
-
'Tap
|
|
292
|
-
'
|
|
293
|
-
'Tap
|
|
294
|
-
'
|
|
295
|
-
|
|
296
|
-
'
|
|
297
|
-
|
|
298
|
-
'
|
|
299
|
-
'Rotate the graph to the right\n';
|
|
253
|
+
const mouseActions = 'MOUSE ACTIONS\n \n \n ' +
|
|
254
|
+
'Single click\n ' +
|
|
255
|
+
'View node details and properties\n \n \n ' +
|
|
256
|
+
'Double click\n ' +
|
|
257
|
+
'Load node connections\n \n \n ' +
|
|
258
|
+
'Ctrl|Cmd\n ' +
|
|
259
|
+
'Click\n ' +
|
|
260
|
+
'Removes a node and its links\n \n \n ' +
|
|
261
|
+
'Ctrl|Cmd\n ' +
|
|
262
|
+
'Shift\n ' +
|
|
263
|
+
'Click\n ' +
|
|
264
|
+
'Restart the view with that node as a central one\n \n \n ' +
|
|
265
|
+
'Click and drag a node\n ' +
|
|
266
|
+
'Move a node by dragging it (will also pin down the node)\n \n \n ' +
|
|
267
|
+
'Right click a node\n ' +
|
|
268
|
+
'Pin down or unpin the node\n \n \n ' +
|
|
269
|
+
'Click and drag outside a node\n ' +
|
|
270
|
+
'Move the whole graph\n \n \n \n \n';
|
|
271
|
+
const touchActions = 'TOUCH ACTIONS\n \n \n ' +
|
|
272
|
+
'Tap\n ' +
|
|
273
|
+
'View node details and properties\n \n \n ' +
|
|
274
|
+
'Tap and hold\n ' +
|
|
275
|
+
'Removes a node and its links\n \n \n ' +
|
|
276
|
+
'Tap twice\n ' +
|
|
277
|
+
'Load node connections\n \n \n \n \n';
|
|
278
|
+
const keyboardActions = 'KEYBOARD ACTIONS\n \n \n \n ' +
|
|
279
|
+
'Rotate the graph to the left\n \n \n \n ' +
|
|
280
|
+
'Rotate the graph to the right\n \n \n \n \n \n';
|
|
300
281
|
|
|
301
282
|
VisualGraphSteps.openUSRegionUri();
|
|
302
283
|
// Click on "mouse and keyboard actions" in the lower right corner of the screen
|
|
@@ -316,20 +297,16 @@ describe('Visual graph screen validation', () => {
|
|
|
316
297
|
it('Test maximum links to show', () => {
|
|
317
298
|
VisualGraphSteps.openUSRegionUri();
|
|
318
299
|
|
|
319
|
-
// Verify that
|
|
320
|
-
VisualGraphSteps.getPredicates().should('have.length',
|
|
300
|
+
// Verify that 36 links (nodes) are displayed
|
|
301
|
+
VisualGraphSteps.getPredicates().should('have.length', 36);
|
|
321
302
|
|
|
322
|
-
VisualGraphSteps.openVisualGraphSettings();
|
|
323
303
|
// Set maximum links to 2
|
|
324
304
|
VisualGraphSteps.updateLinksLimitField('2');
|
|
325
|
-
VisualGraphSteps.saveSettings();
|
|
326
305
|
// Verify that the diagram is updated
|
|
327
306
|
VisualGraphSteps.getPredicates().should('have.length', 2);
|
|
328
307
|
|
|
329
|
-
VisualGraphSteps.openVisualGraphSettings();
|
|
330
308
|
// Set maximum links to 100
|
|
331
309
|
VisualGraphSteps.updateLinksLimitField('100');
|
|
332
|
-
VisualGraphSteps.saveSettings();
|
|
333
310
|
// Verify that the diagram is updated
|
|
334
311
|
VisualGraphSteps.getPredicates().should('have.length', 36);
|
|
335
312
|
});
|
|
@@ -340,10 +317,10 @@ describe('Visual graph screen validation', () => {
|
|
|
340
317
|
VisualGraphSteps.toggleInferredStatements(true);
|
|
341
318
|
|
|
342
319
|
// Verify that many results are displayed
|
|
343
|
-
// Verify that
|
|
344
|
-
VisualGraphSteps.getPredicates().should('have.length',
|
|
320
|
+
// Verify that 36 links (nodes) are displayed
|
|
321
|
+
VisualGraphSteps.getPredicates().should('have.length', 36);
|
|
345
322
|
// Verify that more than three nodes are displayed
|
|
346
|
-
VisualGraphSteps.getNodes().and('have.length',
|
|
323
|
+
VisualGraphSteps.getNodes().and('have.length', 37);
|
|
347
324
|
|
|
348
325
|
// Switch Include Inferred Statements off
|
|
349
326
|
VisualGraphSteps.toggleInferredStatements(false);
|
|
@@ -439,9 +416,6 @@ describe('Visual graph screen validation', () => {
|
|
|
439
416
|
// Modify the settings first
|
|
440
417
|
VisualGraphSteps.openVisualGraphSettings();
|
|
441
418
|
// Verify that the default settings are as follows:
|
|
442
|
-
// Maximum links to show: 20
|
|
443
|
-
VisualGraphSteps.updateLinksLimitField('10')
|
|
444
|
-
.should('have.value', '10');
|
|
445
419
|
// Preferred lang: en
|
|
446
420
|
cy.get('.preferred-languages .tag-item').should('have.length', 1)
|
|
447
421
|
.eq(0).should('contain', 'en');
|
|
@@ -482,8 +456,6 @@ describe('Visual graph screen validation', () => {
|
|
|
482
456
|
|
|
483
457
|
VisualGraphSteps.openVisualGraphSettings();
|
|
484
458
|
// Verify that the default settings are as follows:
|
|
485
|
-
// Maximum links to show: 20
|
|
486
|
-
VisualGraphSteps.getLinksNumberField().and('have.value', '20');
|
|
487
459
|
// Preferred lang: en
|
|
488
460
|
cy.get('.preferred-languages .tag-item').should('have.length', 1);
|
|
489
461
|
// Include inferred: false
|