graphdb-workbench-tests 2.8.0-RC2 → 2.8.0-RC4
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/fixtures/cluster/3-nodes-cluster-group-status-with-tag.json +47 -0
- package/fixtures/cluster/no-cluster-group-status.json +2 -1
- package/fixtures/cluster/no-cluster-node-status.json +2 -1
- package/fixtures/cluster/save-cluster-configuration-response.json +10 -0
- package/fixtures/locale-en.json +26 -30
- package/fixtures/security/get-admin-user.json +22 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-multi-region.spec.js +97 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-nodes.spec.js +70 -0
- package/integration/cluster/cluster-configuration/cluster-configuration-properties.spec.js +95 -0
- package/integration/cluster/cluster-configuration/cluster-configuration.spec.js +38 -0
- package/integration/cluster/cluster-legend.spec.js +1 -0
- package/integration/explore/similariti-index-create.spec.js +1 -1
- package/integration/explore/similarity-index.spec.js +1 -1
- package/integration/explore/visual-graph/visual.graph.spec.js +31 -35
- package/integration/home/cookie-policy.spec.js +27 -9
- package/integration/license/license.spec.js +26 -0
- package/integration/repository/attach-remote-location.spec.js +13 -8
- package/integration/setup/my-settings.spec.js +13 -23
- package/integration/ttyg/create-agent.spec.js +13 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/steps/cluster/cluster-configuration-steps.js +173 -5
- package/steps/license-steps.js +25 -0
- package/steps/setup/settings-steps.js +3 -3
- package/steps/visual-graph-steps.js +29 -1
- package/stubs/cluster/cluster-stubs.js +43 -8
- package/stubs/license-stubs.js +7 -0
- package/stubs/repositories/repositories-stubs.js +8 -0
- package/stubs/security-stubs.js +22 -0
- package/support/index.js +2 -1
- package/integration/cluster/cluster-management.spec.js +0 -50
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"address": "pc-desktop:7300",
|
|
4
|
+
"nodeState": "FOLLOWER",
|
|
5
|
+
"term": 2,
|
|
6
|
+
"syncStatus": {},
|
|
7
|
+
"lastLogTerm": 0,
|
|
8
|
+
"lastLogIndex": 0,
|
|
9
|
+
"endpoint": "http://pc-desktop:7200",
|
|
10
|
+
"recoveryStatus": {},
|
|
11
|
+
"topologyStatus": {
|
|
12
|
+
"state": "PRIMARY_NODE"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"address": "pc-desktop:7301",
|
|
17
|
+
"nodeState": "LEADER",
|
|
18
|
+
"term": 2,
|
|
19
|
+
"syncStatus": {
|
|
20
|
+
"pc-desktop:7300": "IN_SYNC",
|
|
21
|
+
"pc-desktop:7302": "IN_SYNC"
|
|
22
|
+
},
|
|
23
|
+
"lastLogTerm": 0,
|
|
24
|
+
"lastLogIndex": 0,
|
|
25
|
+
"endpoint": "http://pc-desktop:7201",
|
|
26
|
+
"recoveryStatus": {},
|
|
27
|
+
"topologyStatus": {
|
|
28
|
+
"state": "PRIMARY_NODE",
|
|
29
|
+
"primaryTags": {
|
|
30
|
+
"test": 0
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"address": "pc-desktop:7302",
|
|
36
|
+
"nodeState": "FOLLOWER",
|
|
37
|
+
"term": 2,
|
|
38
|
+
"syncStatus": {},
|
|
39
|
+
"lastLogTerm": 0,
|
|
40
|
+
"lastLogIndex": 0,
|
|
41
|
+
"endpoint": "http://pc-desktop:7202",
|
|
42
|
+
"recoveryStatus": {},
|
|
43
|
+
"topologyStatus": {
|
|
44
|
+
"state": "PRIMARY_NODE"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"electionMinTimeout": 5000,
|
|
3
|
+
"electionRangeTimeout": 3000,
|
|
4
|
+
"heartbeatInterval": 1500,
|
|
5
|
+
"messageSizeKB": 64,
|
|
6
|
+
"verificationTimeout": 1200,
|
|
7
|
+
"transactionLogMaximumSizeGB": 50,
|
|
8
|
+
"batchUpdateInterval": 2000,
|
|
9
|
+
"nodes": ["pc-desktop:7300", "pc-desktop:7301", "pc-desktop:7302"]
|
|
10
|
+
}
|
package/fixtures/locale-en.json
CHANGED
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
"chat_panel": {
|
|
341
341
|
"hint1": "<div><span class=\"graph\">GRAPH</span><span class=\"wise\">WISE</span></div><div class=\"thrives\">AI THRIVES ON WHOLE DATA</div>",
|
|
342
342
|
"hint2": "Simply ask a question!",
|
|
343
|
-
"deleted_agent": "<span class=\"text-warning\"><i class=\"fa
|
|
343
|
+
"deleted_agent": "<span class=\"text-warning\"><i class=\"fa fa-triangle-exclamation fa-xs\"></i> deleted agent</span>",
|
|
344
344
|
"btn": {
|
|
345
345
|
"ask": {
|
|
346
346
|
"label": "Ask"
|
|
@@ -389,14 +389,16 @@
|
|
|
389
389
|
"json": "JSON",
|
|
390
390
|
"error_message": "Error message sent to model",
|
|
391
391
|
"explain_no_methods": "No query methods were called.",
|
|
392
|
-
"called": "Called {{('ttyg.chat_panel.query_name.' + name) | translate}}"
|
|
392
|
+
"called": "Called {{('ttyg.chat_panel.query_name.' + name) | translate}}",
|
|
393
|
+
"no_query": "There is no query."
|
|
393
394
|
},
|
|
394
395
|
"query_name": {
|
|
395
396
|
"sparql_query":"SPARQL",
|
|
396
397
|
"fts_search": "Full-text search",
|
|
397
398
|
"similarity_search": "Similarity search",
|
|
398
399
|
"retrieval_search": "ChatGPT Retrieval",
|
|
399
|
-
"iri_discovery": "FTS for IRI discovery"
|
|
400
|
+
"iri_discovery": "FTS for IRI discovery",
|
|
401
|
+
"now": "the Now function"
|
|
400
402
|
},
|
|
401
403
|
"query_colon": ":",
|
|
402
404
|
"query_desc": {
|
|
@@ -404,7 +406,8 @@
|
|
|
404
406
|
"fts_search": "Full-text search via SPARQL",
|
|
405
407
|
"similarity_search": "Similarity search via SPARQL",
|
|
406
408
|
"retrieval_search": "Direct JSON query",
|
|
407
|
-
"iri_discovery": "Full-text search via SPARQL"
|
|
409
|
+
"iri_discovery": "Full-text search via SPARQL",
|
|
410
|
+
"now": "returns the system time"
|
|
408
411
|
},
|
|
409
412
|
"dialog": {
|
|
410
413
|
"confirm_repository_change": {
|
|
@@ -1884,7 +1887,7 @@
|
|
|
1884
1887
|
"common.cancel.btn": "Cancel",
|
|
1885
1888
|
"common.yes.btn": "Yes",
|
|
1886
1889
|
"common.ok.btn": "OK",
|
|
1887
|
-
"common.
|
|
1890
|
+
"common.close.btn": "Close",
|
|
1888
1891
|
"common.error": "Error",
|
|
1889
1892
|
"common.warning": "Warning",
|
|
1890
1893
|
"common.loading": "Loading...",
|
|
@@ -2677,35 +2680,28 @@
|
|
|
2677
2680
|
"yasgui.tab_list.close_tab.confirmation.not_query_update.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 update.</div><div>Are you sure you want to close this query tab?</div>",
|
|
2678
2681
|
"yasgui.tab_list.close_tab.confirmation.query_non_updates.message": "<div class=\"run_query_confirmation alert alert-warning\">You have running 1 query, that will be aborted.</div><div>Are you sure you want to close this query tab?</div>",
|
|
2679
2682
|
"cookie" : {
|
|
2680
|
-
"cookie_consent": "We use cookies to
|
|
2683
|
+
"cookie_consent": "We may use cookies to help us improve GraphDB and develop better features. No personal or sensitive information is collected. By clicking “{{'common.ok.btn' | translate}},” you consent to our",
|
|
2681
2684
|
"cookie_policy_url_label": "Cookie Policy",
|
|
2682
2685
|
"policy": {
|
|
2683
|
-
"title": "
|
|
2686
|
+
"title": "Cookies Policy",
|
|
2684
2687
|
"purpose_heading": "Purpose",
|
|
2685
|
-
"purpose_text": "
|
|
2686
|
-
"
|
|
2687
|
-
"
|
|
2688
|
+
"purpose_text": "This Cookies Policy explains the data Ontotext collects and uses when you use our GraphDB product, specifically the Free Edition.",
|
|
2689
|
+
"purpose_enterprise_text": "Note that if you upgrade to the commercial GraphDB Enterprise Edition, no cookies will be stored on your device, regardless of settings.",
|
|
2690
|
+
"privacy_commitment_heading": "Ontotext privacy commitment",
|
|
2691
|
+
"privacy_commitment_text": "We are committed to not collecting any personal data or information when you use GraphDB Free. Additionally:",
|
|
2692
|
+
"privacy_commitment_1": "We will not sell or rent the technical information we collect to others.",
|
|
2693
|
+
"privacy_commitment_2": "We strive to maximize the protection of all technical data collected.",
|
|
2688
2694
|
"cookies_heading": "Cookies",
|
|
2689
|
-
"cookies_text": "
|
|
2690
|
-
"
|
|
2691
|
-
"
|
|
2692
|
-
"
|
|
2693
|
-
"
|
|
2694
|
-
"
|
|
2695
|
-
"
|
|
2696
|
-
"
|
|
2697
|
-
"
|
|
2698
|
-
"
|
|
2699
|
-
"third_party_cookies_heading": "Third-Party Cookies",
|
|
2700
|
-
"third_party_cookies_text": "We also use some third party cookies as part of our services. These cookies are managed by the respective sites and are not controlled by us. Listed below are the third party cookies we use, some of which can be turned off using your browser's general settings. For others you need to visit the relevant sites and follow the instructions provided.",
|
|
2701
|
-
"google_analytics_heading": "Google Analytics (GA4)",
|
|
2702
|
-
"google_analytics_opt_out_text": "We use the application to generate statistics about the sources and traffic to our sites, as well as for advertising campaigns. To opt-out, follow the instructions described",
|
|
2703
|
-
"google_analytics_opt_out_link_text": "here.",
|
|
2704
|
-
"google_analytics_text": "In GA4, IP anonymization is enabled by default and cannot be turned off. This means that GA4 will not store your IP addresses and cannot track you. GA4 does not share data between other Google products such as Google Signals, Google Ads, etc. Data processing by GA4 currently takes place on multiple servers located around the world, most of which are located in the USA. However, this does not constitute a breach of GDPR data transfer requirements because we do not collect personal data through GA4.",
|
|
2705
|
-
"changes_heading": "Changes to our Cookie Policy",
|
|
2706
|
-
"changes_text": "Any future changes to our Cookie Policy will be posted on this page.",
|
|
2707
|
-
"contact_heading": "Contact Us",
|
|
2708
|
-
"contact_text": "When you email us with a request, we may ask that you provide us with information necessary to confirm your identity. Any such request should be addressed to legal@ontotext.com."
|
|
2695
|
+
"cookies_text": "When you use GraphDB Free Edition, Ontotext will store cookies on your device to collect anonymous information about how you interact with the product. This technical data helps us improve and refine our software. Importantly, we cannot link this information to you personally or to any identifiable data. These cookies are solely intended to help us understand user interactions and identify potential issues within GraphDB.",
|
|
2696
|
+
"manage_cookies_heading": "Manage cookies",
|
|
2697
|
+
"statistic_cookies": "GraphDB analytics cookies",
|
|
2698
|
+
"statistic_tooltip": "Toggle GraphDB analytics cookies",
|
|
2699
|
+
"statistic_text": "These cookies help us understand how users interact with different aspects of GraphDB by collecting and reporting information anonymously. This data allows us to improve the overall product experience and develop features based on how GraphDB is used, without collecting any personal information.",
|
|
2700
|
+
"third_party_cookies": "Third-party cookies",
|
|
2701
|
+
"third_party_tooltip": "Toggle Third-party cookies",
|
|
2702
|
+
"third_party_cookies_text": "We use Google Analytics 4 (GA4) cookies to help us recognize unique users and sessions, track interactions, and collect data such as page views, session duration, and engagement. These cookies are managed by Google, meaning we do not control their operation. IP anonymization is enabled by default in GA4, so it cannot store IP addresses or track users personally. No data is shared between GA4 and other Google products, and processing occurs globally, primarily in the USA, without breaching GDPR, as no personal data is collected.",
|
|
2703
|
+
"change_cookies": "You can change your cookie preferences at any time in",
|
|
2704
|
+
"change_cookies_location4": "Cookie policy"
|
|
2709
2705
|
}
|
|
2710
2706
|
}
|
|
2711
2707
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"username": "admin",
|
|
3
|
+
"password": "",
|
|
4
|
+
"grantedAuthorities": [
|
|
5
|
+
"ROLE_ADMIN"
|
|
6
|
+
],
|
|
7
|
+
"appSettings": {
|
|
8
|
+
"COOKIE_CONSENT": {
|
|
9
|
+
"policyAccepted": true,
|
|
10
|
+
"statistic": true,
|
|
11
|
+
"thirdParty": true,
|
|
12
|
+
"updatedAt": 1730269436033
|
|
13
|
+
},
|
|
14
|
+
"DEFAULT_SAMEAS": true,
|
|
15
|
+
"DEFAULT_INFERENCE": true,
|
|
16
|
+
"EXECUTE_COUNT": true,
|
|
17
|
+
"IGNORE_SHARED_QUERIES": false,
|
|
18
|
+
"DEFAULT_VIS_GRAPH_SCHEMA": true
|
|
19
|
+
},
|
|
20
|
+
"dateCreated": 1730269436033,
|
|
21
|
+
"gptThreads": []
|
|
22
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import {ClusterPageSteps} from "../../../steps/cluster/cluster-page-steps";
|
|
2
|
+
import {GlobalOperationsStatusesStub} from "../../../stubs/global-operations-statuses-stub";
|
|
3
|
+
import {ClusterStubs} from "../../../stubs/cluster/cluster-stubs";
|
|
4
|
+
import {RemoteLocationStubs} from "../../../stubs/cluster/remote-location-stubs";
|
|
5
|
+
import {ClusterConfigurationSteps} from "../../../steps/cluster/cluster-configuration-steps";
|
|
6
|
+
import {ModalDialogSteps} from "../../../steps/modal-dialog-steps";
|
|
7
|
+
import {ApplicationSteps} from "../../../steps/application-steps";
|
|
8
|
+
|
|
9
|
+
describe('Cluster configuration', () => {
|
|
10
|
+
let repositoryId;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
repositoryId = 'cluster-repo' + Date.now();
|
|
14
|
+
GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
|
|
15
|
+
// Given there is an existing cluster created
|
|
16
|
+
ClusterStubs.stubClusterConfig();
|
|
17
|
+
ClusterStubs.stubClusterGroupStatus();
|
|
18
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
19
|
+
RemoteLocationStubs.stubRemoteLocationFilter();
|
|
20
|
+
RemoteLocationStubs.stubRemoteLocationStatusInCluster();
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
it('should be able to add and delete tags', () => {
|
|
24
|
+
const tagName = 'test';
|
|
25
|
+
// Given I have opened the cluster management page
|
|
26
|
+
ClusterPageSteps.visit();
|
|
27
|
+
// When I click on edit properties and open Multi-region tab
|
|
28
|
+
ClusterPageSteps.previewClusterConfig();
|
|
29
|
+
ClusterConfigurationSteps.selectMultiRegionConfigTab();
|
|
30
|
+
// I expect to see
|
|
31
|
+
ClusterConfigurationSteps.getMultiRegionHeader().should('contain.text', 'Primary cluster');
|
|
32
|
+
ClusterConfigurationSteps.getAddTagButton().should('be.visible').and('not.be.disabled');
|
|
33
|
+
ClusterConfigurationSteps.getEnableSecondaryModeButton().should('be.visible').and('be.enabled');
|
|
34
|
+
ClusterConfigurationSteps.getTagsTable().should('not.exist');
|
|
35
|
+
|
|
36
|
+
ClusterStubs.stubAddTag(tagName);
|
|
37
|
+
ClusterConfigurationSteps.clickAddTagButton();
|
|
38
|
+
ClusterConfigurationSteps.typeTag(tagName);
|
|
39
|
+
ClusterConfigurationSteps.clickSubmitTagButton();
|
|
40
|
+
cy.wait('@add-tag').then((interception) => {
|
|
41
|
+
expect(interception.request.body).to.deep.equal({tag: tagName});
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
ClusterStubs.stubClusterGroupStatusWithTag();
|
|
45
|
+
cy.wait('@3-nodes-cluster-group-status-tag');
|
|
46
|
+
// Assert the tags table contains the expected tag
|
|
47
|
+
ClusterConfigurationSteps.getTagsTable().should('be.visible');
|
|
48
|
+
ClusterConfigurationSteps.getTagsTableRows().should('contain.text', tagName);
|
|
49
|
+
|
|
50
|
+
// And expect success message to be displayed.
|
|
51
|
+
ApplicationSteps.getSuccessNotifications().contains(`Successfully added to cluster primary identifier tag: ${tagName}`);
|
|
52
|
+
|
|
53
|
+
//When I delete the tag
|
|
54
|
+
ClusterConfigurationSteps.clickDeleteTagButton();
|
|
55
|
+
// I expect to see deleting confirmation dialog.
|
|
56
|
+
ModalDialogSteps.getDialogHeader().should('contain', `Delete identifier tag ${tagName}`);
|
|
57
|
+
ModalDialogSteps.getDialogBody().should('contain', 'Deleting identifier tag would stop any secondary cluster identified with it from pulling updates.');
|
|
58
|
+
|
|
59
|
+
// When I confirm
|
|
60
|
+
ClusterStubs.stubDeleteTag(tagName);
|
|
61
|
+
ModalDialogSteps.clickOnConfirmButton();
|
|
62
|
+
cy.wait('@delete-tag').then((interception) => {
|
|
63
|
+
expect(interception.request.body).to.deep.equal({tag: tagName});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it('should be able to switch modes', () => {
|
|
68
|
+
ClusterStubs.stubEnableSecondaryMode();
|
|
69
|
+
const rpcAddress = 'node-name:7300';
|
|
70
|
+
const tag = 'us-central';
|
|
71
|
+
|
|
72
|
+
// Given I have opened the cluster management page
|
|
73
|
+
ClusterPageSteps.visit();
|
|
74
|
+
// When I click on edit properties and open Nodes tab
|
|
75
|
+
ClusterPageSteps.previewClusterConfig();
|
|
76
|
+
ClusterConfigurationSteps.selectMultiRegionConfigTab();
|
|
77
|
+
// I click enable secondary mode btn
|
|
78
|
+
ClusterConfigurationSteps.clickEnableSecondaryModeButton();
|
|
79
|
+
// I expect to see enable secondary mode confirmation dialog.
|
|
80
|
+
ModalDialogSteps.getDialogHeader().should('contain', `Enable secondary mode`);
|
|
81
|
+
ModalDialogSteps.getDialogBody().should('contain', 'By enabling secondary mode this cluster would become a read-only replica of the specified primary cluster.');
|
|
82
|
+
// When I confirm I expect to see configuration modal
|
|
83
|
+
ModalDialogSteps.getConfirmButton().click();
|
|
84
|
+
ModalDialogSteps.getDialogHeader().should('contain', `Secondary cluster settings`);
|
|
85
|
+
ClusterConfigurationSteps.getEnableButton().should('be.disabled');
|
|
86
|
+
ClusterConfigurationSteps.typeRpcAddress(rpcAddress);
|
|
87
|
+
ClusterConfigurationSteps.getEnableButton().should('be.disabled');
|
|
88
|
+
ClusterConfigurationSteps.typePrimaryTag(tag);
|
|
89
|
+
ClusterConfigurationSteps.getEnableButton().should('not.be.disabled');
|
|
90
|
+
ClusterConfigurationSteps.clickEnableButton();
|
|
91
|
+
cy.wait('@enable-secondary-mode').then((interception) => {
|
|
92
|
+
expect(interception.request.body).to.deep.equal({primaryNode: rpcAddress, tag});
|
|
93
|
+
});
|
|
94
|
+
// And expect success message to be displayed.
|
|
95
|
+
ApplicationSteps.getSuccessNotifications().contains(`Successfully enabled secondary mode`);
|
|
96
|
+
});
|
|
97
|
+
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {ClusterPageSteps} from "../../../steps/cluster/cluster-page-steps";
|
|
2
|
+
import {GlobalOperationsStatusesStub} from "../../../stubs/global-operations-statuses-stub";
|
|
3
|
+
import {ClusterStubs} from "../../../stubs/cluster/cluster-stubs";
|
|
4
|
+
import {RemoteLocationStubs} from "../../../stubs/cluster/remote-location-stubs";
|
|
5
|
+
import {ClusterConfigurationSteps} from "../../../steps/cluster/cluster-configuration-steps";
|
|
6
|
+
|
|
7
|
+
describe('Cluster configuration', () => {
|
|
8
|
+
let repositoryId;
|
|
9
|
+
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
repositoryId = 'cluster-repo' + Date.now();
|
|
12
|
+
GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
|
|
13
|
+
// Given there is an existing cluster created
|
|
14
|
+
ClusterStubs.stubClusterConfig();
|
|
15
|
+
ClusterStubs.stubClusterGroupStatus();
|
|
16
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
17
|
+
RemoteLocationStubs.stubRemoteLocationFilter();
|
|
18
|
+
RemoteLocationStubs.stubRemoteLocationStatusInCluster();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it('should display the nodes list with correct node information in the modal', () => {
|
|
22
|
+
// Given I have opened the cluster management page
|
|
23
|
+
ClusterPageSteps.visit();
|
|
24
|
+
// When I click on edit properties and open Nodes tab
|
|
25
|
+
ClusterPageSteps.previewClusterConfig();
|
|
26
|
+
ClusterConfigurationSteps.selectNodesTab();
|
|
27
|
+
// I expect to see
|
|
28
|
+
ClusterConfigurationSteps.getNodesListHeader().should('contain.text', 'Nodes list');
|
|
29
|
+
ClusterConfigurationSteps.assertNodesCount(3);
|
|
30
|
+
|
|
31
|
+
const nodeData = [
|
|
32
|
+
{
|
|
33
|
+
url: 'http://pc-desktop:7200',
|
|
34
|
+
rpcAddress: 'pc-desktop:7300',
|
|
35
|
+
state: 'FOLLOWER',
|
|
36
|
+
local: true
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
url: 'http://pc-desktop:7201',
|
|
40
|
+
rpcAddress: 'pc-desktop:7301',
|
|
41
|
+
state: 'LEADER',
|
|
42
|
+
local: false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
url: 'http://pc-desktop:7202',
|
|
46
|
+
rpcAddress: 'pc-desktop:7302',
|
|
47
|
+
state: 'FOLLOWER',
|
|
48
|
+
local: false
|
|
49
|
+
}
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
nodeData.forEach((data, index) => {
|
|
53
|
+
ClusterConfigurationSteps.getNodeLink(index)
|
|
54
|
+
.should('have.attr', 'href', data.url)
|
|
55
|
+
.and('contain.text', data.url);
|
|
56
|
+
|
|
57
|
+
ClusterConfigurationSteps.getNodeRPCAddress(index)
|
|
58
|
+
.should('contain.text', data.rpcAddress);
|
|
59
|
+
|
|
60
|
+
ClusterConfigurationSteps.getNodeState(index)
|
|
61
|
+
.should('contain.text', data.state);
|
|
62
|
+
|
|
63
|
+
if (data.local) {
|
|
64
|
+
ClusterConfigurationSteps.isNodeLocal(index).should('exist');
|
|
65
|
+
} else {
|
|
66
|
+
ClusterConfigurationSteps.isNodeLocal(index).should('not.exist');
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {ClusterPageSteps} from "../../../steps/cluster/cluster-page-steps";
|
|
2
|
+
import {GlobalOperationsStatusesStub} from "../../../stubs/global-operations-statuses-stub";
|
|
3
|
+
import {ClusterStubs} from "../../../stubs/cluster/cluster-stubs";
|
|
4
|
+
import {RemoteLocationStubs} from "../../../stubs/cluster/remote-location-stubs";
|
|
5
|
+
import {DeleteClusterDialogSteps} from "../../../steps/cluster/delete-cluster-dialog-steps";
|
|
6
|
+
import {ClusterConfigurationSteps} from "../../../steps/cluster/cluster-configuration-steps";
|
|
7
|
+
|
|
8
|
+
describe('Cluster configuration', () => {
|
|
9
|
+
let repositoryId;
|
|
10
|
+
|
|
11
|
+
beforeEach(() => {
|
|
12
|
+
repositoryId = 'cluster-repo' + Date.now();
|
|
13
|
+
GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
|
|
14
|
+
// Given there is an existing cluster created
|
|
15
|
+
ClusterStubs.stubClusterConfig();
|
|
16
|
+
ClusterStubs.stubClusterGroupStatus();
|
|
17
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
18
|
+
RemoteLocationStubs.stubRemoteLocationFilter();
|
|
19
|
+
RemoteLocationStubs.stubRemoteLocationStatusInCluster();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('Should be able to delete cluster', () => {
|
|
23
|
+
// Given I have opened the cluster management page
|
|
24
|
+
ClusterPageSteps.visit();
|
|
25
|
+
|
|
26
|
+
ClusterPageSteps.getClusterPage().should('be.visible');
|
|
27
|
+
ClusterPageSteps.getCreateClusterButton().should('not.have.class', 'no-cluster');
|
|
28
|
+
// When I click on delete cluster
|
|
29
|
+
ClusterPageSteps.previewClusterConfig();
|
|
30
|
+
ClusterConfigurationSteps.getClusterConfig().should('be.visible');
|
|
31
|
+
ClusterConfigurationSteps.deleteCluster();
|
|
32
|
+
// Then I expect a confirmation dialog to appear
|
|
33
|
+
DeleteClusterDialogSteps.getDialog().should('be.visible');
|
|
34
|
+
// When I confirm
|
|
35
|
+
ClusterStubs.stubDeleteCluster();
|
|
36
|
+
ClusterStubs.stubNoClusterGroupStatus();
|
|
37
|
+
ClusterStubs.stubNoClusterNodeStatus();
|
|
38
|
+
DeleteClusterDialogSteps.confirmDeleteCluster();
|
|
39
|
+
// Then Cluster should be deleted
|
|
40
|
+
ClusterStubs.stubNoClusterConfig();
|
|
41
|
+
RemoteLocationStubs.stubRemoteLocationStatusNotCluster();
|
|
42
|
+
DeleteClusterDialogSteps.getDialog().should('not.exist');
|
|
43
|
+
ClusterPageSteps.getRemoveNodesButton().should('not.exist');
|
|
44
|
+
ClusterPageSteps.getAddNodesButton().should('not.exist');
|
|
45
|
+
ClusterPageSteps.getReplaceNodesButton().should('not.exist');
|
|
46
|
+
ClusterPageSteps.getPreviewClusterConfigButton().should('not.exist');
|
|
47
|
+
ClusterPageSteps.getCreateClusterButton().should('have.class', 'no-cluster');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('Should be able to edit cluster properties', () => {
|
|
51
|
+
// Given I have opened the cluster management page
|
|
52
|
+
ClusterPageSteps.visit();
|
|
53
|
+
// When I click on edit properties
|
|
54
|
+
ClusterPageSteps.previewClusterConfig();
|
|
55
|
+
ClusterConfigurationSteps.getClusterConfig().should('be.visible');
|
|
56
|
+
// When I press edit properties
|
|
57
|
+
ClusterConfigurationSteps.editProperties();
|
|
58
|
+
// Then I expect a modal to be shown
|
|
59
|
+
ClusterConfigurationSteps.getModal().should('be.visible');
|
|
60
|
+
// I can set values in form fields
|
|
61
|
+
ClusterConfigurationSteps.setFieldValue('electionMinTimeout', '5000');
|
|
62
|
+
ClusterConfigurationSteps.setFieldValue('electionRangeTimeout', '3000');
|
|
63
|
+
// Verify a field validation error appears if left empty
|
|
64
|
+
ClusterConfigurationSteps.getFieldByName('heartbeatInterval').clear();
|
|
65
|
+
ClusterConfigurationSteps.verifyFieldError('heartbeatInterval', 'This field is required');
|
|
66
|
+
// And Save button is disabled
|
|
67
|
+
ClusterConfigurationSteps.getSaveButton().should('be.disabled');
|
|
68
|
+
// Set value for required field to enable Save button
|
|
69
|
+
ClusterConfigurationSteps.setFieldValue('heartbeatInterval', '1500');
|
|
70
|
+
// And Save button is disabled
|
|
71
|
+
ClusterConfigurationSteps.getSaveButton().should('be.enabled');
|
|
72
|
+
ClusterConfigurationSteps.setFieldValue('messageSizeKB', '64');
|
|
73
|
+
ClusterConfigurationSteps.setFieldValue('verificationTimeout', '1200');
|
|
74
|
+
ClusterConfigurationSteps.setFieldValue('transactionLogMaximumSizeGB', '50');
|
|
75
|
+
ClusterConfigurationSteps.setFieldValue('batchUpdateInterval', '2000');
|
|
76
|
+
|
|
77
|
+
// Click Save button to submit
|
|
78
|
+
ClusterStubs.stubSaveClusterConfiguration();
|
|
79
|
+
ClusterConfigurationSteps.save();
|
|
80
|
+
const expectedRequestBody = {
|
|
81
|
+
electionMinTimeout: 5000,
|
|
82
|
+
electionRangeTimeout: 3000,
|
|
83
|
+
heartbeatInterval: 1500,
|
|
84
|
+
messageSizeKB: 64,
|
|
85
|
+
verificationTimeout: 1200,
|
|
86
|
+
transactionLogMaximumSizeGB: 50,
|
|
87
|
+
batchUpdateInterval: 2000
|
|
88
|
+
};
|
|
89
|
+
cy.wait('@save-cluster-properties').then((interception) => {
|
|
90
|
+
expect(interception.request.body).to.deep.equal(expectedRequestBody);
|
|
91
|
+
});
|
|
92
|
+
// And the modal is closed
|
|
93
|
+
ClusterConfigurationSteps.getModal().should('not.exist');
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {ClusterPageSteps} from "../../../steps/cluster/cluster-page-steps";
|
|
2
|
+
import {GlobalOperationsStatusesStub} from "../../../stubs/global-operations-statuses-stub";
|
|
3
|
+
import {ClusterStubs} from "../../../stubs/cluster/cluster-stubs";
|
|
4
|
+
import {RemoteLocationStubs} from "../../../stubs/cluster/remote-location-stubs";
|
|
5
|
+
import {ClusterConfigurationSteps} from "../../../steps/cluster/cluster-configuration-steps";
|
|
6
|
+
|
|
7
|
+
describe('Cluster configuration', () => {
|
|
8
|
+
|
|
9
|
+
let repositoryId;
|
|
10
|
+
beforeEach(() => {
|
|
11
|
+
repositoryId = 'cluster-repo' + Date.now();
|
|
12
|
+
GlobalOperationsStatusesStub.stubNoOperationsResponse(repositoryId);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('Should display cluster configuration', () => {
|
|
16
|
+
// Given there is an existing cluster created
|
|
17
|
+
ClusterStubs.stubClusterConfig();
|
|
18
|
+
ClusterStubs.stubClusterGroupStatus();
|
|
19
|
+
ClusterStubs.stubClusterNodeStatus();
|
|
20
|
+
RemoteLocationStubs.stubRemoteLocationFilter();
|
|
21
|
+
RemoteLocationStubs.stubRemoteLocationStatusInCluster();
|
|
22
|
+
// Given I have opened the cluster management page
|
|
23
|
+
ClusterPageSteps.visit();
|
|
24
|
+
// When I click on edit properties
|
|
25
|
+
ClusterPageSteps.previewClusterConfig();
|
|
26
|
+
// Then I should see cluster configuration with 3 tabs
|
|
27
|
+
ClusterConfigurationSteps.getClusterConfig().should('be.visible');
|
|
28
|
+
ClusterConfigurationSteps.getTabs().should('have.length', 3);
|
|
29
|
+
ClusterConfigurationSteps.getActiveTab().should('have.text', 'Properties');
|
|
30
|
+
ClusterConfigurationSteps.getClusterPropertiesTabContent().should('be.visible');
|
|
31
|
+
ClusterConfigurationSteps.selectTab(1);
|
|
32
|
+
ClusterConfigurationSteps.getActiveTab().should('have.text', 'Nodes');
|
|
33
|
+
ClusterConfigurationSteps.getClusterNodesTabContent().should('be.visible');
|
|
34
|
+
ClusterConfigurationSteps.selectTab(2);
|
|
35
|
+
ClusterConfigurationSteps.getActiveTab().should('have.text', 'Multi-region');
|
|
36
|
+
ClusterConfigurationSteps.getMultiRegionTabContent().should('be.visible');
|
|
37
|
+
});
|
|
38
|
+
});
|
|
@@ -16,7 +16,7 @@ describe('Create similarity index', () => {
|
|
|
16
16
|
let repositoryId;
|
|
17
17
|
|
|
18
18
|
beforeEach(() => {
|
|
19
|
-
|
|
19
|
+
repositoryId = 'similarity-index-create' + Date.now();
|
|
20
20
|
cy.createRepository({id: repositoryId});
|
|
21
21
|
cy.presetRepository(repositoryId);
|
|
22
22
|
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|
|
@@ -12,7 +12,7 @@ describe('Confirmations when try to change repository', () => {
|
|
|
12
12
|
let repositoryId;
|
|
13
13
|
|
|
14
14
|
beforeEach(() => {
|
|
15
|
-
|
|
15
|
+
repositoryId = 'similarity-index-' + Date.now();
|
|
16
16
|
cy.createRepository({id: repositoryId});
|
|
17
17
|
cy.presetRepository(repositoryId);
|
|
18
18
|
cy.importServerFile(repositoryId, FILE_TO_IMPORT);
|