Skip to content

Commit

Permalink
Include e2e tests for the unnamed cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
arbulu89 committed May 5, 2022
1 parent 1f7e6f3 commit 234c2b3
Show file tree
Hide file tree
Showing 3 changed files with 811 additions and 11 deletions.
21 changes: 10 additions & 11 deletions test/e2e/cypress/fixtures/clusters-overview/available_clusters.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const availableClusters = [
['04a81f89c847e82390e35bece2e25c9b', 'drbd_cluster'],
['238a4de1239aae2aa87433eed788b3ad', ' drbd_cluster'],
['a034a158905404befe08775682910ee1', ' drbd_cluster'],
['04b8f8c21f9fd8991224478e8c4362f8', 'hana_cluster_1'],
['4e905d706da85f5be14f85fa947c1e39', 'hana_cluster_2'],
['9c832998801e28cd70ad77380e82a5c0', 'hana_cluster_3'],
['057f083c3be591f4398eed816d4c8cd7', 'netweaver_cluster'],
['8bca366a6cb7816555538092a1ddd5aa', 'netweaver_cluster'],
['acf59e7a5338f76f55d5055af3273480', 'netweaver_cluster'],
['8a66f8fb-5fe9-51b3-a34c-24321271a4e3', 'drbd_cluster'],
['6bd7ec60-8cb1-5c6b-a892-29e1fd2f8380', 'drbd_cluster'],
['c7a1e943-bf46-590b-bd26-bfc7c78def97', 'drbd_cluster'],
['7965f822-0254-5858-abca-f6e8b4c27714', 'hana_cluster_1'],
['fa0d74a3-9240-5d9e-99fa-61c4137acf81', 'hana_cluster_2'],
['469e7be5-4e20-5007-b044-c6f540a87493', 'hana_cluster_3'],
['5284f376-c1f4-5178-8966-d490df3dab4f', 'netweaver_cluster'],
['fb861bce-d212-56b5-8786-74afd6eb58cb', 'netweaver_cluster'],
['0eac831a-aa66-5f45-89a4-007fbd2c5714', 'netweaver_cluster'],
];

export const allClusterNames = () =>
availableClusters.map(([_, clusterName]) => clusterName);
export const allClusterIds = () =>
Expand All @@ -18,4 +18,3 @@ const availableClusters = [
availableClusters.find(([, name]) => name === clusterName)[0];
export const clusterNameById = (clusterId) =>
availableClusters.find(([id]) => id === clusterId)[1];

11 changes: 11 additions & 0 deletions test/e2e/cypress/integration/clusters_overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,16 @@ import {
});
});
});
describe('Unnamed cluster', () => {
before(() => {
cy.loadScenario('cluster-unnamed');
});

it('Unnamed clusters should use the ID as details page link', () => {
const clusterID = clusterIdByName('hana_cluster_1')
const truncatedLength = 14;
cy.get(`a:contains(${clusterID.slice(0, truncatedLength)})`).should('be.visible')
});
});
});
});

0 comments on commit 234c2b3

Please sign in to comment.