graphdb-workbench-tests 3.3.1 → 3.4.0-dynamic-guides-test

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 (70) hide show
  1. package/cypress-flaky.config.js +2 -0
  2. package/cypress-legacy.config.js +2 -2
  3. package/cypress-security.config.js +3 -14
  4. package/e2e-flaky/import/import-server-files-operations.spec.js +1 -1
  5. package/e2e-flaky/import/import-user-data-batch-operations.spec.js +1 -1
  6. package/e2e-flaky/setup/sparql-template-create.js +3 -18
  7. package/e2e-flaky/sparql-editor/actions/execute-update-query.spec.js +2 -12
  8. package/e2e-flaky/sparql-editor/actions/share-query.spec.js +1 -7
  9. package/e2e-flaky/sparql-editor/yasr/table-plugin.spec.js +1 -6
  10. package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +2 -7
  11. package/e2e-legacy/graphql/graphql-theme.spec.js +73 -0
  12. package/e2e-legacy/guides/execute-sparql-query/execute-sparql-query-guide.spec.js +92 -0
  13. package/e2e-legacy/guides/import-rdf-file/confirm-duplicate-rdf-file.spec.js +63 -0
  14. package/e2e-legacy/guides/import-rdf-file/import-rdf-file.spec.js +105 -0
  15. package/e2e-legacy/guides/main-menu/main-menu-guide.spec.js +302 -0
  16. package/e2e-legacy/guides/rdf-rank/rdf-rank-guide.spec.js +42 -0
  17. package/e2e-legacy/guides/table-graph-explore/table-graph-explore-guide.spec.js +167 -0
  18. package/e2e-legacy/guides/ttyg/conversation/ttyg-conversation-guide.spec.js +6 -2
  19. package/e2e-legacy/guides/ttyg/edit-agent/edit-ttyg-agent-guide.spec.js +87 -0
  20. package/e2e-legacy/guides/visual-graph/visual-graph-guide.spec.js +166 -0
  21. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +36 -0
  22. package/e2e-legacy/help/guides/movies-interactive-guide.spec.js +47 -49
  23. package/e2e-legacy/import/import-server-files.spec.js +3 -1
  24. package/e2e-legacy/repository/repositories.spec.js +5 -2
  25. package/e2e-legacy/repository/url-with-repository-id-parameter.spec.js +26 -0
  26. package/e2e-legacy/resource/resource.spec.js +1 -6
  27. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +3 -0
  28. package/e2e-legacy/setup/connectors-lucene.spec.js +24 -8
  29. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +36 -0
  30. package/e2e-legacy/sparql-editor/actions/expand-results-over-sameas.spec.js +1 -1
  31. package/e2e-legacy/sparql-editor/actions/show-saved-queries.spec.js +1 -6
  32. package/e2e-legacy/sparql-editor/yasgui-tabs.spec.js +2 -12
  33. package/e2e-legacy/sparql-editor/yasr/pagination.spec.js +5 -18
  34. package/e2e-legacy/sparql-editor/yasr/table-plugin.spec.js +1 -6
  35. package/e2e-legacy/sparql-editor/yasr/toolbar/visual-graph-button.spec.js +1 -6
  36. package/e2e-legacy/ttyg/chat-list.spec.js +2 -12
  37. package/e2e-legacy/ttyg/create-agent.spec.js +8 -48
  38. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -12
  39. package/e2e-security/repository/url-with-repository-id-parameter.spec.js +57 -0
  40. package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +4 -5
  41. package/fixtures/guides/execute-sparql-query/execute-sparql-query-guide.json +54 -0
  42. package/fixtures/guides/import-rdf-file/confirm-duplicate-rdf-file-guide.json +30 -0
  43. package/fixtures/guides/import-rdf-file/import-rdf-file-guide.json +21 -0
  44. package/fixtures/guides/main-menu/main-menu-guide.json +98 -0
  45. package/fixtures/guides/rdf-rank/rdf-rank-guide.json +18 -0
  46. package/fixtures/guides/table-graph-explore/table-graph-explore-guide.json +51 -0
  47. package/fixtures/guides/table-graph-explore/table-graph-explore-without-substeps-guide.json +25 -0
  48. package/fixtures/guides/ttyg/edit-ttyg-agent/edit-ttyg-agent-guide.json +22 -0
  49. package/fixtures/guides/visual-graph/visual-graph-guide.json +85 -0
  50. package/fixtures/guides/welcome/welcome-guide.json +18 -0
  51. package/npm-shrinkwrap.json +317 -263
  52. package/package.json +1 -1
  53. package/steps/base-steps.js +4 -0
  54. package/steps/error-page-steps.js +9 -0
  55. package/steps/graphql/playground-editor-steps.js +46 -0
  56. package/steps/guides/guide-dialog-steps.js +4 -0
  57. package/steps/import/import-resource-message-dialog.js +1 -1
  58. package/steps/login-steps.js +4 -0
  59. package/steps/main-menu-steps.js +12 -0
  60. package/steps/repository-steps.js +2 -2
  61. package/steps/setup/acl-management-steps.js +4 -0
  62. package/steps/setup/user-and-access-steps.js +14 -6
  63. package/steps/sparql-steps.js +13 -1
  64. package/steps/visual-graph-steps.js +17 -1
  65. package/steps/yasgui/yasqe-steps.js +29 -4
  66. package/steps/yasgui/yasr-steps.js +4 -0
  67. package/stubs/guides/guides-stubs.js +41 -1
  68. package/stubs/security-stubs.js +4 -0
  69. package/stubs/ttyg/ttyg-stubs.js +2 -4
  70. package/support/e2e-security.js +9 -0
@@ -0,0 +1,166 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+ import {MainMenuSteps} from "../../../steps/main-menu-steps.js";
5
+ import {VisualGraphSteps} from "../../../steps/visual-graph-steps.js";
6
+
7
+ describe('Visual Graph', () => {
8
+ const FILE_TO_IMPORT = 'wine.rdf';
9
+ let repositoryId;
10
+
11
+ beforeEach(() => {
12
+ repositoryId = 'visual-graph-guide-step-' + Date.now();
13
+ GuidesStubs.stubVisualGraphGuide();
14
+ cy.createRepository({id: repositoryId});
15
+ cy.presetRepository(repositoryId);
16
+ cy.enableAutocomplete(repositoryId);
17
+ cy.importServerFile(repositoryId, FILE_TO_IMPORT);
18
+
19
+ GuideSteps.visit();
20
+ GuideSteps.verifyGuidesListExists();
21
+ cy.wait('@getGuides');
22
+ GuideSteps.runFirstGuide()
23
+ });
24
+
25
+ afterEach(() => {
26
+ cy.deleteRepository(repositoryId);
27
+ });
28
+
29
+ it('Should explore the visual graph (User interaction)', () => {
30
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 1/6');
31
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Visual graph view to explore data in a visual manner.');
32
+ GuideDialogSteps.clickOnNextButton();
33
+
34
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 2/6');
35
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
36
+ MainMenuSteps.clickOnExplore();
37
+
38
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 3/6');
39
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Visual graph menu.');
40
+ MainMenuSteps.clickOnSubmenuVisualGraph();
41
+
42
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 4/6');
43
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enter wine in the Easy graph text input.');
44
+ GuideDialogSteps.clickOnNextButton();
45
+
46
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 5/6');
47
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine IRI to show the visual graph.');
48
+ VisualGraphSteps.clickOnAutocompleteElement('wine <http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine>');
49
+
50
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 6/6');
51
+ GuideDialogSteps.assertDialogWithContentIsVisible('The graph shows connections between the start node, wine, and other nodes. Each arrow represents one or more connections (RDF statements).');
52
+ GuideDialogSteps.clickOnNextButton();
53
+
54
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph nodes');
55
+ GuideDialogSteps.assertDialogWithContentIsVisible('A circle represents an RDF resource. In this case, wine.');
56
+ GuideDialogSteps.clickOnNextButton();
57
+
58
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph links');
59
+ GuideDialogSteps.assertDialogWithContentIsVisible('An arrow with a label represents one or more links between nodes. In this case, the arrow shows the relation Wine → type → Potable Liquid.');
60
+ GuideDialogSteps.clickOnNextButton();
61
+
62
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 1/6');
63
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on Wine to show its properties.');
64
+ VisualGraphSteps.clickOnNode('http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine');
65
+
66
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 2/6');
67
+ GuideDialogSteps.assertDialogWithContentIsVisible('The side panel shows the properties of the clicked node, Wine.');
68
+ GuideDialogSteps.clickOnNextButton();
69
+
70
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 3/6');
71
+ GuideDialogSteps.assertDialogWithContentIsVisible('Types shows all the RDF types for Wine.We can see that Wine has a single type, owl:Class.');
72
+ GuideDialogSteps.clickOnNextButton();
73
+
74
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 4/6');
75
+ GuideDialogSteps.assertDialogWithContentIsVisible('The values for generic properties like rdfs:label are listed in dedicated sections.This shows the label of Wine.');
76
+ GuideDialogSteps.clickOnNextButton();
77
+
78
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 5/6');
79
+ GuideDialogSteps.assertDialogWithContentIsVisible('This shows the label of Wine.');
80
+ GuideDialogSteps.clickOnNextButton();
81
+
82
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 6/6');
83
+ GuideDialogSteps.assertDialogWithContentIsVisible('You can close the panel by clicking on the X icon.');
84
+ VisualGraphSteps.closeSidePanel();
85
+
86
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph: expand node');
87
+ GuideDialogSteps.assertDialogWithContentIsVisible('Double click on Whitehall Lane Primavera to expand the graph.');
88
+ VisualGraphSteps.dblclickOnNode('http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#WhitehallLanePrimavera');
89
+
90
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph nodes');
91
+ GuideDialogSteps.assertDialogWithContentIsVisible('A circle represents an RDF resource. In this case, Napa Region.');
92
+ GuideDialogSteps.clickOnNextButton();
93
+
94
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
95
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
96
+ });
97
+
98
+ it('Should explore the visual graph (Next flow)', () => {
99
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 1/6');
100
+ GuideDialogSteps.assertDialogWithContentIsVisible('The following steps show how to use the Visual graph view to explore data in a visual manner.');
101
+ GuideDialogSteps.clickOnNextButton();
102
+
103
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 2/6');
104
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Explore menu.');
105
+ GuideDialogSteps.clickOnNextButton();
106
+
107
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 3/6');
108
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the Visual graph menu.');
109
+ GuideDialogSteps.clickOnNextButton();
110
+
111
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 4/6');
112
+ GuideDialogSteps.assertDialogWithContentIsVisible('Enter wine in the Easy graph text input.');
113
+ GuideDialogSteps.clickOnNextButton();
114
+
115
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 5/6');
116
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on the http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#Wine IRI to show the visual graph.');
117
+ GuideDialogSteps.clickOnNextButton();
118
+
119
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph explore — 6/6');
120
+ GuideDialogSteps.assertDialogWithContentIsVisible('The graph shows connections between the start node, wine, and other nodes. Each arrow represents one or more connections (RDF statements).');
121
+ GuideDialogSteps.clickOnNextButton();
122
+
123
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph nodes');
124
+ GuideDialogSteps.assertDialogWithContentIsVisible('A circle represents an RDF resource. In this case, wine.');
125
+ GuideDialogSteps.clickOnNextButton();
126
+
127
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph links');
128
+ GuideDialogSteps.assertDialogWithContentIsVisible('An arrow with a label represents one or more links between nodes. In this case, the arrow shows the relation Wine → type → Potable Liquid.');
129
+ GuideDialogSteps.clickOnNextButton();
130
+
131
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 1/6');
132
+ GuideDialogSteps.assertDialogWithContentIsVisible('Click on Wine to show its properties.');
133
+ GuideDialogSteps.clickOnNextButton();
134
+
135
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 2/6');
136
+ GuideDialogSteps.assertDialogWithContentIsVisible('The side panel shows the properties of the clicked node, Wine.');
137
+ GuideDialogSteps.clickOnNextButton();
138
+
139
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 3/6');
140
+ GuideDialogSteps.assertDialogWithContentIsVisible('Types shows all the RDF types for Wine.We can see that Wine has a single type, owl:Class.');
141
+ GuideDialogSteps.clickOnNextButton();
142
+
143
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 4/6');
144
+ GuideDialogSteps.assertDialogWithContentIsVisible('The values for generic properties like rdfs:label are listed in dedicated sections.This shows the label of Wine.');
145
+ GuideDialogSteps.clickOnNextButton();
146
+
147
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 5/6');
148
+ GuideDialogSteps.assertDialogWithContentIsVisible('This shows the label of Wine.');
149
+ GuideDialogSteps.clickOnNextButton();
150
+
151
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph properties — 6/6');
152
+ GuideDialogSteps.assertDialogWithContentIsVisible('You can close the panel by clicking on the X icon.');
153
+ GuideDialogSteps.clickOnNextButton();
154
+
155
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph: expand node');
156
+ GuideDialogSteps.assertDialogWithContentIsVisible('Double click on Whitehall Lane Primavera to expand the graph.');
157
+ GuideDialogSteps.clickOnNextButton();
158
+
159
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Visual graph nodes');
160
+ GuideDialogSteps.assertDialogWithContentIsVisible('A circle represents an RDF resource. In this case, Napa Region.');
161
+ GuideDialogSteps.clickOnNextButton();
162
+
163
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
164
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
165
+ });
166
+ });
@@ -0,0 +1,36 @@
1
+ import {GuidesStubs} from "../../../stubs/guides/guides-stubs.js";
2
+ import {GuideSteps} from "../../../steps/guides/guide-steps.js";
3
+ import {GuideDialogSteps} from "../../../steps/guides/guide-dialog-steps.js";
4
+
5
+ describe('Welcome', () => {
6
+ let repositoryId;
7
+
8
+ beforeEach(() => {
9
+ repositoryId = 'welcome-guide-step-' + Date.now();
10
+ GuidesStubs.stubWelcomGuide();
11
+ cy.createRepository({id: repositoryId});
12
+ cy.presetRepository(repositoryId);
13
+
14
+ GuideSteps.visit();
15
+ GuideSteps.verifyGuidesListExists();
16
+ cy.wait('@getGuides');
17
+ GuideSteps.runFirstGuide()
18
+ });
19
+
20
+ afterEach(() => {
21
+ cy.deleteRepository(repositoryId);
22
+ });
23
+
24
+ it.only('Should shows welcome steps', () => {
25
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Welcome to Welcome — 1/2');
26
+ GuideDialogSteps.assertDialogWithContentIsVisible('Throughout the guide you will see boxes like this one that will provide instructions on what to do.');
27
+ GuideDialogSteps.clickOnNextButton();
28
+
29
+ GuideDialogSteps.assertDialogWithTitleIsVisible('Welcome to Welcome — 2/2');
30
+ GuideDialogSteps.assertDialogWithContentIsVisible('Test welcome guideLet\'s get started for real now!');
31
+ GuideDialogSteps.clickOnNextButton();
32
+
33
+ GuideDialogSteps.assertDialogWithTitleIsVisible('End of guide');
34
+ GuideDialogSteps.assertDialogWithContentIsVisible('This guide has ended.');
35
+ });
36
+ });
@@ -3,7 +3,7 @@ import {MoviesGuideSteps} from "../../../steps/guides/movies-guide-steps";
3
3
 
4
4
  const MOVIES_FILE_FOR_IMPORT = 'movies.ttl';
5
5
 
6
- describe('Interactive guides', () => {
6
+ describe('Describes "Movies" interactive guide', () => {
7
7
 
8
8
  let repositoryId;
9
9
 
@@ -20,54 +20,52 @@ describe('Interactive guides', () => {
20
20
  cy.deleteRepository(repositoryId);
21
21
  });
22
22
 
23
- context('Describes "Movies" interactive guide', () => {
24
- it('Tests movies interactive guide using "Next" button to the end', () => {
25
- const stepAssertions = [
26
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep1},
27
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep2},
28
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep3},
29
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep4},
30
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep5},
31
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep6},
32
- {assert: MoviesGuideSteps.assertExploreClassHierarchyStep7},
33
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep1},
34
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep2},
35
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep3},
36
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep4},
37
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep5},
38
- // Forces the click because results are to many and dialog is not visible into the test.
39
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep6, forceButtonClick: true},
40
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep7, forceButtonClick: true},
41
- {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep8},
42
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep1},
43
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep2},
44
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep3},
45
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep4},
46
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep5},
47
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep6},
48
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep7},
49
- {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep8, forceButtonClick: true},
50
- {assert: MoviesGuideSteps.assertExploreRDFStep1, forceButtonClick: true},
51
- {assert: MoviesGuideSteps.assertExploreRDFStep2},
52
- {assert: MoviesGuideSteps.assertExploreRDFStep3},
53
- {assert: MoviesGuideSteps.assertExploreRDFStep4},
54
- {assert: MoviesGuideSteps.assertExploreRDFStep5},
55
- {assert: MoviesGuideSteps.assertExploreRDFStep6},
56
- {assert: MoviesGuideSteps.assertExploreRDFStep7},
57
- {assert: MoviesGuideSteps.assertExploreRDFStep8},
58
- {assert: MoviesGuideSteps.assertExploreRDFStep9},
59
- {assert: MoviesGuideSteps.assertExploreRDFStep10},
60
- {assert: MoviesGuideSteps.assertSparqlQueryStep1},
61
- {assert: MoviesGuideSteps.assertSparqlQueryStep2},
62
- {assert: MoviesGuideSteps.assertSparqlQueryStep3},
63
- {assert: MoviesGuideSteps.assertSparqlQueryStep4},
64
- {assert: MoviesGuideSteps.assertSparqlQueryStep5},
65
- {assert: MoviesGuideSteps.assertSparqlQueryStep6},
66
- {assert: MoviesGuideSteps.assertSparqlQueryStep7}
67
- ];
23
+ it('Tests movies interactive guide using "Next" button to the end', () => {
24
+ const stepAssertions = [
25
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep1},
26
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep2},
27
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep3},
28
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep4},
29
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep5},
30
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep6},
31
+ {assert: MoviesGuideSteps.assertExploreClassHierarchyStep7},
32
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep1},
33
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep2},
34
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep3},
35
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep4},
36
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep5},
37
+ // Forces the click because results are to many and dialog is not visible into the test.
38
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep6, forceButtonClick: true},
39
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep7, forceButtonClick: true},
40
+ {assert: MoviesGuideSteps.assertClassHierarchyInstancesStep8},
41
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep1},
42
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep2},
43
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep3},
44
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep4},
45
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep5},
46
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep6},
47
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep7},
48
+ {assert: MoviesGuideSteps.assertExecuteSparqlQueryStep8, forceButtonClick: true},
49
+ {assert: MoviesGuideSteps.assertExploreRDFStep1, forceButtonClick: true},
50
+ {assert: MoviesGuideSteps.assertExploreRDFStep2},
51
+ {assert: MoviesGuideSteps.assertExploreRDFStep3},
52
+ {assert: MoviesGuideSteps.assertExploreRDFStep4},
53
+ {assert: MoviesGuideSteps.assertExploreRDFStep5},
54
+ {assert: MoviesGuideSteps.assertExploreRDFStep6},
55
+ {assert: MoviesGuideSteps.assertExploreRDFStep7},
56
+ {assert: MoviesGuideSteps.assertExploreRDFStep8},
57
+ {assert: MoviesGuideSteps.assertExploreRDFStep9},
58
+ {assert: MoviesGuideSteps.assertExploreRDFStep10},
59
+ {assert: MoviesGuideSteps.assertSparqlQueryStep1},
60
+ {assert: MoviesGuideSteps.assertSparqlQueryStep2},
61
+ {assert: MoviesGuideSteps.assertSparqlQueryStep3},
62
+ {assert: MoviesGuideSteps.assertSparqlQueryStep4},
63
+ {assert: MoviesGuideSteps.assertSparqlQueryStep5},
64
+ {assert: MoviesGuideSteps.assertSparqlQueryStep6},
65
+ {assert: MoviesGuideSteps.assertSparqlQueryStep7}
66
+ ];
68
67
 
69
- const guideName = '3 The Movies database guide';
70
- GuideSteps.runGuideTest(guideName, repositoryId, MOVIES_FILE_FOR_IMPORT, stepAssertions);
71
- });
68
+ const guideName = '3 The Movies database guide';
69
+ GuideSteps.runGuideTest(guideName, repositoryId, MOVIES_FILE_FOR_IMPORT, stepAssertions);
72
70
  });
73
71
  });
@@ -127,7 +127,9 @@ describe('Import server files', () => {
127
127
  ImportResourceMessageDialog.getDialog().should('be.visible');
128
128
 
129
129
  // with full error message
130
- ImportResourceMessageDialog.getMessage().should('have.value', 'RDF Parse Error: The element type "ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame" must be terminated by the matching end-tag "</ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame>". [line 9, column 6]');
130
+ ImportResourceMessageDialog
131
+ .getMessage()
132
+ .should('contain.text', 'RDF Parse Error: The element type "ex:looooooooooooooooooooooooooooooooongTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaame" must be terminated by the matching end-tag');
131
133
 
132
134
  // When I click on corner close button.
133
135
  ImportResourceMessageDialog.close();
@@ -102,7 +102,7 @@ describe('Repositories', () => {
102
102
  // Check the repo is present in the list of repos and we are not yet connected to it
103
103
  RepositorySteps.getRepositoryFromList(repositoryId)
104
104
  .should('be.visible')
105
- .find('.ri-link-unlink')
105
+ .find('.icon-connection-off')
106
106
  .should('be.visible');
107
107
 
108
108
  // Verify it's configuration can be downloaded
@@ -121,7 +121,10 @@ describe('Repositories', () => {
121
121
  cy.get('.onto-dropdown-menu-item')
122
122
  .contains(repositoryId)
123
123
  .first()
124
- .scrollIntoView()
124
+ .scrollIntoView();
125
+ cy.get('.onto-dropdown-menu-item')
126
+ .contains(repositoryId)
127
+ .first()
125
128
  .click();
126
129
 
127
130
  // Should visualize the selected repo
@@ -3,6 +3,8 @@ import HomeSteps from '../../steps/home-steps.js';
3
3
  import {RepositoryErrorsWidgetSteps} from '../../steps/widgets/repository-errors-widget-steps.js';
4
4
  import {RepositorySteps} from '../../steps/repository-steps.js';
5
5
  import {RepositorySelectorSteps} from '../../steps/repository-selector-steps.js';
6
+ import {ErrorPageSteps} from '../../steps/error-page-steps.js';
7
+ import {MainMenuSteps} from '../../steps/main-menu-steps.js';
6
8
 
7
9
  describe('URL with Repository ID parameter', () => {
8
10
  let repositoryId;
@@ -152,4 +154,28 @@ describe('URL with Repository ID parameter', () => {
152
154
  cy.url().should('include', 'repositoryId=' + repositoryId);
153
155
  });
154
156
  });
157
+
158
+ describe('When navigating between legacy and new workbench', () => {
159
+ beforeEach(() => {
160
+ repositoryId = 'repository-in-url-' + Date.now();
161
+ cy.createRepository({id: repositoryId});
162
+ cy.initializeRepository(repositoryId);
163
+ cy.presetRepository(repositoryId);
164
+ })
165
+
166
+ afterEach(() => {
167
+ cy.deleteRepository(repositoryId);
168
+ });
169
+
170
+ it('should preserve repositoryId parameter when navigating from 404 (new workbench) to legacy page', () => {
171
+ // Given I am on the 404 page which is in the new workbench
172
+ ErrorPageSteps.visit404();
173
+ ErrorPageSteps.get404Page().should('be.visible');
174
+ cy.url().should('not.include', 'repositoryId=');
175
+ // When I navigate to some legacy page
176
+ MainMenuSteps.clickOnSparqlMenu();
177
+ // Then repositoryId parameter should be preserved in the URL
178
+ cy.url().should('include', `repositoryId=${repositoryId}`);
179
+ });
180
+ });
155
181
  });
@@ -323,12 +323,7 @@ describe('Resource view', () => {
323
323
  });
324
324
 
325
325
  context('Triple resource', () => {
326
- it('should show triple resource', {
327
- retries: {
328
- runMode: 1,
329
- openMode: 0
330
- }
331
- }, () => {
326
+ it('should show triple resource', () => {
332
327
  // When I visit resource view with triple resource.
333
328
  ResourceSteps.visit(`triple=${TRIPLE_RESOURCE}&role=subject`);
334
329
 
@@ -260,6 +260,9 @@ describe('ACL Management: create rule', () => {
260
260
  // Then I expect the prefix warning to appear
261
261
  AclManagementSteps.getPrefixWarning(0).should('be.visible');
262
262
  AclManagementSteps.getPrefixWarning(0).should('contain.text', 'Custom roles should be entered without the "CUSTOM_" prefix in Workbench');
263
+ // When I blur the field, the warning should not be visible
264
+ AclManagementSteps.blurRole(0);
265
+ AclManagementSteps.getPrefixWarning(0).should('not.exist');
263
266
  // When I save the rule
264
267
  AclManagementSteps.saveRule(0);
265
268
  // Then the text should be how the user typed it
@@ -33,14 +33,10 @@ describe('Setup / Connectors - Lucene', () => {
33
33
  getCreateLuceneConnectorPage()
34
34
  .should('contain', 'Create new Lucene Connector')
35
35
  .within(() => {
36
- getConnectorNameField()
37
- .type(luceneConnectorName);
38
- getFieldNameField()
39
- .type(fieldName, {force: true});
40
- getPropertyChainField()
41
- .type(connectorPropertyChain, {force: true});
42
- getUriTypes()
43
- .type(uriType);
36
+ typeConnectorName(luceneConnectorName);
37
+ typeFieldName(fieldName);
38
+ typePropertyChain(connectorPropertyChain);
39
+ typeUriTypes(uriType);
44
40
  confirmCreateConnector();
45
41
  });
46
42
 
@@ -88,18 +84,38 @@ describe('Setup / Connectors - Lucene', () => {
88
84
  return cy.get('.connector-name-field input');
89
85
  }
90
86
 
87
+ function typeConnectorName(name) {
88
+ getConnectorNameField().type(name);
89
+ getConnectorNameField().blur();
90
+ }
91
+
91
92
  function getFieldNameField() {
92
93
  return cy.get('.child-property-fieldName input');
93
94
  }
94
95
 
96
+ function typeFieldName(name) {
97
+ getFieldNameField().type(name);
98
+ getFieldNameField().blur();
99
+ }
100
+
95
101
  function getPropertyChainField() {
96
102
  return cy.get('.child-property-propertyChain input');
97
103
  }
98
104
 
105
+ function typePropertyChain(chain) {
106
+ getPropertyChainField().type(chain);
107
+ getPropertyChainField().blur();
108
+ }
109
+
99
110
  function getUriTypes() {
100
111
  return cy.get('.property-types input');
101
112
  }
102
113
 
114
+ function typeUriTypes(types) {
115
+ getUriTypes().type(types);
116
+ getUriTypes().blur();
117
+ }
118
+
103
119
  function confirmCreateConnector() {
104
120
  cy.get('.create-connector-btn')
105
121
  .scrollIntoView()
@@ -6,6 +6,7 @@ import {ToasterSteps} from '../../../steps/toaster-steps';
6
6
  import HomeSteps from '../../../steps/home-steps';
7
7
  import {LoginSteps} from '../../../steps/login-steps';
8
8
  import {MainMenuSteps} from '../../../steps/main-menu-steps';
9
+ import {SecurityStubs} from '../../../stubs/security-stubs.js';
9
10
 
10
11
  describe('User and Access', () => {
11
12
 
@@ -102,6 +103,41 @@ describe('User and Access', () => {
102
103
  UserAndAccessSteps.addTextToCustomRoleField('{backspace}');
103
104
  // Then the error should not be visible
104
105
  UserAndAccessSteps.getCustomRoleFieldError().should('not.be.visible');
106
+
107
+ // When I create the user with a valid custom role
108
+ UserAndAccessSteps.clickWriteAccessAny();
109
+ SecurityStubs.spyOnUserCreate()
110
+ UserAndAccessSteps.confirmUserCreate();
111
+ // Then the user should be created with that custom role
112
+ cy.wait('@create-user').its('request.body').then((body) => {
113
+ expect(body).to.deep.eq({
114
+ "password": "password",
115
+ "grantedAuthorities": [
116
+ "ROLE_USER",
117
+ "CUSTOM_AA",
118
+ "WRITE_REPO_*",
119
+ "READ_REPO_*"
120
+ ],
121
+ "appSettings": {
122
+ "DEFAULT_VIS_GRAPH_SCHEMA": true,
123
+ "DEFAULT_INFERENCE": true,
124
+ "DEFAULT_SAMEAS": true,
125
+ "IGNORE_SHARED_QUERIES": false,
126
+ "EXECUTE_COUNT": true
127
+ }
128
+ })
129
+ });
130
+
131
+ cy.url().should('include', '/users');
132
+ UserAndAccessSteps.findUserInTable(user).should('be.visible');
133
+ UserAndAccessSteps.getUserCustomRoles('@user')
134
+ .should('have.length', 1)
135
+ .eq(0).and('have.text', 'AA');
136
+ // And when I open the edit page for that user, the custom role should be visible in the field without the prefix
137
+ UserAndAccessSteps.openEditUserPage(user);
138
+ UserAndAccessSteps.getCustomRoleField().find('.tag-item span')
139
+ .should('have.length', 1)
140
+ .eq(0).and('have.text', 'AA');
105
141
  });
106
142
 
107
143
  it('Adding a role with a CUSTOM_ prefix shows a warning message', () => {
@@ -71,7 +71,7 @@ describe('Expand results over owl:sameAs', () => {
71
71
  YasqeSteps.getActionButtonTooltip(4).should('have.attr', 'yasgui-data-tooltip', 'Expand results over owl:sameAs: ON');
72
72
  });
73
73
 
74
- it('should not be enabled when infer is true and sameAs is false in user settings', {retries: {runMode: 2}},() => {
74
+ it('should not be enabled when infer is true and sameAs is false in user settings',() => {
75
75
  QueryStubs.stubInferAndSameAsDefaults(true, false);
76
76
 
77
77
  // When I visit a page with "ontotext-yasgui-web-component" in it.
@@ -30,12 +30,7 @@ describe('Show saved queries', () => {
30
30
  SavedQueriesDialog.getSavedQueries().should('have.length.gt', 0);
31
31
  });
32
32
 
33
- it('Should be able to select a query from the list', {
34
- retries: {
35
- runMode: 1,
36
- openMode: 0
37
- }
38
- }, () => {
33
+ it('Should be able to select a query from the list',() => {
39
34
  // Given I have opened the saved queries popup
40
35
  YasguiSteps.showSavedQueries();
41
36
  SavedQueriesDialog.getSavedQueriesPopup().should('be.visible');
@@ -46,12 +46,7 @@ describe('Yasgui tabs', () => {
46
46
  YasguiSteps.getCurrentTabTitle().should('have.text', 'Unnamed');
47
47
  });
48
48
 
49
- it('Should ask for confirmation on tab close through tab context menu', {
50
- retries: {
51
- runMode: 1,
52
- openMode: 0
53
- }
54
- }, () => {
49
+ it('Should ask for confirmation on tab close through tab context menu', () => {
55
50
  // Given I have opened yasgui with a single opened tab
56
51
  SparqlEditorSteps.visitSparqlEditorPage();
57
52
  // And I have created a second tab
@@ -68,12 +63,7 @@ describe('Yasgui tabs', () => {
68
63
  YasguiSteps.getCurrentTabTitle().should('have.text', 'Unnamed');
69
64
  });
70
65
 
71
- it('Should ask for confirmation on close other tabs action', {
72
- retries: {
73
- runMode: 1,
74
- openMode: 0
75
- }
76
- }, () => {
66
+ it('Should ask for confirmation on close other tabs action',() => {
77
67
  // Given I have opened yasgui with a single opened tab
78
68
  SparqlEditorSteps.visitSparqlEditorPage();
79
69
  // And I have created more tabs
@@ -39,18 +39,14 @@ describe('Yasr result pagination', () => {
39
39
  YasrSteps.getPagination().should('not.be.visible');
40
40
  });
41
41
 
42
- it('should not be visible when results of query are less than configured page size', {
43
- retries: {
44
- runMode: 1,
45
- openMode: 0
46
- }
47
- }, () => {
42
+ it('should not be visible when results of query are less than configured page size', () => {
48
43
  // When I visit a page with "ontotext-yasgui" component in it,
49
44
  // and execute a query which returns results less than page size.
50
45
  const queryDescription = new QueryStubDescription()
51
46
  .setRepositoryId(repositoryId)
52
47
  .setTotalElements(3);
53
48
  QueryStubs.stubQueryResults(queryDescription);
49
+ YasqeSteps.getExecuteQueryButton().should('be.visible');
54
50
  YasqeSteps.executeQuery();
55
51
 
56
52
  // Then I expect pagination to not be visible
@@ -61,6 +57,7 @@ describe('Yasr result pagination', () => {
61
57
  .setRepositoryId(repositoryId)
62
58
  .setTotalElements(1000);
63
59
  QueryStubs.stubQueryResults(queryDescription);
60
+ YasqeSteps.getExecuteQueryButton().should('be.visible');
64
61
  YasqeSteps.executeQuery();
65
62
 
66
63
  // Then I expect pagination to not be visible
@@ -110,12 +107,7 @@ describe('Yasr result pagination', () => {
110
107
  YasrSteps.getResultLink(0, 2).should('have.text', 'ontogen:page_2-row_1-column_2');
111
108
  });
112
109
 
113
- it('should change page when clink on next or previous page button', {
114
- retries: {
115
- runMode: 1,
116
- openMode: 0
117
- }
118
- }, () => {
110
+ it('should change page when clink on next or previous page button', () => {
119
111
  // When I visit a page with "ontotext-yasgui" component in it,
120
112
  // and execute a query which returns results more than page size.
121
113
  const queryDescription = new QueryStubDescription()
@@ -151,12 +143,7 @@ describe('Yasr result pagination', () => {
151
143
  YasrSteps.getResultLink(0, 2).should('have.text', 'ontogen:page_1-row_1-column_2');
152
144
  });
153
145
 
154
- it('should should render pages in pager properly', {
155
- retries: {
156
- runMode: 1,
157
- openMode: 1
158
- }
159
- }, () => {
146
+ it('should should render pages in pager properly', () => {
160
147
  // When I visit a page with "ontotext-yasgui" component in it,
161
148
  // and execute a query which results are on 6 pages.
162
149
  const queryDescription = new QueryStubDescription()