From 0472967d64313ee977b059786fbe48ec92bcc5a6 Mon Sep 17 00:00:00 2001
From: Anna Manukyan
Date: Sun, 21 May 2023 06:33:37 +0200
Subject: [PATCH] XSite Repl test environment is configured and new tests are
added.
---
cypress.config.ts | 4 +
cypress/e2e/xsite.cy.js | 267 ++++++++++++++++++
package.json | 5 +-
run-xsite-tests.sh | 27 ++
scripts/docker-compose/create-xsite-data.sh | 21 ++
scripts/docker-compose/docker-compose.yaml | 62 ++++
scripts/docker-compose/ispn-lon.xml | 6 +
scripts/docker-compose/ispn-nyc.xml | 3 +
scripts/infinispan-basic-auth-xsite.xml | 88 ++++++
.../BackupsCofigurationTuning.tsx | 5 +-
.../BackupsSiteConfigurator.tsx | 26 +-
.../Features/BackupsCacheConfigurator.tsx | 5 +-
src/app/Caches/DetailCache.tsx | 4 +-
src/app/XSite/StateTransfer.tsx | 4 +-
src/app/XSite/XSiteCache.tsx | 13 +-
15 files changed, 518 insertions(+), 22 deletions(-)
create mode 100644 cypress/e2e/xsite.cy.js
create mode 100755 run-xsite-tests.sh
create mode 100755 scripts/docker-compose/create-xsite-data.sh
create mode 100644 scripts/docker-compose/docker-compose.yaml
create mode 100644 scripts/docker-compose/ispn-lon.xml
create mode 100644 scripts/docker-compose/ispn-nyc.xml
create mode 100644 scripts/infinispan-basic-auth-xsite.xml
diff --git a/cypress.config.ts b/cypress.config.ts
index 95932200e..60a657a6d 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -21,5 +21,9 @@ export default defineConfig({
return require('./cypress/plugins/index.js')(on, config)
},
baseUrl: 'http://localhost:11222/console/',
+ experimentalSessionAndOrigin: true,
+ excludeSpecPattern: [
+ 'cypress/e2e/xsite.cy.js'
+ ]
},
})
diff --git a/cypress/e2e/xsite.cy.js b/cypress/e2e/xsite.cy.js
new file mode 100644
index 000000000..0b77aecce
--- /dev/null
+++ b/cypress/e2e/xsite.cy.js
@@ -0,0 +1,267 @@
+describe('XSite Config Tests', () => {
+ beforeEach(() => {
+ cy.login(Cypress.env('username'), Cypress.env('password'));
+ });
+
+ it('successfully creates cache with backup', () => {
+ cy.contains("Site: LON");
+
+ //Going to create cache page
+ cy.get('[data-cy=createCacheButton]').click();
+ cy.get('#cache-name').click();
+ cy.get('#cache-name').type('xsite-cache');
+ cy.get('#configure').click();
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.get('#sync').click();
+ cy.get('[data-cy=wizardNextButton]').click();
+
+ //Filling backup cache properties
+ cy.get('#featuresSelect-select-multi-typeahead-typeahead').click().type('backup');
+ cy.get('#BACKUPS > button').click();
+ cy.contains("Backups for LON");
+ cy.get('button#backup-selector').click();
+ cy.get('#NYC').click();
+ cy.get("#sync-0").click();
+ cy.get("#backupfor").click({force: true});
+ cy.get("[data-cy=remote-cache-input]").type("xsite-backup");
+ cy.get('#remote-site-selector').click();
+ cy.get("#NYC").click();
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.contains("Adjust settings for cache backups");
+ //Filling backup cache tuning properties
+ cy.get("[data-cy=merge-policy-input]").type("DEFAULT");
+ cy.get("[data-cy=max-cleanup-delay-input]").type("3000");
+ cy.get("[data-cy=tombstone-map-size-input]").type("5120");
+ cy.get("[id^=form-field-group-toggle]").click();
+ cy.get("#twoPhaseCommit").click({force: true});
+ cy.get("[id^=failurePolicySelector]").click();
+ cy.get("[data-cy=failurePolicyTimeoutInput]").type(10000);
+ cy.get('[data-cy="afterFailuresInput"]').type(10);
+ cy.get('[data-cy="minWaitInput"]').type(50000);
+ cy.get('[data-cy="manual-radio"]').click();
+ cy.get('[data-cy="chunckSizeInput"]').type(256);
+ cy.get('[data-cy="stateTransferTimeoutInput"]').type(60000);
+ cy.get('[data-cy="maxRetriesInput"]').type(25);
+ cy.get('[data-cy="waitTimeInput"]').type(1000);
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.get('[data-cy=wizardNextButton]').click(); //Saving the cache
+ cy.get('[data-cy="detailButton-xsite-cache"]').click();
+ cy.contains('The cache is empty');
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains('Take offline');
+ cy.origin('http://localhost:31222/console/', () => {
+ cy.visit("/", {
+ headers: {
+ 'Accept-Encoding': 'gzip, deflate, br'
+ },
+ auth: {
+ username: Cypress.env('username'),
+ password: Cypress.env('password')
+ }
+ });
+ cy.contains("Site: NYC");
+ cy.contains("xsiteCache");
+ //Going to create cache page
+ cy.get('[data-cy=createCacheButton]').click();
+ cy.get('#cache-name').click();
+ cy.get('#cache-name').type('xsite-backup');
+ cy.get('#configure').click();
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.get('#async').click();
+ cy.get('[data-cy=wizardNextButton]').click();
+
+ //Filling backup cache properties
+ cy.get('#featuresSelect-select-multi-typeahead-typeahead').click().type('backup');
+ cy.get('#BACKUPS > button').click();
+ cy.contains("Backups for NYC");
+ cy.get('button#backup-selector').click();
+ cy.get('#LON').click();
+ cy.get("#async-0").click();
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.get('[data-cy=wizardNextButton]').click();
+ cy.get('[data-cy=wizardNextButton]').click(); //Saving cache
+ cy.get('[data-cy="detailButton-xsite-backup"]').click();
+ cy.contains("Backups");
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains("Backups management");
+ cy.contains("LON");
+ cy.contains("Take offline");
+ //Going back to cache details page
+ cy.get("[data-cy=backToCacheDetailsButton]").click();
+
+ //Adding new entry
+ cy.get('[data-cy=addEntryButton]').click();
+ cy.get('#key-entry').click().type('key1');
+ cy.get('#value-entry').click().type('value1');
+ cy.get('[data-cy=addButton]').click();
+ cy.contains('Entry added to cache xsite-backup.');
+ cy.contains('key1');
+ cy.contains('value1');
+ })
+ });
+
+ it('successfully shows the site name on data container page', () => {
+ cy.contains("Site: LON");
+ cy.contains("xsiteCache");
+ cy.contains("xsite-cache");
+
+ //Verifying that entries entered in previous test were successfully synced
+ cy.get('[data-cy="detailButton-xsite-cache"]').click();
+ cy.contains('key1');
+ cy.contains('value1');
+
+ cy.get("#nav-toggle").click();
+ cy.contains("Cluster Membership").click();
+ cy.contains("2 members in use");
+
+ cy.origin('http://localhost:31222/console/', () => {
+ cy.visit("/", {
+ headers: {
+ 'Accept-Encoding': 'gzip, deflate, br'
+ },
+ auth: {
+ username: Cypress.env('username'),
+ password: Cypress.env('password')
+ }
+ });
+ cy.contains("Site: NYC");
+ cy.contains("xsiteCache");
+ cy.get("#nav-toggle").click();
+ cy.contains("Cluster Membership").click();
+ cy.contains("2 members in use");
+ })
+ });
+
+ it('successfully views the Manage Backup pages.', () => {
+ cy.contains("Site: LON");
+ cy.contains("xsiteCache").click();
+ cy.contains("Backups");
+ cy.contains('1 - 5 of 5');
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains("Backups management");
+ cy.contains("NYC");
+ cy.contains("Take offline");
+ cy.get("[data-cy=NYC-startTransfer]").should("exist");
+
+ cy.origin('http://localhost:31222/console/', () => {
+ cy.visit("/", {
+ headers: {
+ 'Accept-Encoding': 'gzip, deflate, br'
+ },
+ auth: {
+ username: Cypress.env('username'),
+ password: Cypress.env('password')
+ }
+ });
+ cy.contains("Site: NYC");
+ cy.contains("xsiteCache").click();
+ cy.contains('1 - 5 of 5');
+ cy.contains("Backups").should('not.exist');
+ cy.get("[data-cy=manageBackupsLink]").should('not.exist');
+ })
+ });
+
+ it('successfully takes offline the backup, adds/deletes/updates data and verifies that backup doesn\'t contain all changes', () => {
+ cy.contains("xsiteCache").click();
+ //Going to manage Backups page and taking the backup site offline
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains("Take offline");
+ cy.get("#NYC-switch").click({force: true});
+ cy.contains("Operation take offline on site NYC has started.");
+ cy.contains("Bring online");
+
+ //Going back to cache details page
+ cy.get("[data-cy=backToCacheDetailsButton]").click();
+
+ //Editing entry
+ cy.get('[data-cy=actions-key3]').click();
+ cy.get("[data-cy=editEntryAction]").click();
+ cy.get("#value-entry").type("1");
+ cy.get("[data-cy=addButton]").click();
+ cy.contains("value31");
+
+ //Deleting entry
+ cy.get("[data-cy=actions-key5]").click();
+ cy.get("[data-cy=deleteEntryAction]").click();
+ cy.get("[data-cy=deleteEntryButton]").click();
+
+ //Adding new entry
+ cy.get('[data-cy=addEntryButton]').click();
+ cy.get('#key-entry').click().type('stringKey');
+ cy.get('#value-entry').click().type('stringValue');
+ cy.get('[data-cy=addButton]').click();
+ cy.contains('Entry added to cache xsiteCache.');
+ cy.get('.pf-c-alert__action > .pf-c-button').click(); //Closing alert popup.
+ cy.contains('stringKey');
+ cy.contains('stringValue');
+
+ //Verifying that as the backup site is taken offline neither of the changes is visible on the backup site.
+ cy.origin('http://localhost:31222/console/', () => {
+ cy.visit("/", {
+ headers: {
+ 'Accept-Encoding': 'gzip, deflate, br'
+ },
+ auth: {
+ username: Cypress.env('username'),
+ password: Cypress.env('password')
+ }
+ });
+ cy.contains("Site: NYC");
+ cy.contains("xsiteCache").click();
+ cy.contains('1 - 5 of 5');
+ cy.contains("stringKey").should("not.exist");
+ cy.contains("key5");
+ cy.contains("value31").should("not.exist");
+ });
+ });
+
+ it('successfully brings online the backup, performs the state transfer and verifies that changes appeared on backup site', () => {
+ cy.contains("xsiteCache").click();
+ //Going to manage Backups page and bringing the backup site online
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains("Bring online");
+ cy.get("#NYC-switch").click({force: true});
+ cy.contains("Operation bring online on site NYC has started.");
+ cy.contains("Take offline");
+
+ //Starting state transfer
+ cy.get("[data-cy=NYC-startTransfer]").click();
+ cy.get("[data-cy=startTransferButton]").click();
+ cy.contains("Operation state transfer on site NYC has started.");
+ cy.contains("Transfer Ok");
+ cy.contains("Clear state"); //NYC-clearStateButton
+
+ //Verifying that as the backup site is taken offline neither of the changes is visible on the backup site.
+ cy.origin('http://localhost:31222/console/', () => {
+ cy.visit("/", {
+ headers: {
+ 'Accept-Encoding': 'gzip, deflate, br'
+ },
+ auth: {
+ username: Cypress.env('username'),
+ password: Cypress.env('password')
+ }
+ });
+ cy.contains("Site: NYC");
+ cy.contains("xsiteCache").click();
+ cy.contains('1 - 6 of 6');
+ cy.contains("stringKey");
+ cy.contains("key5"); //The key5 should still be there as the state transfer doesn't include the entry deletions;
+ cy.contains("value31");
+ });
+ });
+
+ it('successfully clears state', () => {
+ cy.contains("xsiteCache").click();
+ //Going to manage Backups page and bringing the backup site online
+ cy.get("[data-cy=manageBackupsLink]").click();
+ cy.contains("Take offline");
+ cy.contains("Transfer Ok");
+ cy.get("[data-cy=NYC-clearStateButton]").click();
+ cy.contains("Operation clear state transfer state on site NYC has started.");
+ cy.contains("Transfer Ok").should("not.exist");
+ cy.contains("Clear state").should("not.exist");
+ cy.contains("Start transfer");
+ });
+});
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 6f52bf169..3dbd7d78f 100644
--- a/package.json
+++ b/package.json
@@ -20,8 +20,9 @@
"bundle-profile:analyze": "npm run build:bundle-profile && webpack-bundle-analyzer ./stats.json",
"clean": "rimraf dist",
"deploy-console-to-server": "cp -r ./dist/* ./server/infinispan-server/static/console",
- "cy:run": "cypress run --headless",
- "cy:e2e": "cypress open"
+ "cy:run": "cypress run --headless --spec 'cypress/e2e/!(xsite.cy.js)'",
+ "cy:e2e": "cypress open",
+ "cy:run-xsite": "cypress run --headless --spec 'cypress/e2e/xsite.cy.js'"
},
"prettier": {
"parser": "typescript",
diff --git a/run-xsite-tests.sh b/run-xsite-tests.sh
new file mode 100755
index 000000000..d61507ecc
--- /dev/null
+++ b/run-xsite-tests.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+set -e
+
+echo "Building console."
+npm run build
+
+echo "Starting docker containers"
+cd scripts/docker-compose
+docker-compose up &
+
+# Wait for server to startup
+curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null
+curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:31222/rest/v2/cache-managers/default/health/status > /dev/null
+
+echo "Servers are ready."
+
+echo "Creating data on the Server."
+./create-xsite-data.sh
+
+trap 'docker-compose down' EXIT
+
+echo "Starting to run the tests."
+
+npm run cy:run-xsite
+
+echo "Test execution finished."
\ No newline at end of file
diff --git a/scripts/docker-compose/create-xsite-data.sh b/scripts/docker-compose/create-xsite-data.sh
new file mode 100755
index 000000000..df7392ffc
--- /dev/null
+++ b/scripts/docker-compose/create-xsite-data.sh
@@ -0,0 +1,21 @@
+echo "= Init create data"
+echo "= Clear all data"
+curl -XDELETE --BASIC -u admin:password http://localhost:11222/rest/v2/caches/xsiteCache
+curl -XDELETE --BASIC -u admin:password http://localhost:31222/rest/v2/caches/xsiteCache
+
+echo "= Create X-Site Cache"
+curl -XPOST --BASIC -u admin:password -H "Content-Type: application/xml" -d "@ispn-lon.xml" http://localhost:11222/rest/v2/caches/xsiteCache
+curl -XPOST --BASIC -u admin:password -H "Content-Type: application/xml" -d "@ispn-nyc.xml" http://localhost:31222/rest/v2/caches/xsiteCache
+
+echo "= Put 5 entries in XSite cache"
+for i in {1..5}
+do
+ URL='http://localhost:11222/rest/v2/caches/xsiteCache/key'$i
+ DATA='{
+ "_type": "string",
+ "_value": "value'$i'"
+ }'
+ curl -XPOST --BASIC -u admin:password -d "$DATA" -H 'Content-Type: application/json' $URL
+done
+
+echo "= End"
\ No newline at end of file
diff --git a/scripts/docker-compose/docker-compose.yaml b/scripts/docker-compose/docker-compose.yaml
new file mode 100644
index 000000000..da22d0c0c
--- /dev/null
+++ b/scripts/docker-compose/docker-compose.yaml
@@ -0,0 +1,62 @@
+version: '3'
+
+networks:
+ mynetwork:
+ driver: bridge
+services:
+ infinispan-server-lon-1:
+ image: quay.io/infinispan/server:15.0
+ ports:
+ - "11222:11222"
+ container_name: ispn-lon-1
+ environment:
+ USER: admin
+ PASS: password
+ networks:
+ - mynetwork
+ volumes:
+ - ../infinispan-basic-auth-xsite.xml:/opt/infinispan/server/conf/infinispan-xsite-basic.xml
+ - ../../dist:/opt/infinispan/static/console
+ command: -c infinispan-xsite-basic.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656 -n lon-1
+ infinispan-server-lon-2:
+ image: quay.io/infinispan/server:15.0
+ ports:
+ - "11221:11222"
+ container_name: ispn-lon-2
+ environment:
+ USER: admin
+ PASS: password
+ networks:
+ - mynetwork
+ volumes:
+ - ../infinispan-basic-auth-xsite.xml:/opt/infinispan/server/conf/infinispan-xsite-basic.xml
+ - ../../dist:/opt/infinispan/static/console
+ command: -c infinispan-xsite-basic.xml -Dinfinispan.site.name=LON -Djgroups.mcast_port=46656 -n lon-2
+ infinispan-server-nyc-1:
+ image: quay.io/infinispan/server:15.0
+ ports:
+ - "31222:11222"
+ container_name: ispn-nyc-1
+ environment:
+ USER: admin
+ PASS: password
+ networks:
+ - mynetwork
+ volumes:
+ - ../infinispan-basic-auth-xsite.xml:/opt/infinispan/server/conf/infinispan-xsite-basic.xml
+ - ../../dist:/opt/infinispan/static/console
+ command: -c infinispan-xsite-basic.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666 -n nyc-1
+ infinispan-server-nyc-2:
+ image: quay.io/infinispan/server:15.0
+ ports:
+ - "31223:11222"
+ container_name: ispn-nyc-2
+ environment:
+ USER: admin
+ PASS: password
+ networks:
+ - mynetwork
+ volumes:
+ - ../infinispan-basic-auth-xsite.xml:/opt/infinispan/server/conf/infinispan-xsite-basic.xml
+ - ../../dist:/opt/infinispan/static/console
+ command: -c infinispan-xsite-basic.xml -Dinfinispan.site.name=NYC -Djgroups.mcast_port=46666 -n nyc-2
\ No newline at end of file
diff --git a/scripts/docker-compose/ispn-lon.xml b/scripts/docker-compose/ispn-lon.xml
new file mode 100644
index 000000000..ca9141668
--- /dev/null
+++ b/scripts/docker-compose/ispn-lon.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/scripts/docker-compose/ispn-nyc.xml b/scripts/docker-compose/ispn-nyc.xml
new file mode 100644
index 000000000..17e6c1647
--- /dev/null
+++ b/scripts/docker-compose/ispn-nyc.xml
@@ -0,0 +1,3 @@
+
+
+
\ No newline at end of file
diff --git a/scripts/infinispan-basic-auth-xsite.xml b/scripts/infinispan-basic-auth-xsite.xml
new file mode 100644
index 000000000..5756dc6e9
--- /dev/null
+++ b/scripts/infinispan-basic-auth-xsite.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/app/Caches/Create/AdvancedTuning/BackupsCofigurationTuning.tsx b/src/app/Caches/Create/AdvancedTuning/BackupsCofigurationTuning.tsx
index d285d0f6f..329a09ae3 100644
--- a/src/app/Caches/Create/AdvancedTuning/BackupsCofigurationTuning.tsx
+++ b/src/app/Caches/Create/AdvancedTuning/BackupsCofigurationTuning.tsx
@@ -71,6 +71,7 @@ const BackupsConfigurationTuning = () => {
val === '' ? setMergePolicy(undefined!) : setMergePolicy(val);
}}
aria-label="merge-policy-input"
+ data-cy="merge-policy-input"
/>
@@ -93,6 +94,7 @@ const BackupsConfigurationTuning = () => {
isNaN(parseInt(val)) ? setMaxCleanupDelay(undefined!) : setMaxCleanupDelay(parseInt(val));
}}
aria-label="max-cleanup-delay-input"
+ data-cy="max-cleanup-delay-input"
/>
@@ -115,6 +117,7 @@ const BackupsConfigurationTuning = () => {
isNaN(parseInt(val)) ? setTombstoneMapSize(undefined!) : setTombstoneMapSize(parseInt(val));
}}
aria-label="tombstone-map-size-input"
+ data-cy="tombstone-map-size-input"
/>
@@ -132,7 +135,7 @@ const BackupsConfigurationTuning = () => {
{configuration.feature.backupsCache &&
configuration.feature.backupsCache.sites.map((site, index) => {
return (
- }
>
diff --git a/src/app/Caches/Create/AdvancedTuning/BackupsSiteConfigurator.tsx b/src/app/Caches/Create/AdvancedTuning/BackupsSiteConfigurator.tsx
index 31509dfd4..471cc03ee 100644
--- a/src/app/Caches/Create/AdvancedTuning/BackupsSiteConfigurator.tsx
+++ b/src/app/Caches/Create/AdvancedTuning/BackupsSiteConfigurator.tsx
@@ -102,11 +102,11 @@ const BackupSiteConfigurator = (props: {
@@ -115,7 +115,8 @@ const BackupSiteConfigurator = (props: {
{
isNaN(parseInt(e)) ? setAfterFailures(undefined!) : setAfterFailures(parseInt(e));
@@ -137,6 +138,7 @@ const BackupSiteConfigurator = (props: {
placeholder="0"
type="number"
id="minwait"
+ data-cy="minWaitInput"
value={minWait}
onChange={(e) => {
isNaN(parseInt(e)) ? setMinWait(undefined!) : setMinWait(parseInt(e));
@@ -174,6 +176,7 @@ const BackupSiteConfigurator = (props: {
setMode(BackupSiteStateTransferMode.MANUAL)}
isChecked={(mode as BackupSiteStateTransferMode) == BackupSiteStateTransferMode.MANUAL}
label={t('caches.create.configurations.feature.mode-manual')}
@@ -181,6 +184,7 @@ const BackupSiteConfigurator = (props: {
setMode(BackupSiteStateTransferMode.AUTO)}
isChecked={(mode as BackupSiteStateTransferMode) == BackupSiteStateTransferMode.AUTO}
label={t('caches.create.configurations.feature.mode-auto')}
@@ -203,6 +207,7 @@ const BackupSiteConfigurator = (props: {
placeholder="512"
type="number"
id="chuncksize"
+ data-cy="chunckSizeInput"
value={chunckSize}
onChange={(e) => {
isNaN(parseInt(e)) ? setChunckSize(undefined!) : setChunckSize(parseInt(e));
@@ -225,7 +230,8 @@ const BackupSiteConfigurator = (props: {
{
isNaN(parseInt(e)) ? setTimeoutStateTransfer(undefined!) : setTimeoutStateTransfer(parseInt(e));
@@ -249,6 +255,7 @@ const BackupSiteConfigurator = (props: {
placeholder="30"
type="number"
id="maxretries"
+ data-cy="maxRetriesInput"
value={maxRetries}
onChange={(e) => {
isNaN(parseInt(e)) ? setMaxRetries(undefined!) : setMaxRetries(parseInt(e));
@@ -272,6 +279,7 @@ const BackupSiteConfigurator = (props: {
placeholder="2000"
type="number"
id="waittime"
+ data-cy="waitTimeInput"
value={waitTime}
onChange={(e) => {
isNaN(parseInt(e)) ? setWaitTime(undefined!) : setWaitTime(parseInt(e));
@@ -286,7 +294,7 @@ const BackupSiteConfigurator = (props: {
// Options for Failure Policy
const failurePolicyOptions = () => {
return Object.keys(BackupSiteFailurePolicy).map((key) => (
-
+
));
};
@@ -339,16 +347,17 @@ const BackupSiteConfigurator = (props: {
value={failurePolicy}
aria-label="Failure Policy"
aria-describedby="failurePolicy-helper"
+ toggleId='failurePolicySelector'
>
{failurePolicyOptions()}
@@ -357,7 +366,8 @@ const BackupSiteConfigurator = (props: {
{
isNaN(parseInt(e)) ? setTimeout(undefined!) : setTimeout(parseInt(e));
diff --git a/src/app/Caches/Create/Features/BackupsCacheConfigurator.tsx b/src/app/Caches/Create/Features/BackupsCacheConfigurator.tsx
index c5323aef5..fb9dc33c4 100644
--- a/src/app/Caches/Create/Features/BackupsCacheConfigurator.tsx
+++ b/src/app/Caches/Create/Features/BackupsCacheConfigurator.tsx
@@ -113,7 +113,7 @@ const BackupsCacheConfigurator = (props: { isEnabled: boolean }) => {
};
const sitesOptions = () => {
- return availableSites.map((role) => );
+ return availableSites.map((role) => );
};
const clearSelection = () => {
@@ -154,6 +154,7 @@ const BackupsCacheConfigurator = (props: { isEnabled: boolean }) => {
validated={sites.length == 0 ? 'error' : 'success'}
placeholderText={t('caches.create.configurations.feature.select-sites')}
noResultsFoundText={t('caches.create.configurations.feature.select-sites-not-found')}
+ toggleId="backup-selector"
>
{sitesOptions()}
@@ -235,6 +236,7 @@ const BackupsCacheConfigurator = (props: { isEnabled: boolean }) => {
validateBackupsForField(trimmedVal);
}}
aria-label="remote-cache-input"
+ data-cy="remote-cache-input"
/>
{
isOpen={isOpenRemoteSite}
aria-labelledby="toggle-id-remote-site"
placeholderText="Select remote site"
+ toggleId='remote-site-selector'
>
{sitesOptions()}
diff --git a/src/app/Caches/DetailCache.tsx b/src/app/Caches/DetailCache.tsx
index 0ed37342a..6c204d94c 100644
--- a/src/app/Caches/DetailCache.tsx
+++ b/src/app/Caches/DetailCache.tsx
@@ -209,11 +209,11 @@ const DetailCache = (props: { cacheName: string }) => {
-
+
- props.closeModal(false)}
aria-label="State transfer modal"
actions={[
- ,
-
]}
diff --git a/src/app/XSite/XSiteCache.tsx b/src/app/XSite/XSiteCache.tsx
index e656b5e3c..711c11cc0 100644
--- a/src/app/XSite/XSiteCache.tsx
+++ b/src/app/XSite/XSiteCache.tsx
@@ -221,7 +221,7 @@ const XSiteCache = (props) => {
if (stStatus == ST_SENDING) {
return (
-
);
}
return (
-
+
@@ -347,7 +348,7 @@ const XSiteCache = (props) => {
-