graphdb-workbench-tests 3.1.0-WBM-8 → 3.1.0-plugins1
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.
- package/.nycrc +10 -0
- package/cypress-legacy.config.js +9 -1
- package/cypress-security.config.js +40 -0
- package/cypress.config.js +3 -1
- package/e2e-flaky/import/import-user-data-url.spec.js +63 -0
- package/e2e-legacy/cluster/edit-cluster-nodes-modal.spec.js +44 -0
- package/e2e-legacy/explore/class-hierarchy/class.hierarchy.spec.js +1 -2
- package/e2e-legacy/explore/graphs-overview/graphs.overview.spec.js +2 -3
- package/e2e-legacy/explore/visual-graph/graphs-config.spec.js +5 -18
- package/e2e-legacy/explore/visual-graph/visual.graph.spec.js +1 -2
- package/e2e-legacy/graphql/activate-deactivate-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/create-graphql-endpoint.spec.js +1 -3
- package/e2e-legacy/graphql/delete-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/graphql/edit-graphql-enpoint.spec.js +1 -1
- package/e2e-legacy/graphql/export-graphql-endpoint-definition.spec.js +1 -1
- package/e2e-legacy/graphql/filter-graphql-endpoints-on-management-view.spec.js +2 -2
- package/e2e-legacy/graphql/graphql-endpoint-management-view.spec.js +5 -5
- package/e2e-legacy/graphql/graphql-playground.spec.js +1 -1
- package/e2e-legacy/graphql/import-graphql-endpoint-definitions.spec.js +1 -7
- package/e2e-legacy/graphql/set-default-graphql-endpoint.spec.js +1 -1
- package/e2e-legacy/help/guides/guides-with-repository.spec.js +32 -0
- package/e2e-legacy/help/guides/guides-without-repository.spec.js +20 -0
- package/e2e-legacy/{guides → help/guides}/movies-interactive-guide.spec.js +2 -2
- package/e2e-legacy/{guides → help/guides}/star-wars-interactive-guide.js +2 -2
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-with-repository.spec.js +32 -0
- package/e2e-legacy/help/rest-api-documentatio/rest-api-documentation-without-repository.spec.js +20 -0
- package/e2e-legacy/help/system-information/system-information-with-repository.spec.js +32 -0
- package/e2e-legacy/help/system-information/system-information-without-repository.spec.js +20 -0
- package/e2e-legacy/home/cookie-policy.spec.js +78 -59
- package/e2e-legacy/home/create-repository.spec.js +2 -6
- package/e2e-legacy/home/documentation-link.spec.js +31 -33
- package/e2e-legacy/home/google-analytics.spec.js +4 -6
- package/e2e-legacy/home/rdf-resource-search.spec.js +106 -138
- package/e2e-legacy/home/view-resource-autocomplete.spec.js +30 -21
- package/e2e-legacy/import/import-server-files-batch-operations.spec.js +1 -2
- package/e2e-legacy/import/import-server-files.spec.js +1 -2
- package/e2e-legacy/import/import-user-data-url.spec.js +1 -25
- package/e2e-legacy/import/import-user-data.spec.js +4 -2
- package/e2e-legacy/import/import-view.spec.js +1 -2
- package/e2e-legacy/monitor/global-operation-statuses-component.spec.js +13 -9
- package/e2e-legacy/repository/attach-remote-location.spec.js +2 -5
- package/e2e-legacy/repository/ontop-repository.spec.js +3 -12
- package/e2e-legacy/repository/repositories.spec.js +35 -46
- package/e2e-legacy/setup/aclmanagement/create-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/edit-rule.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/reorder-rules.spec.js +1 -2
- package/e2e-legacy/setup/aclmanagement/scopes.spec.js +1 -2
- package/e2e-legacy/setup/autocomplete/autocomplete-with-repository.spec.js +40 -0
- package/e2e-legacy/setup/autocomplete/autocomplete-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{autocomplete.spec.js → autocomplete/autocomplete.spec.js} +5 -6
- package/e2e-legacy/setup/cluster/cluster-initial-state-with-cluster.spec.js +34 -0
- package/e2e-legacy/setup/cluster/cluster-initial-state-without-cluster.spec.js +25 -0
- package/e2e-legacy/setup/connectors-lucene.spec.js +1 -2
- package/e2e-legacy/setup/jdbc/jdbc-create.spec.js +2 -2
- package/e2e-legacy/setup/namespaces/namespaces-with-repository.spec.js +44 -0
- package/e2e-legacy/setup/namespaces/namespaces-without-repository.spec.js +27 -0
- package/e2e-legacy/setup/{namespaces.spec.js → namespaces/namespaces.spec.js} +4 -4
- package/e2e-legacy/setup/plugins/plugins-with-repository.spec.js +38 -0
- package/e2e-legacy/setup/plugins/plugins-without-repository.spec.js +28 -0
- package/e2e-legacy/setup/{plugins.spec.js → plugins/plugins.spec.js} +3 -3
- package/e2e-legacy/setup/sparql-template/sparql-template-create.js +10 -3
- package/e2e-legacy/setup/users-and-access/user-and-access.spec.js +38 -9
- package/e2e-legacy/sparql-editor/saved-query/edit-query.spec.js +3 -6
- package/e2e-legacy/sparql-editor/saved-query/readonly-query.spec.js +7 -13
- package/e2e-legacy/sparql-editor/saved-query/share-query.spec.js +2 -4
- package/e2e-legacy/sparql-editor/sparql-editor.spec.js +1 -4
- package/e2e-legacy/ttyg/agent-list.spec.js +38 -6
- package/e2e-legacy/ttyg/chat-list.spec.js +1 -2
- package/e2e-legacy/ttyg/clone-agent.spec.js +1 -0
- package/e2e-legacy/ttyg/create-agent.spec.js +10 -16
- package/e2e-legacy/ttyg/edit-agent.spec.js +69 -9
- package/e2e-legacy/ttyg/ttyg-initial-state-with-configured-api-key.spec.js +46 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-with-selected-repository.spec.js +45 -0
- package/e2e-legacy/ttyg/ttyg-initial-state-without-repositories.spec.js +21 -0
- package/e2e-legacy/ttyg/ttyg-permission.spec.js +28 -20
- package/e2e-legacy/ttyg/ttyg-view.spec.js +1 -1
- package/e2e-security/setup/home/cookie-policy.spec.js +64 -0
- package/e2e-security/setup/users-and-access/create-user-permissions.spec.js +184 -0
- package/e2e-security/setup/users-and-access/graphql-user.spec.js +123 -0
- package/e2e-security/setup/users-and-access/repo-admin-role.spec.js +69 -0
- package/e2e-security/setup/users-and-access/turn-on-security-and-password-change.spec.js +87 -0
- package/e2e-security/setup/users-and-access/user-and-access.spec.js +87 -0
- package/e2e-security/setup/users-and-access/users-and-access-initial-state.spec.js +38 -0
- package/fixtures/repositories/free-access.json +13 -0
- package/fixtures/repositories/get-remote-and-local-repositories.json +34 -0
- package/fixtures/ttyg/agent/get-agent-defaults-assistant-api.json +44 -0
- package/fixtures/ttyg/agent/get-agent-defaults.json +2 -0
- package/npm-shrinkwrap.json +7633 -1817
- package/package.json +13 -7
- package/plugins/index.js +3 -2
- package/steps/base-steps.js +4 -0
- package/steps/cluster/cluster-page-steps.js +12 -2
- package/steps/error-steps.js +4 -7
- package/steps/graphql/graphql-endpoint-management-steps.js +2 -2
- package/steps/guides/guide-steps.js +20 -1
- package/steps/home-steps.js +59 -37
- package/steps/import/import-steps.js +8 -3
- package/steps/login-steps.js +14 -3
- package/steps/main-menu-steps.js +76 -6
- package/steps/operations-statuses-component-steps.js +5 -10
- package/steps/rdf-resource-search-steps.js +55 -0
- package/steps/repository-steps.js +17 -17
- package/steps/rest-api-documentation-steps.js +15 -0
- package/steps/setup/autocomplete-steps.js +17 -3
- package/steps/setup/namespace-steps.js +8 -2
- package/steps/setup/plugins-steps.js +11 -1
- package/steps/setup/settings-steps.js +18 -0
- package/steps/setup/user-and-access-steps.js +28 -2
- package/steps/system-information-steps.js +70 -0
- package/steps/ttyg/ttyg-agent-settings-modal.steps.js +74 -11
- package/steps/ttyg/ttyg-view-steps.js +39 -6
- package/steps/widgets/active-repository-widget-steps.js +4 -0
- package/steps/yasgui/yasr-steps.js +4 -0
- package/stubs/browser-stubs.js +21 -0
- package/stubs/environment-stubs.js +9 -1
- package/stubs/repositories/repositories-stubs.js +4 -0
- package/stubs/security-stubs.js +4 -0
- package/stubs/ttyg/ttyg-stubs.js +18 -2
- package/support/e2e.js +2 -1
- package/support/repository-commands.js +14 -1
- package/e2e-flaky/setup/users-and-access/security-and-free-access.spec.js +0 -57
- package/e2e-flaky/ttyg/ttyg-permission.spec.js +0 -67
- package/fixtures/locale-en.json +0 -3361
- /package/e2e-legacy/help/{system-information.spec.js → system-information/system-information.spec.js} +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import HomeSteps from "../../../steps/home-steps";
|
|
2
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
3
|
+
import {SystemInformationSteps} from "../../../steps/system-information-steps";
|
|
4
|
+
|
|
5
|
+
describe('System information with selected repository', () => {
|
|
6
|
+
let repositoryId;
|
|
7
|
+
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
repositoryId = 'system-information-init-' + Date.now();
|
|
10
|
+
cy.createRepository({id: repositoryId});
|
|
11
|
+
cy.presetRepository(repositoryId);
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
cy.deleteRepository(repositoryId);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('Should display the correct initial state when navigating via URL', () => {
|
|
19
|
+
// Given, I visit the System information page via URL with a repository selected
|
|
20
|
+
SystemInformationSteps.visit();
|
|
21
|
+
// Then,
|
|
22
|
+
SystemInformationSteps.verifyInitialState();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('Should display the correct initial state when navigating via the navigation bar', () => {
|
|
26
|
+
// Given, I visit the System information page via the navigation menu with a repository selected
|
|
27
|
+
HomeSteps.visit();
|
|
28
|
+
MainMenuSteps.clickOnSystemInformation();
|
|
29
|
+
// Then,
|
|
30
|
+
SystemInformationSteps.verifyInitialState();
|
|
31
|
+
});
|
|
32
|
+
})
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import HomeSteps from "../../../steps/home-steps";
|
|
2
|
+
import {MainMenuSteps} from "../../../steps/main-menu-steps";
|
|
3
|
+
import {SystemInformationSteps} from "../../../steps/system-information-steps";
|
|
4
|
+
|
|
5
|
+
describe('System information without selected repository', () => {
|
|
6
|
+
it('Should display the correct initial state when navigating via URL', () => {
|
|
7
|
+
// Given, I visit the System information page via URL without a repository selected
|
|
8
|
+
SystemInformationSteps.visit();
|
|
9
|
+
// Then,
|
|
10
|
+
SystemInformationSteps.verifyInitialState();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('Should display the correct initial state when navigating via the navigation menu', () => {
|
|
14
|
+
// Given, I visit the System information page via the navigation menu without a repository selected
|
|
15
|
+
HomeSteps.visit();
|
|
16
|
+
MainMenuSteps.clickOnSystemInformation();
|
|
17
|
+
// Then,
|
|
18
|
+
SystemInformationSteps.verifyInitialState();
|
|
19
|
+
});
|
|
20
|
+
})
|
|
@@ -7,10 +7,7 @@ import {LicenseStubs} from "../../stubs/license-stubs";
|
|
|
7
7
|
Cypress.env('set_default_user_data', false);
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
* TODO: Fix me. Broken due to migration (Cookie policy is not implemented in the new footer)
|
|
12
|
-
*/
|
|
13
|
-
describe.skip('Cookie policy', () => {
|
|
10
|
+
describe('Cookie policy', () => {
|
|
14
11
|
beforeEach(() => {
|
|
15
12
|
cy.setDefaultUserData(false);
|
|
16
13
|
cy.viewport(1280, 1000);
|
|
@@ -19,71 +16,93 @@ describe.skip('Cookie policy', () => {
|
|
|
19
16
|
|
|
20
17
|
afterEach(() => cy.setDefaultUserData());
|
|
21
18
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
context('should show', () => {
|
|
20
|
+
it('Should show consent popup to user', () => {
|
|
21
|
+
HomeSteps.visitInProdMode();
|
|
22
|
+
HomeSteps.getCookieConsentPopup().should('exist').and('be.visible');
|
|
23
|
+
// When I click on the link
|
|
24
|
+
HomeSteps.clickCookiePolicyLink();
|
|
25
|
+
// Then I see the cookie policy
|
|
26
|
+
HomeSteps.getCookiePolicyModal().should('exist').and('be.visible');
|
|
27
|
+
});
|
|
31
28
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
SettingsSteps.getCookiePolicyButton().should('exist').and('be.visible');
|
|
29
|
+
it('Should show cookie policy to user in user settings', () => {
|
|
30
|
+
SettingsSteps.visitInProdMode();
|
|
31
|
+
SettingsSteps.getCookiePolicyButton().should('exist').and('be.visible');
|
|
36
32
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
// When I click on the link
|
|
34
|
+
SettingsSteps.clickCookiePolicyLink();
|
|
35
|
+
// Then I see the cookie policy
|
|
36
|
+
SettingsSteps.getCookiePolicyModal().should('exist').and('be.visible');
|
|
37
|
+
});
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
});
|
|
39
|
+
it('Should save consent in user settings', () => {
|
|
40
|
+
HomeSteps.visitInProdMode();
|
|
41
|
+
SecurityStubs.stubUpdateUserData('admin');
|
|
47
42
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
// When I click Agree button
|
|
44
|
+
HomeSteps.clickAgreeButton();
|
|
45
|
+
|
|
46
|
+
// I expect to save cookie consent in user settings
|
|
47
|
+
cy.wait('@updateUser').then((xhr) => {
|
|
48
|
+
expect(xhr.request.body.appSettings).to.include({
|
|
49
|
+
DEFAULT_INFERENCE: true,
|
|
50
|
+
DEFAULT_VIS_GRAPH_SCHEMA: true,
|
|
51
|
+
DEFAULT_SAMEAS: true,
|
|
52
|
+
IGNORE_SHARED_QUERIES: false,
|
|
53
|
+
EXECUTE_COUNT: true
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// Assert COOKIE_CONSENT properties, excluding updatedAt
|
|
57
|
+
expect(xhr.request.body.appSettings.COOKIE_CONSENT).to.include({
|
|
58
|
+
policyAccepted: true
|
|
59
|
+
});
|
|
52
60
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
cy.wait('@updateUser').then((xhr) => {
|
|
63
|
-
expect(xhr.request.body.appSettings).to.include({
|
|
64
|
-
DEFAULT_INFERENCE: true,
|
|
65
|
-
DEFAULT_VIS_GRAPH_SCHEMA: true,
|
|
66
|
-
DEFAULT_SAMEAS: true,
|
|
67
|
-
IGNORE_SHARED_QUERIES: false,
|
|
68
|
-
EXECUTE_COUNT: true
|
|
61
|
+
// Assert that updatedAt is present, is a number, and is a reasonable timestamp
|
|
62
|
+
const updatedAt = xhr.request.body.appSettings.COOKIE_CONSENT.updatedAt;
|
|
63
|
+
expect(updatedAt).to.exist;
|
|
64
|
+
expect(updatedAt).to.be.a('number');
|
|
65
|
+
|
|
66
|
+
// Check that updatedAt is within 1 hour of the current time
|
|
67
|
+
const oneHourInMilliseconds = 60 * 60 * 1000;
|
|
68
|
+
const now = Date.now();
|
|
69
|
+
expect(updatedAt).to.be.within(now - oneHourInMilliseconds, now + oneHourInMilliseconds);
|
|
69
70
|
});
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it('Should set cookies for tracking when accepted', () => {
|
|
74
|
+
HomeSteps.visitInProdMode();
|
|
75
|
+
SecurityStubs.stubUpdateUserData('admin');
|
|
76
|
+
|
|
77
|
+
// When I click Agree button
|
|
78
|
+
HomeSteps.clickAgreeButton();
|
|
70
79
|
|
|
71
|
-
//
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
// I expect to save cookie consent in user settings
|
|
81
|
+
cy.wait('@updateUser');
|
|
82
|
+
|
|
83
|
+
// Check if the GA tracking script is set correctly in the head
|
|
84
|
+
cy.document()
|
|
85
|
+
.get('head script')
|
|
86
|
+
.should("have.attr", "src")
|
|
87
|
+
.should('include', 'https://www.googletagmanager.com/gtm.js?id=GTM-WBP6C6Z4');
|
|
88
|
+
|
|
89
|
+
// Check if the installation ID cookie is set correctly
|
|
90
|
+
cy.getCookie('_wb').then((cookie) => {
|
|
91
|
+
expect(cookie).to.exist;
|
|
92
|
+
expect(cookie.value).to.match(/^WB1\.[a-zA-Z0-9\-]+\.\d+$/); // Check the cookie structure: WB1.<installationId>.<timestamp>
|
|
76
93
|
});
|
|
94
|
+
})
|
|
95
|
+
})
|
|
77
96
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
97
|
+
context('should not show', () => {
|
|
98
|
+
it('Should NOT show consent popup to user when tracking is not applicable', () => {
|
|
99
|
+
HomeSteps.visitInDevMode();
|
|
100
|
+
HomeSteps.getCookieConsentPopup().should('not.exist');
|
|
101
|
+
});
|
|
82
102
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
expect(updatedAt).to.be.within(now - oneHourInMilliseconds, now + oneHourInMilliseconds);
|
|
103
|
+
it('Should NOT show cookie policy to user when tracking is not applicable', () => {
|
|
104
|
+
SettingsSteps.visitInDevMode();
|
|
105
|
+
SettingsSteps.getCookiePolicyButton().should('not.exist');
|
|
87
106
|
});
|
|
88
107
|
});
|
|
89
108
|
});
|
|
@@ -7,10 +7,7 @@ describe('Create repository', () => {
|
|
|
7
7
|
HomeSteps.visitAndWaitLoader();
|
|
8
8
|
});
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
* TODO: Fix me. Broken due to migration (Repository selector is changed)
|
|
12
|
-
*/
|
|
13
|
-
it.skip('Test create and select new repository via home page', () => {
|
|
10
|
+
it('Test create and select new repository via home page', () => {
|
|
14
11
|
HomeSteps.verifyCreateRepositoryLink();
|
|
15
12
|
|
|
16
13
|
const repositoryId = HomeSteps.createRepo();
|
|
@@ -24,8 +21,7 @@ describe('Create repository', () => {
|
|
|
24
21
|
cy.deleteRepository(repositoryId);
|
|
25
22
|
});
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
it.skip('Test saved SPARQL queries links on home page and confirm dialog appearance', () => {
|
|
24
|
+
it('Test saved SPARQL queries links on home page and confirm dialog appearance', () => {
|
|
29
25
|
const repositoryId = HomeSteps.createRepo();
|
|
30
26
|
HomeSteps.selectRepo(repositoryId);
|
|
31
27
|
|
|
@@ -1,63 +1,61 @@
|
|
|
1
1
|
import HomeSteps from '../../steps/home-steps';
|
|
2
2
|
import {EnvironmentStubs} from "../../stubs/environment-stubs";
|
|
3
|
+
import {MainMenuSteps} from "../../steps/main-menu-steps";
|
|
4
|
+
import {BrowserStubs} from "../../stubs/browser-stubs";
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
* TODO: Fix me. Broken due to migration (The main menu is changed)
|
|
6
|
-
*/
|
|
7
|
-
describe.skip('Documentation links resolver', () => {
|
|
6
|
+
describe('Documentation links resolver', () => {
|
|
8
7
|
|
|
9
8
|
beforeEach(() => {
|
|
10
9
|
cy.viewport(1280, 1000);
|
|
10
|
+
EnvironmentStubs.spyProductInfo();
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
it('Should link to master version when in dev mode', () => {
|
|
14
|
-
HomeSteps.
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
HomeSteps.visitInDevMode();
|
|
15
|
+
waitForProductInfo();
|
|
16
|
+
BrowserStubs.stubWindowOpen();
|
|
17
|
+
MainMenuSteps.clickOnMenuHelp();
|
|
17
18
|
// Assert that links point to the master version
|
|
18
19
|
assertDocumentationLinks('master');
|
|
20
|
+
|
|
19
21
|
});
|
|
20
22
|
|
|
21
23
|
it('Should link to master version when in prod mode and unofficial version', () => {
|
|
22
24
|
EnvironmentStubs.stubProductInfo('10.8-TR1-test');
|
|
23
|
-
HomeSteps.
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
HomeSteps.visitInProdMode();
|
|
26
|
+
waitForProductInfo();
|
|
27
|
+
BrowserStubs.stubWindowOpen();
|
|
28
|
+
MainMenuSteps.clickOnMenuHelp();
|
|
26
29
|
// Assert that links point to the master version
|
|
27
30
|
assertDocumentationLinks('master');
|
|
28
31
|
});
|
|
29
32
|
|
|
30
33
|
it('Should link to GDB version when in prod mode and official version', () => {
|
|
31
34
|
EnvironmentStubs.stubProductInfo('10.8');
|
|
32
|
-
HomeSteps.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
HomeSteps.visitInProdMode();
|
|
36
|
+
waitForProductInfo();
|
|
37
|
+
BrowserStubs.stubWindowOpen();
|
|
38
|
+
MainMenuSteps.clickOnMenuHelp();
|
|
35
39
|
// Assert that links point to the specific GDB version
|
|
36
40
|
assertDocumentationLinks('10.8');
|
|
37
41
|
});
|
|
38
42
|
});
|
|
39
43
|
|
|
44
|
+
function waitForProductInfo() {
|
|
45
|
+
// We must wait for both requests, old legacy one and the new from the API
|
|
46
|
+
cy.wait(EnvironmentStubs.PRODUCT_INFO_ALIAS());
|
|
47
|
+
cy.wait(EnvironmentStubs.PRODUCT_INFO_ALIAS());
|
|
48
|
+
}
|
|
49
|
+
|
|
40
50
|
function assertDocumentationLinks(version) {
|
|
41
51
|
const baseUrl = `https://graphdb.ontotext.com/documentation/${version}`;
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.should('exist')
|
|
52
|
-
.and('be.visible')
|
|
53
|
-
.find('a')
|
|
54
|
-
.should('have.attr', 'href', `${baseUrl}/tutorials.html`)
|
|
55
|
-
.and('contain.text', 'Tutorials');
|
|
56
|
-
|
|
57
|
-
HomeSteps.getSupportLink()
|
|
58
|
-
.should('exist')
|
|
59
|
-
.and('be.visible')
|
|
60
|
-
.find('a')
|
|
61
|
-
.should('have.attr', 'href', `${baseUrl}/support.html`)
|
|
62
|
-
.and('contain.text', 'Support');
|
|
53
|
+
MainMenuSteps.clickOnSubMenu('Documentation')
|
|
54
|
+
cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `${baseUrl}/index.html`, "_blank")
|
|
55
|
+
|
|
56
|
+
MainMenuSteps.clickOnSubMenu('Tutorials')
|
|
57
|
+
cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `${baseUrl}/tutorials.html`, "_blank")
|
|
58
|
+
|
|
59
|
+
MainMenuSteps.clickOnSubMenu('Support')
|
|
60
|
+
cy.get(BrowserStubs.WINDOW_OPEN_ALIAS()).should('have.been.calledWithMatch', `${baseUrl}/support.html`, "_blank")
|
|
63
61
|
}
|
|
@@ -11,9 +11,9 @@ describe('Google analytics', () => {
|
|
|
11
11
|
// Note: Google API calls are stubbed for all specs in support/index.js
|
|
12
12
|
it('Should set GA tracking code in header and a cookie when free license and prodMode', () => {
|
|
13
13
|
LicenseStubs.stubFreeLicense();
|
|
14
|
-
HomeSteps.
|
|
15
|
-
EnvironmentStubs.stubWbProdMode();
|
|
14
|
+
HomeSteps.visitInProdMode();
|
|
16
15
|
|
|
16
|
+
// Check if the GA tracking script is set correctly in the head
|
|
17
17
|
cy.document()
|
|
18
18
|
.get('head script')
|
|
19
19
|
.should("have.attr", "src")
|
|
@@ -28,8 +28,7 @@ describe('Google analytics', () => {
|
|
|
28
28
|
|
|
29
29
|
it('Should set GA tracking code in header and cookie when evaluation enterprise license and prodMode', () => {
|
|
30
30
|
LicenseStubs.stubEvaluationLicense();
|
|
31
|
-
HomeSteps.
|
|
32
|
-
EnvironmentStubs.stubWbProdMode();
|
|
31
|
+
HomeSteps.visitInProdMode();
|
|
33
32
|
|
|
34
33
|
cy.document()
|
|
35
34
|
.get('head script')
|
|
@@ -45,8 +44,7 @@ describe('Google analytics', () => {
|
|
|
45
44
|
|
|
46
45
|
it('Should NOT set GA tracking code in header and cookie when enterprise license in prodMode', () => {
|
|
47
46
|
LicenseStubs.stubEnterpriseLicense();
|
|
48
|
-
HomeSteps.
|
|
49
|
-
EnvironmentStubs.stubWbProdMode();
|
|
47
|
+
HomeSteps.visitInProdMode();
|
|
50
48
|
|
|
51
49
|
cy.document()
|
|
52
50
|
.get('head script')
|