graphdb-workbench-tests 1.10.1-RC1 → 1.10.2-RC1

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.
@@ -111,7 +111,7 @@ describe('Home screen validation', () => {
111
111
  // When I select option from suggestions
112
112
  cy.get(".search-rdf-input #auto-complete-results-wrapper p").contains('hasPos').click();
113
113
  // Search result should be opened in new window
114
- cy.get('@window.open').should('be.calledWith', '/resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
114
+ cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2Fns%2Forg%23hasPost');
115
115
  // When I revisit the home page
116
116
  cy.visit('/graphs');
117
117
  // When I open again the search box
@@ -171,11 +171,11 @@ describe('Home screen validation', () => {
171
171
  //Test table and visual buttons.
172
172
  cy.get("#auto_0").should('be.visible').click();
173
173
  // Search result should be opened in new window
174
- cy.get('@window.open').should('be.calledWith', '/resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
174
+ cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
175
175
 
176
176
  getVisualButton().click();
177
177
  cy.get("#auto_0").should('be.visible').click();
178
- cy.get('@window.open').should('be.calledWith', '/graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
178
+ cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fwww.w3.org%2FTR%2F2003%2FPR-owl-guide-20031209%2Fwine%23Dry');
179
179
  cy.deleteRepository(repositoryId);
180
180
  });
181
181
  });
@@ -250,11 +250,11 @@ describe('Home screen validation', () => {
250
250
  .then(() => HomeSteps.autocompleteText('Green', GOBLIN_URI))
251
251
  .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
252
252
  .then(() => // Search result should be opened in new window
253
- cy.get('@window.open').should('be.calledWith', '/resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
253
+ cy.get('@window.open').should('be.calledWith', 'resource?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'))
254
254
  .then(() => HomeSteps.getAutocompleteDisplayTypeButton('visual').click())
255
255
  .then(() => HomeSteps.getAutocompleteResultElement(GOBLIN_URI).click())
256
256
  .then(() => // Search result should be opened in new window
257
- cy.get('@window.open').should('be.calledWith', '/graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
257
+ cy.get('@window.open').should('be.calledWith', 'graphs-visualizations?uri=http%3A%2F%2Fexample.org%2F%23green-goblin'));
258
258
  cy.deleteRepository(repositoryId);
259
259
  });
260
260
 
@@ -44,7 +44,7 @@ describe('User and Access', () => {
44
44
  cy.get('@user').find('.edit-user-btn').should('be.visible')
45
45
  .and('not.be.disabled');
46
46
  // And cannot be deleted
47
- cy.get('@user').find('.delete-user-btn').should('not.be.visible');
47
+ cy.get('@user').find('.delete-user-btn').should('not.exist');
48
48
  // Date created should be visible
49
49
  cy.get('@user').find('.date-created').should('be.visible');
50
50
  });
@@ -80,22 +80,26 @@ describe('User and Access', () => {
80
80
  cy.get('.ot-splash').should('not.be.visible');
81
81
  getUsersTable().should('be.visible');
82
82
  //delete repository manager
83
- deleteUser("repo-manager");
84
- //create a custom admin
85
- createUser("second-admin", PASSWORD, ROLE_CUSTOM_ADMIN);
86
- logout();
87
- //login with custom admin
88
- loginWithUser("second-admin", PASSWORD);
89
- cy.url().should('include', '/users');
90
- logout();
91
- //login with admin
92
- loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
93
- cy.get('.ot-splash').should('not.be.visible');
94
- getUsersTable().should('be.visible');
95
- //delete custom admin
96
- deleteUser("second-admin");
97
- //disable security
98
- getToggleSecuritySwitch().click();
83
+ deleteUser("repo-manager")
84
+ .then(() => {
85
+ //create a custom admin
86
+ createUser("second-admin", PASSWORD, ROLE_CUSTOM_ADMIN);
87
+ logout();
88
+ //login with custom admin
89
+ loginWithUser("second-admin", PASSWORD);
90
+ cy.url().should('include', '/users');
91
+ logout();
92
+ //login with admin
93
+ loginWithUser("admin", DEFAULT_ADMIN_PASSWORD);
94
+ cy.get('.ot-splash').should('not.be.visible');
95
+ getUsersTable().should('be.visible');
96
+ //delete custom admin
97
+ deleteUser("second-admin")
98
+ .then(() => {
99
+ //disable security
100
+ getToggleSecuritySwitch().click();
101
+ });
102
+ });
99
103
  });
100
104
 
101
105
  function getCreateNewUserButton() {
@@ -156,10 +160,18 @@ describe('User and Access', () => {
156
160
  }
157
161
 
158
162
  function deleteUser(username) {
159
- cy.get('#wb-users-userInUsers tr').contains(username).parent().parent().within(() => {
160
- cy.get('.icon-trash').click();
161
- })
162
- cy.get('.confirm-btn').click();
163
+ findUserInTable(username);
164
+ return cy.get('@user')
165
+ .within(() => {
166
+ cy.waitUntil(() =>
167
+ cy.get('.delete-user-btn')
168
+ .as('deleteBtn')
169
+ .then(deleteBtn => Cypress.dom.isAttached(deleteBtn)))
170
+ .get('@deleteBtn')
171
+ .click();
172
+ }).then(() => {
173
+ cy.get('.confirm-btn').click();
174
+ });
163
175
  }
164
176
 
165
177
  function loginWithUser(username, password) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphdb-workbench-tests",
3
- "version": "1.10.1-RC1",
3
+ "version": "1.10.2-RC1",
4
4
  "description": "Cypress tests for GraphDB workbench",
5
5
  "scripts": {
6
6
  "start": "cypress open",