graphdb-workbench-tests 2.4.0-RC3 → 2.4.0-RC5

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.
@@ -365,12 +365,9 @@ describe('Similarity screen validation', () => {
365
365
  cy.url().should('eq', Cypress.config('baseUrl') + '/similarity');
366
366
  cy.get('.clone-index-btn').click()
367
367
  .then(() => cy.url().should('contain', `${Cypress.config('baseUrl')}/similarity/index/create`));
368
- cy.window();
369
- // This is just an implicit wait in order to allow the view to catch up with the rendering
370
- // before trying to click the button. Its needed because the button doesn't always accept
371
- // the click most likely due to some async behavior
372
- cy.contains('Sample queries:').next('.list-group').should('be.visible');
373
368
 
369
+ // Makes sure YASQE has loaded before we click the Create button
370
+ cy.waitUntilQueryIsVisible();
374
371
  getCreateIndexButton().should('be.visible').click();
375
372
 
376
373
  getExistingIndexesPanel();
@@ -37,7 +37,7 @@ describe('Operations Status Component', () => {
37
37
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
38
38
  // When I click on "Running query" operation element.
39
39
  // Then I expect to be redirected to "Query and Update monitoring" view.
40
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 0);
40
+ OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 3);
41
41
  // Then I expect "Global Operations Component" to still be displayed.
42
42
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
43
43
  });
@@ -52,7 +52,7 @@ describe('Operations Status Component', () => {
52
52
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
53
53
  // When I click on "Running updates" operation element.
54
54
  // Then I expect to be redirected to "Query and Update monitoring" view.
55
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 1);
55
+ OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/queries', 4);
56
56
  // Then I expect "Global Operations Component" to still be displayed.
57
57
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
58
58
  });
@@ -82,7 +82,7 @@ describe('Operations Status Component', () => {
82
82
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
83
83
  // When I click on "Creating backup" operation element.
84
84
  // Then I expect to be redirected to "Backup and Restore" view.
85
- OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/backup-and-restore', 3);
85
+ OperationsStatusesComponentSteps.checkOperationElementUrl('monitor/backup-and-restore', 1);
86
86
  // Then I expect "Global Operations Component" to still be displayed.
87
87
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
88
88
 
@@ -98,7 +98,7 @@ describe('Operations Status Component', () => {
98
98
  OperationsStatusesComponentSteps.openOperationStatusesDialog();
99
99
  // When I click on "Unavailable nodes" operation element.
100
100
  // Then I expect to be redirected to "Cluster Monitoring" view.
101
- OperationsStatusesComponentSteps.checkOperationElementUrl('cluster', 4);
101
+ OperationsStatusesComponentSteps.checkOperationElementUrl('cluster', 0);
102
102
  // Then I expect "Global Operations Component" to still be displayed.
103
103
  OperationsStatusesComponentSteps.getOperationsStatusesComponent().should('exist');
104
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "2.4.0-RC3",
3
+ "version": "2.4.0-RC5",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",
@@ -21,14 +21,17 @@ Cypress.Commands.add('createRepository', (options = {}) => {
21
21
  Cypress.Commands.add('deleteRepository', (id) => {
22
22
  // Note: Going through /rest/repositories because it would not fail if the repo is missing
23
23
  const url = REPOSITORIES_URL + id;
24
+
25
+ // Navigates to the home view => helps by cancelling any pending requests
26
+ // if a test completes too fast and the tested view was about to load something
27
+ // that needs the just deleted repo.
28
+ cy.visit('/', {failOnStatusCode: false});
29
+
24
30
  cy.request({
25
31
  method: 'DELETE',
26
32
  url: url,
27
33
  // Prevent Cypress from failing the test on non-2xx status codes
28
34
  failOnStatusCode: false
29
- })
30
- .then((response) => {
31
- cy.waitUntil(() => response && response.status === 200);
32
35
  });
33
36
  });
34
37
 
@@ -1,8 +1,10 @@
1
1
  Cypress.Commands.add('pasteQuery', (query) => {
2
- clearQuery();
3
- // Using force because the textarea is not visible
4
- getQueryTextArea().invoke('val', query).trigger('change', {force: true}).should('have.value', query);
5
- waitUntilQueryIsVisible();
2
+ // Setting the textarea and the calling setValue seems to work
3
+ // more reliably then other strategies (see history)
4
+ getQueryTextArea().invoke('val', query);
5
+ getQueryArea().then(codeMirrorEl => {
6
+ codeMirrorEl[0].CodeMirror.setValue(query);
7
+ });
6
8
  });
7
9
 
8
10
  Cypress.Commands.add('executeQuery', () => {