graphdb-workbench-tests 3.5.0-reactodia-resource-construct-TR1 → 3.5.0

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 (46) hide show
  1. package/e2e-legacy/guides/ttyg/configure-agent/configure-agent-guide.spec.js +2 -1
  2. package/e2e-legacy/guides/welcome/welcome-guide.spec.js +1 -1
  3. package/e2e-legacy/home/solr-banner/solr-banner.spec.js +137 -0
  4. package/e2e-legacy/repository/ontop-repository.spec.js +132 -0
  5. package/e2e-legacy/resource/resource.spec.js +4 -17
  6. package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -1
  7. package/e2e-legacy/setup/aclmanagement/delete-rule.spec.js +1 -1
  8. package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -1
  9. package/e2e-legacy/setup/aclmanagement/render-rules.spec.js +1 -1
  10. package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -1
  11. package/e2e-legacy/setup/aclmanagement/revert-rules.spec.js +1 -1
  12. package/e2e-legacy/setup/aclmanagement/scopes.spec.js +2 -2
  13. package/e2e-legacy/setup/aclmanagement/update-rules.spec.js +2 -2
  14. package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +1 -1
  15. package/e2e-legacy/setup/settings/my-settings-initial-state.spec.js +2 -6
  16. package/e2e-legacy/setup/settings/my-settings.spec.js +1 -1
  17. package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +706 -337
  18. package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +1 -1
  19. package/e2e-legacy/ttyg/agent-select-menu.spec.js +7 -1
  20. package/e2e-legacy/ttyg/chat-list.spec.js +1 -1
  21. package/e2e-legacy/ttyg/create-chat.spec.js +1 -1
  22. package/e2e-legacy/ttyg/edit-agent.spec.js +2 -2
  23. package/e2e-legacy/ttyg/ttyg-permission.spec.js +2 -1
  24. package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +15 -15
  25. package/e2e-security/setup/users-and-access/graphql-user.spec.js +3 -3
  26. package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +2 -2
  27. package/eslint.config.js +1 -0
  28. package/fixtures/ontop/university-complete_edited.obda +106 -0
  29. package/npm-shrinkwrap.json +448 -278
  30. package/package.json +5 -6
  31. package/steps/application-steps.js +1 -1
  32. package/steps/deprecation-banner/deprecation-banner-steps.js +13 -0
  33. package/steps/deprecation-steps.js +13 -0
  34. package/steps/main-menu-steps.js +5 -1
  35. package/steps/ontop-repository-steps.js +20 -0
  36. package/steps/repository-steps.js +44 -3
  37. package/steps/resource/resource-steps.js +0 -8
  38. package/steps/setup/settings-steps.js +3 -3
  39. package/steps/setup/user-and-access-steps.js +84 -13
  40. package/steps/ttyg/ttyg-view-steps.js +15 -1
  41. package/stubs/repositories/repositories-stubs.js +4 -0
  42. package/stubs/security-stubs.js +4 -0
  43. package/support/security-command.js +43 -0
  44. package/cypress-guides.config.js +0 -45
  45. package/e2e-legacy/reactodia/reactodia.spec.js +0 -96
  46. package/steps/reactodia-steps.js +0 -42
@@ -1,96 +0,0 @@
1
- import {ReactodiaSteps} from '../../steps/reactodia-steps.js';
2
- import {LanguageSelectorSteps} from '../../steps/language-selector-steps.js';
3
- import {RepositorySelectorSteps} from '../../steps/repository-selector-steps.js';
4
-
5
- const FILE_TO_IMPORT = 'resource-test-data.ttl';
6
- const SEED_RESOURCE_ENCODED = 'http:%2F%2Fexample.com%2Fontology%23CustomerLoyalty';
7
- const SEED_RESOURCE_LABEL = 'CustomerLoyalty';
8
-
9
- const CONSTRUCT_QUERY = 'CONSTRUCT { <http://example.com/ontology#CustomerLoyalty> ?p ?o } WHERE { <http://example.com/ontology#CustomerLoyalty> ?p ?o }';
10
- const CONSTRUCT_TARGET_LABEL = 'Metric';
11
-
12
- describe('Reactodia graph explorer', () => {
13
- let repositoryId;
14
-
15
- beforeEach(() => {
16
- repositoryId = 'repository-' + Date.now();
17
- cy.createRepository({id: repositoryId});
18
- cy.presetRepository(repositoryId);
19
- cy.importServerFile(repositoryId, FILE_TO_IMPORT);
20
- });
21
-
22
- afterEach(() => {
23
- cy.deleteRepository(repositoryId);
24
- });
25
-
26
- it('should mount the reactodia workspace when a repository is active', () => {
27
- // Given I open the reactodia view without a start resource.
28
- ReactodiaSteps.visit();
29
-
30
- // Then I expect the reactodia workspace and its canvas to be rendered.
31
- ReactodiaSteps.getWorkspace().should('exist');
32
- ReactodiaSteps.getCanvas().should('exist');
33
-
34
- // And I expect the canvas to start empty because no start resource was provided.
35
- ReactodiaSteps.getElements().should('not.exist');
36
- });
37
-
38
- it('should place the start resource on the canvas as a seed', () => {
39
- // Given I open the reactodia view with a start resource.
40
- ReactodiaSteps.visit(SEED_RESOURCE_ENCODED);
41
-
42
- // Then I expect the start resource to be placed on the canvas as a seed element.
43
- ReactodiaSteps.getElements().should('have.length', 1);
44
- ReactodiaSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
45
- });
46
-
47
- it('should seed the canvas with the graph computed from a CONSTRUCT query', () => {
48
- // Given I open the reactodia view with a CONSTRUCT query, as sent from the SPARQL editor.
49
- ReactodiaSteps.visitWithQuery(CONSTRUCT_QUERY);
50
-
51
- // Then I expect the computed graph to be seeded on the canvas: the subject and its related resource.
52
- ReactodiaSteps.getElements().should('have.length', 2);
53
- ReactodiaSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
54
- ReactodiaSteps.getElement(CONSTRUCT_TARGET_LABEL).should('exist');
55
- });
56
-
57
- it('should keep the displayed resources when the language is switched', () => {
58
- // Given the reactodia view is opened with a start resource that gets seeded on the canvas.
59
- ReactodiaSteps.visit(SEED_RESOURCE_ENCODED);
60
- ReactodiaSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
61
- ReactodiaSteps.getElements().should('have.length', 1);
62
-
63
- // When I switch the language.
64
- LanguageSelectorSteps.switchToFr();
65
-
66
- // Then I expect the same resources to remain visible because the layout is carried across the remount.
67
- ReactodiaSteps.getElements().should('have.length', 1);
68
- ReactodiaSteps.getElement(SEED_RESOURCE_LABEL).should('exist');
69
- });
70
-
71
- describe('Repository switch', () => {
72
- let secondRepositoryId;
73
-
74
- beforeEach(() => {
75
- secondRepositoryId = 'repository-second-' + Date.now();
76
- cy.createRepository({id: secondRepositoryId});
77
- });
78
-
79
- afterEach(() => {
80
- cy.deleteRepository(secondRepositoryId);
81
- });
82
-
83
- it('should clear the canvas when the repository is switched', () => {
84
- // Given the reactodia view is opened with a start resource that gets seeded on the canvas.
85
- ReactodiaSteps.visit(SEED_RESOURCE_ENCODED);
86
- ReactodiaSteps.getElements().should('have.length', 1);
87
-
88
- // When I switch to another repository.
89
- RepositorySelectorSteps.selectRepository(secondRepositoryId);
90
-
91
- // Then I expect the workspace to still be mounted, but the canvas to be cleared.
92
- ReactodiaSteps.getWorkspace().should('exist');
93
- ReactodiaSteps.getElements().should('not.exist');
94
- });
95
- });
96
- });
@@ -1,42 +0,0 @@
1
- import {BaseSteps} from "./base-steps.js";
2
-
3
- const VIEW_URL = '/reactodia';
4
-
5
- export class ReactodiaSteps extends BaseSteps {
6
-
7
- static visit(uri) {
8
- cy.visit(`${VIEW_URL}${uri ? ('?uri=' + uri) : ''}`);
9
- }
10
-
11
- static visitWithQuery(query, {inference = false, sameAs = false} = {}) {
12
- cy.visit(`${VIEW_URL}?query=${encodeURIComponent(query)}&inference=${inference}&sameAs=${sameAs}`);
13
- }
14
-
15
- static verifyUrl() {
16
- this.validateUrl(`${Cypress.config('baseUrl')}${VIEW_URL}`);
17
- }
18
-
19
- static verifyStartResourceUri(uri) {
20
- cy.getQueryParam('uri').should('eq', uri);
21
- }
22
-
23
- static getComponent() {
24
- return cy.get('graphwise-reactodia');
25
- }
26
-
27
- static getWorkspace() {
28
- return ReactodiaSteps.getComponent().find('.reactodia-workspace');
29
- }
30
-
31
- static getCanvas() {
32
- return ReactodiaSteps.getComponent().find('.reactodia-canvas');
33
- }
34
-
35
- static getElements() {
36
- return ReactodiaSteps.getCanvas().find('[data-element-id]');
37
- }
38
-
39
- static getElement(text) {
40
- return ReactodiaSteps.getCanvas().find(`[data-element-id]`).contains(text).first();
41
- }
42
- }