Skip to content

Commit

Permalink
Add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziosestito committed Sep 23, 2022
1 parent fae88ed commit 245751a
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 25 deletions.
114 changes: 89 additions & 25 deletions .photofinish.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
files = [
"./test/fixtures/scenarios/host-details/9cd46919-5f19-59aa-993e-cf3736c71053_cloud_discovery_unknown.json",
]
28 changes: 28 additions & 0 deletions test/e2e/cypress/integration/hana_cluster_details.js
Original file line number Diff line number Diff line change
@@ -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}`);
Expand Down Expand Up @@ -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'));
});
});
});

0 comments on commit 245751a

Please sign in to comment.