graphdb-workbench-tests 1.11.1 → 2.0.0-M2

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 (30) hide show
  1. package/fixtures/locale-en.json +1532 -0
  2. package/fixtures/repo-template.json +1 -1
  3. package/integration/explore/class.hierarchy.spec.js +1 -0
  4. package/integration/explore/class.relationships.spec.js +1 -0
  5. package/integration/explore/graphs.overview.spec.js +1 -0
  6. package/integration/explore/similarity.spec.js +1 -0
  7. package/integration/explore/visual.graph.spec.js +14 -9
  8. package/integration/help/rest-api.spec.js +1 -0
  9. package/integration/help/system-information.spec.js +1 -0
  10. package/integration/home/workbench.home.spec.js +35 -10
  11. package/integration/import/import.server.files.spec.js +1 -0
  12. package/integration/import/import.user.data.spec.js +1 -0
  13. package/integration/monitor/monitor.queries.spec.js +1 -0
  14. package/integration/monitor/monitor.resources.spec.js +1 -0
  15. package/integration/repository/repositories.spec.js +34 -14
  16. package/integration/repository/repository-commands.spec.js +1 -0
  17. package/integration/setup/autocomplete.spec.js +1 -0
  18. package/integration/setup/connectors-lucene.spec.js +32 -28
  19. package/integration/setup/jdbc.spec.js +1 -0
  20. package/integration/setup/my-settings.spec.js +1 -0
  21. package/integration/setup/namespaces.spec.js +1 -0
  22. package/integration/setup/plugins.spec.js +70 -0
  23. package/integration/setup/rdf-rank.spec.js +2 -1
  24. package/integration/setup/sparql-templates.spec.js +1 -0
  25. package/integration/setup/user-and-access.spec.js +1 -0
  26. package/integration/sparql/main.menu.spec.js +14 -13
  27. package/integration/sparql/sparql.menu.spec.js +7 -5
  28. package/package.json +1 -1
  29. package/support/sparql-commands.js +2 -2
  30. package/integration/import/onto-refine.spec.js +0 -135
@@ -5,6 +5,7 @@ describe('Main menu tests', function () {
5
5
  });
6
6
 
7
7
  beforeEach(function () {
8
+ cy.intercept('GET', '/i18n/locale-en.json', {fixture: 'locale-en.json'});
8
9
  cy.visit('/');
9
10
  cy.window();
10
11
 
@@ -16,18 +17,7 @@ describe('Main menu tests', function () {
16
17
  {
17
18
  name: 'Import',
18
19
  visible: true,
19
- submenu: [
20
- {
21
- name: 'RDF',
22
- visible: false,
23
- redirect: '/import'
24
- },
25
- {
26
- name: 'Tabular (OntoRefine)',
27
- visible: false,
28
- redirect: '/ontorefine'
29
- }
30
- ]
20
+ redirect: '/import'
31
21
  },
32
22
  {
33
23
  name: 'Explore',
@@ -105,6 +95,16 @@ describe('Main menu tests', function () {
105
95
  visible: false,
106
96
  redirect: '/connectors'
107
97
  },
98
+ {
99
+ name: 'Cluster',
100
+ visible: false,
101
+ redirect: '/cluster'
102
+ },
103
+ {
104
+ name: 'Plugins',
105
+ visible: false,
106
+ redirect: '/plugins'
107
+ },
108
108
  {
109
109
  name: 'Namespaces',
110
110
  visible: false,
@@ -159,7 +159,8 @@ describe('Main menu tests', function () {
159
159
  let menuVisibilityCheck = menu.visible ? 'be.visible' : 'not.be.visible';
160
160
  // Verify that main menu items are present and their visibility
161
161
  cy.get('.main-menu .menu-element-root').eq(menuIndex + 1).as('menu')
162
- .should(menuVisibilityCheck).and('contain', menu.name);
162
+ .should(menuVisibilityCheck).within(() =>
163
+ cy.get('.menu-item').contains(menu.name));
163
164
 
164
165
  // Verify submenu items and their visibility when the main menu is not opened
165
166
  (menu.submenu || []).forEach((submenu, submenuIndex) => {
@@ -63,6 +63,7 @@ describe('SPARQL screen validation', () => {
63
63
  '}';
64
64
 
65
65
  function createRepoAndVisit(repoOptions = {}) {
66
+ cy.intercept('GET', '/i18n/locale-en.json', {fixture: 'locale-en.json'});
66
67
  createRepository(repoOptions);
67
68
  visitSparql(true);
68
69
  }
@@ -436,7 +437,7 @@ describe('SPARQL screen validation', () => {
436
437
 
437
438
  // Uncheck ‘Include inferred’
438
439
  cy.waitUntil(() =>
439
- getInferenceButton()
440
+ getInferenceButton().find('.icon-inferred-on')
440
441
  .then(infBtn => infBtn && cy.wrap(infBtn).click()))
441
442
  .then(() =>
442
443
  cy.get('.icon-inferred-off').should('be.visible'));
@@ -498,10 +499,11 @@ describe('SPARQL screen validation', () => {
498
499
  verifyResultsPageLength(1000);
499
500
 
500
501
  // Disable the inference from the ">>" icon on the right of the SPARQL editor.
501
- getInferenceButton()
502
- .click()
503
- .find('.icon-inferred-off')
504
- .should('be.visible');
502
+ cy.waitUntil(() =>
503
+ getInferenceButton().find('.icon-inferred-on')
504
+ .then(infBtn => infBtn && cy.wrap(infBtn).click()))
505
+ .then(() =>
506
+ cy.get('.icon-inferred-off').should('be.visible'));
505
507
  executeQuery();
506
508
 
507
509
  // Verify that there are 1,839 results
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "1.11.1",
3
+ "version": "2.0.0-M2",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -19,7 +19,7 @@ Cypress.Commands.add('verifyResultsPageLength', (resultLength) => {
19
19
  Cypress.Commands.add('verifyResultsMessage', (msg) => {
20
20
  cy.waitUntil(() =>
21
21
  getResultsMessage()
22
- .then(resultInfo => resultInfo.text().trim().indexOf(msg) > -1));
22
+ .then((resultInfo) => resultInfo && resultInfo.text().trim().indexOf(msg) > -1));
23
23
  });
24
24
 
25
25
  Cypress.Commands.add('getResultsMessage', () => {
@@ -51,7 +51,7 @@ function getQueryTextArea() {
51
51
  }
52
52
 
53
53
  function waitUntilQueryIsVisible() {
54
- cy.waitUntil(() =>
54
+ return cy.waitUntil(() =>
55
55
  getQueryArea()
56
56
  .then(codeMirrorEl =>
57
57
  codeMirrorEl && codeMirrorEl[0].CodeMirror.getValue().trim().length > 0));
@@ -1,135 +0,0 @@
1
- describe('Import/ OntoRefine', () => {
2
-
3
- let repositoryId;
4
-
5
- beforeEach(() => {
6
- repositoryId = 'onto-refine-' + Date.now();
7
- cy.createRepository({id: repositoryId});
8
-
9
- cy.visit('/ontorefine');
10
- cy.window();
11
-
12
- cy.get('.ot-splash').should('not.exist');
13
- getOntoRefineFrame().should('be.visible');
14
- });
15
-
16
- afterEach(() => {
17
- cy.deleteRepository(repositoryId);
18
- });
19
-
20
- const REFINE_TABS = ['Create Project', 'Open Project', 'Import Project', 'Language Settings'];
21
- const CREATE_PROJECT_TABS = ['This Computer', 'Web Addresses (URLs)', 'Clipboard'];
22
-
23
- xit('should properly render OntoRefine transformation tool frame', () => {
24
-
25
- // Refine should provide navigation tabs
26
- getOntoRefineTabs()
27
- .should('be.visible')
28
- .and('have.length', 4)
29
- .each(($tab, $index) => expect($tab.text()).to.equal(REFINE_TABS[$index]))
30
- .eq(0)
31
- // The first tab should be automatically selected
32
- .should('have.class', 'selected')
33
- .and('be.visible');
34
-
35
- // -------- Create project --------
36
-
37
- // The create project panel should be rendered by default and provide its own tabs
38
- getCreateProjectPanel().should('be.visible');
39
- getCreateProjectPanelTabs()
40
- .should('be.visible')
41
- .and('have.length', 3)
42
- .each(($tab, $index) => expect($tab.text()).to.equal(CREATE_PROJECT_TABS[$index]))
43
- .eq(0)
44
- .should('have.class', 'selected')
45
- .and('be.visible');
46
-
47
- // The upload panel should be opened by default
48
- getCreateProjectPanelBody()
49
- .find('.upload-parent #upload')
50
- .should('be.visible');
51
-
52
- // Go to URL panel
53
- getCreateProjectPanelTabs().eq(1).click();
54
- getCreateProjectPanelBody()
55
- .find('.default-importing-web-url')
56
- .should('be.visible');
57
-
58
- // Go to Clipboard panel
59
- getCreateProjectPanelTabs().eq(2).click();
60
- getCreateProjectPanelBody()
61
- .find('#default-importing-clipboard-textarea')
62
- .should('be.visible');
63
-
64
- // -------- Open project --------
65
-
66
- // Go to Open project and check if the panels are properly switched
67
- getOntoRefineTabs().eq(1).click();
68
- getCreateProjectPanel().should('not.exist');
69
- getOpenProjectPanel()
70
- .should('be.visible')
71
- // Should have no existing projects for new repositories
72
- .find('#no-project-message')
73
- .should('be.visible');
74
-
75
- // -------- Import project --------
76
-
77
- getOntoRefineTabs().eq(2).click();
78
- getOpenProjectPanel().should('not.exist');
79
- getImportProjectPanel()
80
- .should('be.visible')
81
- .find('#import-project-button')
82
- .should('be.visible');
83
-
84
- // -------- Language Settings --------
85
-
86
- getOntoRefineTabs().eq(3).click();
87
- getImportProjectPanel().should('not.exist');
88
- getLanguageSettingsPanel()
89
- .should('be.visible')
90
- .find('#set-lang-button')
91
- .should('be.visible');
92
- });
93
-
94
- function getOntoRefineFrame() {
95
- return cy.get('#ontorefine-iframe').iframe();
96
- }
97
-
98
- function getOntoRefineLeftPanel() {
99
- return getOntoRefineFrame().find('#left-panel');
100
- }
101
-
102
- function getOntoRefineTabs() {
103
- return getOntoRefineLeftPanel().find('#action-area-tabs .action-area-tab');
104
- }
105
-
106
- function getOntoRefineRightPanel() {
107
- return getOntoRefineFrame().find('#right-panel');
108
- }
109
-
110
- function getCreateProjectPanel() {
111
- return getOntoRefineRightPanel().find('#create-project-ui-source-selection-layout');
112
- }
113
-
114
- function getCreateProjectPanelTabs() {
115
- return getCreateProjectPanel().find('#create-project-ui-source-selection-tabs .create-project-ui-source-selection-tab')
116
- }
117
-
118
- function getCreateProjectPanelBody() {
119
- return getCreateProjectPanel().find('#create-project-ui-source-selection-tab-bodies')
120
- }
121
-
122
- function getOpenProjectPanel() {
123
- return getOntoRefineRightPanel().find('#projects-container');
124
- }
125
-
126
- function getImportProjectPanel() {
127
- // TODO Note: The third and fourth tab bodies have the same identifier....
128
- return getOntoRefineRightPanel().find('.action-area-tab-body').eq(2);
129
- }
130
-
131
- function getLanguageSettingsPanel() {
132
- return getOntoRefineRightPanel().find('.action-area-tab-body').eq(3);
133
- }
134
-
135
- });