graphdb-workbench-tests 3.5.0-TR1 → 3.5.0-TR10

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 (36) hide show
  1. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +1 -1
  2. package/e2e-legacy/home/solr-banner/solr-banner.spec.js +137 -0
  3. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -1
  4. package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +1 -1
  5. package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -1
  6. package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
  7. package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -1
  8. package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +1 -1
  9. package/e2e-legacy/setup/aclmanagement/scopes.spec.js +2 -2
  10. package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +2 -2
  11. package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +1 -1
  12. package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +2 -6
  13. package/e2e-legacy/setup/settings/my-settings.spec.js +1 -1
  14. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +706 -337
  15. package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +1 -1
  16. package/e2e-legacy/ttyg/agent-select-menu.spec.js +7 -1
  17. package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
  18. package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
  19. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -2
  20. package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -1
  21. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +15 -15
  22. package/e2e-security/setup/users-and-access/graphql-user.spec.js +3 -3
  23. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +2 -2
  24. package/eslint.config.js +1 -0
  25. package/npm-shrinkwrap.json +562 -372
  26. package/package.json +4 -4
  27. package/steps/application-steps.js +1 -1
  28. package/steps/deprecation-banner/deprecation-banner-steps.js +13 -0
  29. package/steps/deprecation-steps.js +13 -0
  30. package/steps/main-menu-steps.js +5 -1
  31. package/steps/repository-steps.js +44 -3
  32. package/steps/setup/settings-steps.js +3 -3
  33. package/steps/setup/user-and-access-steps.js +84 -13
  34. package/steps/ttyg/ttyg-view-steps.js +15 -1
  35. package/stubs/security-stubs.js +4 -0
  36. package/support/security-command.js +43 -0
@@ -21,7 +21,7 @@ describe('Welcome', () => {
21
21
  cy.deleteRepository(repositoryId);
22
22
  });
23
23
 
24
- it.only('Should shows welcome steps', () => {
24
+ it('Should shows welcome steps', () => {
25
25
  GuideDialogSteps.assertDialogWithTitleIsVisible('Welcome to Welcome — 1/2');
26
26
  GuideDialogSteps.assertDialogWithContentIsVisible('Throughout the guide you will see boxes like this one that will provide instructions on what to do.');
27
27
  GuideDialogSteps.clickOnNextButton();
@@ -0,0 +1,137 @@
1
+ import HomeSteps from '../../../steps/home-steps.js';
2
+ import {DeprecationSteps} from '../../../steps/deprecation-steps.js';
3
+ import {LoginSteps} from '../../../steps/login-steps.js';
4
+ import {GuidesStubs} from '../../../stubs/guides/guides-stubs.js';
5
+ import {GuideSteps} from '../../../steps/guides/guide-steps.js';
6
+ import {GuideDialogSteps} from '../../../steps/guides/guide-dialog-steps.js';
7
+
8
+ describe('Solr deprecation banner', () => {
9
+ context('Security disabled', () => {
10
+ it('should keep the Solr deprecation banner hidden after the anonymous user dismisses it', () => {
11
+ // GIVEN: I have opened the application with security disabled.
12
+ HomeSteps.visit();
13
+
14
+ // THEN: I expect the Solr deprecation banner to be visible.
15
+ DeprecationSteps.getDeprecationBanner()
16
+ .should('be.visible')
17
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
18
+
19
+ // WHEN: I dismiss the Solr deprecation banner.
20
+ DeprecationSteps.closeBanner();
21
+ // THEN: I expect the Solr deprecation banner to be hidden.
22
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
23
+
24
+ // WHEN: I reload the application.
25
+ HomeSteps.visit();
26
+ // THEN: I expect the Solr deprecation banner to remain hidden.
27
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
28
+ });
29
+ });
30
+
31
+ context('Security enabled', () => {
32
+ const PASSWORD = 'root';
33
+ const USER_USERNAME = 'username';
34
+
35
+ beforeEach(() => {
36
+ cy.createUser({
37
+ username: USER_USERNAME,
38
+ password: PASSWORD
39
+ });
40
+
41
+ cy.switchOnSecurity()
42
+ .then(() => cy.loginAsAdmin())
43
+ .then(() => cy.switchOnFreeAccess(true));
44
+ });
45
+
46
+ afterEach(() => {
47
+ cy.loginAsAdmin()
48
+ .then(() => {
49
+ cy.deleteUser(USER_USERNAME, true);
50
+ cy.switchOffFreeAccess(true);
51
+ cy.switchOffSecurity(true);
52
+ });
53
+ });
54
+
55
+ it('should persist separate Solr banner states for anonymous and logged-in users', () => {
56
+ // GIVEN: Security and free access are enabled, and no user is logged in.
57
+ HomeSteps.visit();
58
+
59
+ // THEN: I expect the Solr deprecation banner to be visible for the anonymous user.
60
+ DeprecationSteps.getDeprecationBanner()
61
+ .should('be.visible')
62
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
63
+
64
+ // WHEN: The anonymous user dismisses the banner.
65
+ DeprecationSteps.closeBanner();
66
+ // THEN: I expect the banner to be hidden for the anonymous user.
67
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
68
+
69
+ // WHEN: I log in as a user who has not dismissed the banner.
70
+ cy.loginAs(USER_USERNAME, PASSWORD);
71
+ HomeSteps.visit();
72
+
73
+ // THEN: I expect the banner to be visible for the logged-in user.
74
+ DeprecationSteps.getDeprecationBanner()
75
+ .should('be.visible')
76
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
77
+
78
+ // WHEN: The logged-in user dismisses the banner.
79
+ DeprecationSteps.closeBanner();
80
+ // THEN: I expect the banner to be hidden for the logged-in user.
81
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
82
+
83
+ // WHEN: The user logs out.
84
+ LoginSteps.logout();
85
+ // THEN: I expect the banner to remain hidden because the anonymous user has already dismissed it.
86
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
87
+
88
+ // WHEN: I log in as the administrator, who has not dismissed the banner.
89
+ cy.loginAs('admin', 'root');
90
+ HomeSteps.visit();
91
+ // THEN: I expect the banner to be visible for the administrator.
92
+ DeprecationSteps.getDeprecationBanner()
93
+ .should('be.visible')
94
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
95
+
96
+ // WHEN: The administrator logs out.
97
+ LoginSteps.logout();
98
+ // THEN: I expect the banner to remain hidden because the anonymous user has already dismissed it.
99
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
100
+
101
+ // WHEN: I log in again as the user who previously dismissed the banner.
102
+ cy.loginAs(USER_USERNAME, PASSWORD);
103
+ HomeSteps.visit();
104
+ // THEN: I expect the banner to remain hidden for the logged-in user.
105
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
106
+ });
107
+ });
108
+
109
+ context('User guides', () => {
110
+ it('should hide the Solr deprecation banner while a guide is running', () => {
111
+ // GIVEN: The guides are loaded and ready to be started.
112
+ GuidesStubs.stubMainMenuGuide();
113
+ GuideSteps.visit();
114
+ GuideSteps.verifyGuidesListExists();
115
+ cy.wait('@getGuides');
116
+
117
+ // WHEN: I am on an application page, and the Solr deprecation banner has not been dismissed by the current user.
118
+ // THEN: I expect the Solr deprecation banner to be visible because it has not been dismissed by the current user.
119
+ DeprecationSteps.getDeprecationBanner()
120
+ .should('be.visible')
121
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
122
+
123
+ // WHEN: I start a guide.
124
+ GuideSteps.runFirstGuide();
125
+ // THEN: I expect the Solr deprecation banner to be hidden while the guide is running.
126
+ DeprecationSteps.getDeprecationBanner().should('not.exist');
127
+
128
+ // WHEN: I cancel the guide.
129
+ GuideDialogSteps.clickOnCancelButton();
130
+ GuideDialogSteps.clickConfirmCancelDialogExitButton();
131
+ // THEN: I expect the Solr deprecation banner to be visible again.
132
+ DeprecationSteps.getDeprecationBanner()
133
+ .should('be.visible')
134
+ .should('contain.text', 'The Solr connector is deprecated and will be removed in GraphDB 12');
135
+ });
136
+ });
137
+ });
@@ -19,7 +19,7 @@ describe('ACL Management: create rule', () => {
19
19
  cy.enableAutocomplete(repositoryId);
20
20
  AclManagementSteps.importRules(repositoryId);
21
21
  AclManagementSteps.visit();
22
- ApplicationSteps.geLoader().should('not.exist');
22
+ ApplicationSteps.getLoader().should('not.exist');
23
23
  // ensure rules are rendered
24
24
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
25
25
  });
@@ -19,7 +19,7 @@ describe('ACL Management: delete rule', () => {
19
19
  cy.enableAutocomplete(repositoryId);
20
20
  AclManagementSteps.importRules(repositoryId);
21
21
  AclManagementSteps.visit();
22
- ApplicationSteps.geLoader().should('not.exist');
22
+ ApplicationSteps.getLoader().should('not.exist');
23
23
  // ensure rules are rendered
24
24
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
25
25
  });
@@ -18,7 +18,7 @@ describe('ACL Management: edit rule', () => {
18
18
  cy.enableAutocomplete(repositoryId);
19
19
  AclManagementSteps.importRules(repositoryId);
20
20
  AclManagementSteps.visit();
21
- ApplicationSteps.geLoader().should('not.exist');
21
+ ApplicationSteps.getLoader().should('not.exist');
22
22
  // ensure rules are rendered
23
23
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
24
24
  });
@@ -17,7 +17,7 @@ describe('ACL Management: render rules', () => {
17
17
  cy.presetRepository(repositoryId);
18
18
  cy.initializeRepository(repositoryId);
19
19
  AclManagementSteps.visit();
20
- ApplicationSteps.geLoader().should('not.exist');
20
+ ApplicationSteps.getLoader().should('not.exist');
21
21
  });
22
22
 
23
23
  it('Should render empty ACL rules table', () => {
@@ -17,7 +17,7 @@ describe('ACL Management: reorder rules', () => {
17
17
  cy.initializeRepository(repositoryId);
18
18
  AclManagementSteps.importRules(repositoryId);
19
19
  AclManagementSteps.visit();
20
- ApplicationSteps.geLoader().should('not.exist');
20
+ ApplicationSteps.getLoader().should('not.exist');
21
21
  // ensure rules are rendered
22
22
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
23
23
  });
@@ -18,7 +18,7 @@ describe('ACL Management: revert rules', () => {
18
18
  cy.enableAutocomplete(repositoryId);
19
19
  AclManagementSteps.importRules(repositoryId);
20
20
  AclManagementSteps.visit();
21
- ApplicationSteps.geLoader().should('not.exist');
21
+ ApplicationSteps.getLoader().should('not.exist');
22
22
  // ensure rules are rendered
23
23
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
24
24
  });
@@ -16,7 +16,7 @@ describe('ACL Management: rule scopes', () => {
16
16
  cy.initializeRepository(repositoryId);
17
17
  cy.enableAutocomplete(repositoryId);
18
18
  AclManagementSteps.visit();
19
- ApplicationSteps.geLoader().should('not.exist');
19
+ ApplicationSteps.getLoader().should('not.exist');
20
20
  });
21
21
 
22
22
 
@@ -171,7 +171,7 @@ describe('ACL Management: rule scopes', () => {
171
171
  expect(interception.request.body).to.deep.eq(expectedPayload);
172
172
  });
173
173
 
174
- ApplicationSteps.geLoader().should('not.exist');
174
+ ApplicationSteps.getLoader().should('not.exist');
175
175
  // Then I expect the ACL to be saved
176
176
  ApplicationSteps.getSuccessNotifications().should('be.visible');
177
177
 
@@ -18,7 +18,7 @@ describe('ACL Management: update rules', () => {
18
18
  cy.enableAutocomplete(repositoryId);
19
19
  AclManagementSteps.importRules(repositoryId);
20
20
  AclManagementSteps.visit();
21
- ApplicationSteps.geLoader().should('not.exist');
21
+ ApplicationSteps.getLoader().should('not.exist');
22
22
  // ensure rules are rendered
23
23
  AclManagementSteps.getAclRules().should('have.length.gt', 0);
24
24
  });
@@ -51,7 +51,7 @@ describe('ACL Management: update rules', () => {
51
51
  ModalDialogSteps.clickOnConfirmButton();
52
52
  // And I save the ACL list
53
53
  AclManagementSteps.saveAcl();
54
- ApplicationSteps.geLoader().should('not.exist');
54
+ ApplicationSteps.getLoader().should('not.exist');
55
55
  // Then I expect the ACL to be saved
56
56
  ApplicationSteps.getSuccessNotifications().should('be.visible');
57
57
  AclManagementSteps.getAclRules().should('have.length', 5);
@@ -64,7 +64,7 @@ describe('JDBC configuration', () => {
64
64
  JdbcCreateSteps.clickOnPreviewButton();
65
65
 
66
66
  // Then I expect to see loader,
67
- ApplicationSteps.geLoader().should('contain', 'Preview of first 100 rows of table');
67
+ ApplicationSteps.getLoader().should('contain', 'Preview of first 100 rows of table');
68
68
  // and see the generated preview.
69
69
  YasrSteps.getResults().should('be.visible');
70
70
  });
@@ -20,14 +20,10 @@ function verifyInitialState(repositoryId) {
20
20
  SettingsSteps.getSparqlEditorPanel().should('be.visible');
21
21
  SettingsSteps.getSameAsToggle().should('be.checked');
22
22
  SettingsSteps.getSameAsLabel().should('be.visible')
23
- .and('contain', 'Expand results over owl:SameAs is')
24
- .find('.tag').should('be.visible')
25
- .and('contain', 'ON');
23
+ .and('contain', 'Expand results over owl:SameAs');
26
24
  SettingsSteps.getInferenceToggle().should('be.checked');
27
25
  SettingsSteps.getInferenceLabel().should('be.visible')
28
- .and('contain', 'Inference is')
29
- .find('.tag').should('be.visible')
30
- .and('contain', 'ON');
26
+ .and('contain', 'Enable inference');
31
27
  SettingsSteps.getCountCheckbox().should('be.checked');
32
28
  SettingsSteps.getIgnoreSharedCheckbox().should('not.be.checked');
33
29
 
@@ -188,7 +188,7 @@ describe('My Settings', () => {
188
188
  cy.get('.login-credentials').should('be.visible');
189
189
  cy.get('#wb-user-username').should('be.visible')
190
190
  .and('have.value', 'admin')
191
- .and('have.attr', 'readonly', 'readonly');
191
+ .and('be.disabled');
192
192
  }
193
193
 
194
194
  function clickLabelBtn(btnId) {