From 245751a3952c21d3b8b8b05b49aebe1a99da6a6f Mon Sep 17 00:00:00 2001 From: Fabrizio Sestito Date: Fri, 23 Sep 2022 17:43:39 +0200 Subject: [PATCH] Add acceptance test --- .photofinish.toml | 114 ++++++++++++++---- .../integration/hana_cluster_details.js | 28 +++++ 2 files changed, 117 insertions(+), 25 deletions(-) diff --git a/.photofinish.toml b/.photofinish.toml index 6ca79f80ea..5b448b36ad 100644 --- a/.photofinish.toml +++ b/.photofinish.toml @@ -12,100 +12,164 @@ directories = ["./test/fixtures/scenarios/gcp-landscape"] [sap-system-detail-GRAY] -files = ["./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GRAY.json"] +files = [ + "./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GRAY.json", +] [sap-system-detail-GREEN] -files = ["./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GREEN.json"] +files = [ + "./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_GREEN.json", +] [sap-system-detail-YELLOW] -files = ["./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_YELLOW.json"] +files = [ + "./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_YELLOW.json", +] [sap-system-detail-RED] -files = ["./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_RED.json"] +files = [ + "./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_RED.json", +] [sap-system-detail-NEW] -files = ["./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_new.json"] +files = [ + "./test/fixtures/scenarios/sap-system-details/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_new.json", +] [hana-database-detail-GRAY] -files = ["./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json"] +files = [ + "./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GRAY.json", +] [hana-database-detail-GREEN] -files = ["./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json"] +files = [ + "./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_GREEN.json", +] [hana-database-detail-YELLOW] -files = ["./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json"] +files = [ + "./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_YELLOW.json", +] [hana-database-detail-RED] -files = ["./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json"] +files = [ + "./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_RED.json", +] [hana-database-detail-NEW] -files = ["./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_new.json"] +files = [ + "./test/fixtures/scenarios/hana-database-details/0a055c90-4cb6-54ce-ac9c-ae3fedaf40d4_sap_system_discovery_new.json", +] [sap-systems-overview-GRAY] -files = ["./test/fixtures/scenarios/sap-systems-overview/7269ee51-5007-5849-aaa7-7c4a98b0c9ce_sap_system_discovery_GRAY.json"] +files = [ + "./test/fixtures/scenarios/sap-systems-overview/7269ee51-5007-5849-aaa7-7c4a98b0c9ce_sap_system_discovery_GRAY.json", +] [sap-systems-overview-YELLOW] -files = ["./test/fixtures/scenarios/sap-systems-overview/9a3ec76a-dd4f-5013-9cf0-5eb4cf89898f_sap_system_discovery_YELLOW.json"] +files = [ + "./test/fixtures/scenarios/sap-systems-overview/9a3ec76a-dd4f-5013-9cf0-5eb4cf89898f_sap_system_discovery_YELLOW.json", +] [sap-systems-overview-RED] -files = ["./test/fixtures/scenarios/sap-systems-overview/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_RED.json"] +files = [ + "./test/fixtures/scenarios/sap-systems-overview/1b0e9297-97dd-55d6-9874-8efde4d84c90_sap_system_discovery_RED.json", +] [sap-systems-overview-hana-RED] -files = ["./test/fixtures/scenarios/sap-systems-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_sap_system_discovery_RED.json"] +files = [ + "./test/fixtures/scenarios/sap-systems-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_sap_system_discovery_RED.json", +] [sap-systems-overview-DAA] -files = ["./test/fixtures/scenarios/sap-systems-overview/2ace860d-38e9-55f4-b051-faf4336e71d6_sap_system_discovery_DAA.json"] +files = [ + "./test/fixtures/scenarios/sap-systems-overview/2ace860d-38e9-55f4-b051-faf4336e71d6_sap_system_discovery_DAA.json", +] [cluster-4-SOK] -files = ["./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_4_SOK.json"] +files = [ + "./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_4_SOK.json", +] [cluster-1-SOK] -files = ["./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_1_SOK.json"] +files = [ + "./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_1_SOK.json", +] [cluster-4-SFAIL] -files = ["./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_4_SFAIL.json"] +files = [ + "./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_4_SFAIL.json", +] [cluster-1-SFAIL] -files = ["./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_1_SFAIL.json"] +files = [ + "./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_1_SFAIL.json", +] [cluster-unnamed] -files = ["./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_unnamed.json"] +files = [ + "./test/fixtures/scenarios/clusters-overview/13e8c25c-3180-5a9a-95c8-51ec38e50cfc_ha_cluster_discovery_unnamed.json", +] [cluster-unknown-provider] -files = ["./test/fixtures/scenarios/hana-cluster-details/b767b3e9-e802-587e-a442-541d093b86b9_ha_cluster_discovery_unknown_provider.json"] +files = [ + "./test/fixtures/scenarios/hana-cluster-details/b767b3e9-e802-587e-a442-541d093b86b9_ha_cluster_discovery_unknown_provider.json", +] + + +[cluster-kvm-provider] + +files = [ + "./test/fixtures/scenarios/hana-cluster-details/b767b3e9-e802-587e-a442-541d093b86b9_ha_cluster_discovery_kvm_provider.json", +] + + +[cluster-nutanix-provider] + +files = [ + "./test/fixtures/scenarios/hana-cluster-details/b767b3e9-e802-587e-a442-541d093b86b9_ha_cluster_discovery_nutanix_provider.json", +] [host-details-azure] -files = ["./test/fixtures/scenarios/healthy-27-node-SAP-cluster/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery.json"] +files = [ + "./test/fixtures/scenarios/healthy-27-node-SAP-cluster/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery.json", +] [host-details-aws] -files = ["./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_aws.json"] +files = [ + "./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_aws.json", +] [host-details-gcp] -files = ["./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_gcp.json"] +files = [ + "./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_gcp.json", +] [host-details-unknown] -files = ["./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_unknown.json"] \ No newline at end of file +files = [ + "./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_unknown.json", +] diff --git a/test/e2e/cypress/integration/hana_cluster_details.js b/test/e2e/cypress/integration/hana_cluster_details.js index cda49e47c5..06dd16212a 100644 --- a/test/e2e/cypress/integration/hana_cluster_details.js +++ b/test/e2e/cypress/integration/hana_cluster_details.js @@ -1,5 +1,7 @@ import { availableHanaCluster } from '../fixtures/hana-cluster-details/available_hana_cluster'; +import { checkDataByProvider } from '../fixtures/checks-catalog/available_checks'; + context('HANA database details', () => { before(() => { cy.visit(`/clusters/${availableHanaCluster.id}`); @@ -168,4 +170,30 @@ context('HANA database details', () => { ); }); }); + + describe('Cluster with kvm provider', () => { + before(() => { + cy.loadScenario('cluster-kvm-provider'); + cy.visit(`/clusters/${availableHanaCluster.id}`); + }); + + it(`should show the default catalog`, () => { + cy.contains('button', 'Settings').click(); + cy.contains('Corosync').click(); + cy.get('li').first().contains(checkDataByProvider.get('default')); + }); + }); + + describe('Cluster with nutanix provider', () => { + before(() => { + cy.loadScenario('cluster-nutanix-provider'); + cy.visit(`/clusters/${availableHanaCluster.id}`); + }); + + it(`should show the default catalog`, () => { + cy.contains('button', 'Settings').click(); + cy.contains('Corosync').click(); + cy.get('li').first().contains(checkDataByProvider.get('default')); + }); + }); });