mirror of
https://github.com/bitnami/charts.git
synced 2026-03-16 06:47:30 +08:00
[bitnami/kibana] Kibana Helm Chart Test improvement (#10057)
* Added antiflake pipeline Signed-off-by: alukic <alukic@vmware.com> * Diversified the pipeline Signed-off-by: alukic <alukic@vmware.com> * Make a change to trigger TKG Signed-off-by: alukic <alukic@vmware.com> * Replaced FIPS with normal AKS Signed-off-by: alukic <alukic@vmware.com> * Added improvements to Kibana tests Signed-off-by: alukic <alukic@vmware.com> * Removed local file Signed-off-by: alukic <alukic@vmware.com> * Trigger VIB for Kibana Signed-off-by: alukic <alukic@vmware.com> * Added a debug line to see what is going on Signed-off-by: alukic <alukic@vmware.com> * Added a check for 'not ready yet' test Signed-off-by: alukic <alukic@vmware.com> * Fixed a mistake Signed-off-by: alukic <alukic@vmware.com> * Remove the readiness test Signed-off-by: alukic <alukic@vmware.com> * Fix a mistake Signed-off-by: alukic <alukic@vmware.com> * Removed debugging code Signed-off-by: alukic <alukic@vmware.com> * Made improvements Signed-off-by: alukic <alukic@vmware.com> * Remove antiflake pipeline Signed-off-by: alukic <alukic@vmware.com> * Removed extra files Signed-off-by: alukic <alukic@vmware.com> * Renamed the file Signed-off-by: alukic <alukic@vmware.com> * Update file name Signed-off-by: alukic <alukic@vmware.com> * Applied CR suggestion with consensus Signed-off-by: alukic <alukic@vmware.com> * Removed unneeded file Signed-off-by: alukic <alukic@vmware.com> * Trigger VIB Signed-off-by: alukic <alukic@vmware.com> * Workpad test file removed Signed-off-by: alukic <alukic@vmware.com> * Removed old fixture Signed-off-by: alukic <alukic@vmware.com> * Fixed an issue in stating test data Signed-off-by: alukic <alukic@vmware.com> * Increased timeouts Signed-off-by: alukic <alukic@vmware.com> * Fix of an issue with fixture usage Signed-off-by: alukic <alukic@vmware.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"baseUrl": "http://localhost/",
|
||||
"defaultCommandTimeout": 30000,
|
||||
"pageLoadTimeout": 150000,
|
||||
"defaultCommandTimeout": 50000,
|
||||
"chromeWebSecurity": false
|
||||
}
|
||||
|
||||
6
.vib/kibana/cypress/cypress/fixtures/clusters.json
Normal file
6
.vib/kibana/cypress/cypress/fixtures/clusters.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"newCluster": {
|
||||
"name": "remoteCluster",
|
||||
"cluster": "localhost:90"
|
||||
}
|
||||
}
|
||||
6
.vib/kibana/cypress/cypress/fixtures/dashboards.json
Normal file
6
.vib/kibana/cypress/cypress/fixtures/dashboards.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"newDashboard": {
|
||||
"title": "Test_dashboard",
|
||||
"description": "Test_visualisation"
|
||||
}
|
||||
}
|
||||
5
.vib/kibana/cypress/cypress/fixtures/indexes.json
Normal file
5
.vib/kibana/cypress/cypress/fixtures/indexes.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"newIndex": {
|
||||
"name": "test_index"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"dashboardTitle": "Test_dashboard",
|
||||
"dashboardDescription": "Test_dashboard_description",
|
||||
"visualizationTitle": "Test_visualisation",
|
||||
"testIndexName": "test_index",
|
||||
"remoteClusterName":"remoteCluster",
|
||||
"remoteCluster":"localhost:90",
|
||||
"workpadName":"testWorkpad"
|
||||
}
|
||||
6
.vib/kibana/cypress/cypress/fixtures/visualizations.json
Normal file
6
.vib/kibana/cypress/cypress/fixtures/visualizations.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"newVisualization": {
|
||||
"title": "Test_dashboard",
|
||||
"description": "Test_visualisation"
|
||||
}
|
||||
}
|
||||
5
.vib/kibana/cypress/cypress/fixtures/workpads.json
Normal file
5
.vib/kibana/cypress/cypress/fixtures/workpads.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"newWorkpad": {
|
||||
"name": "testWorkpad"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { random, closeThePopups, skipTheWelcomeScreen } from './utils';
|
||||
import { closeThePopups, skipTheWelcomeScreen, random } from './utils';
|
||||
|
||||
before(() => {
|
||||
skipTheWelcomeScreen();
|
||||
@@ -15,9 +15,9 @@ it('allows uploading a file', () => {
|
||||
}
|
||||
);
|
||||
cy.get('[data-test-subj="dataVisualizerFileOpenImportPageButton"]').click();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('indexes').then((index) => {
|
||||
cy.get('[data-test-subj="dataVisualizerFileIndexNameInput"]').type(
|
||||
`${td.testIndexName}.${random}`
|
||||
`${index.newIndex.name}.${random}`
|
||||
);
|
||||
});
|
||||
cy.get('[data-test-subj="dataVisualizerFileImportButton"]').click();
|
||||
@@ -37,12 +37,12 @@ it('allows creating a dashboard', () => {
|
||||
cy.get('[data-test-subj="dashboardSaveMenuItem"]')
|
||||
.should('have.text', 'Save')
|
||||
.forceClick();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('dashboards').then((dashboard) => {
|
||||
cy.get('[data-test-subj="savedObjectTitle"]').type(
|
||||
`${td.dashboardTitle}.${random}`
|
||||
`${dashboard.newDashboard.title}.${random}`
|
||||
);
|
||||
cy.get('[data-test-subj="dashboardDescription"]').type(
|
||||
`${td.dashboardDescription}.${random}`
|
||||
`${dashboard.newDashboard.description}.${random}`
|
||||
);
|
||||
});
|
||||
cy.contains(
|
||||
@@ -50,8 +50,8 @@ it('allows creating a dashboard', () => {
|
||||
'Save'
|
||||
).forceClick(); //forcing because there is a popup we can't control
|
||||
cy.visit('/app/dashboards/list');
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.contains(`${td.dashboardTitle}.${random}`);
|
||||
cy.fixture('dashboards').then((dashboard) => {
|
||||
cy.contains(`${dashboard.newDashboard.title}.${random}`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -63,20 +63,20 @@ it('allows creating a visualisation', () => {
|
||||
.should('contain.text', 'Custom visualization')
|
||||
.forceClick();
|
||||
cy.contains('[data-test-subj="visualizeSaveButton"]', 'Save').forceClick();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('visualizations').then((visualization) => {
|
||||
cy.get('[data-test-subj="savedObjectTitle"]').type(
|
||||
`${td.visualizationTitle}.${random}`
|
||||
`${visualization.newVisualization.title}.${random}`
|
||||
);
|
||||
});
|
||||
cy.get('[id="new-dashboard-option"]').forceClick();
|
||||
cy.contains('Save and go').forceClick();
|
||||
cy.contains('Save').click();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('visualizations').then((visualization) => {
|
||||
cy.get('[data-test-subj="savedObjectTitle"]').type(
|
||||
`${td.visualizationTitle}.${random}`
|
||||
`${visualization.newVisualization.title}.${random}`
|
||||
);
|
||||
cy.get('[data-test-subj="dashboardDescription"]').type(
|
||||
`${td.dashboardDescription}.${random}`
|
||||
`${visualization.newVisualization.description}.${random}`
|
||||
);
|
||||
});
|
||||
cy.contains(
|
||||
@@ -84,8 +84,8 @@ it('allows creating a visualisation', () => {
|
||||
'Save'
|
||||
).forceClick();
|
||||
cy.visit('/app/dashboards/list');
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.contains(`${td.dashboardDescription}.${random}`);
|
||||
cy.fixture('dashboards').then((dashboard) => {
|
||||
cy.contains(`${dashboard.newDashboard.title}.${random}`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -93,21 +93,21 @@ it('allows adding a remote cluster', () => {
|
||||
cy.visit('app/management/data/remote_clusters');
|
||||
closeThePopups();
|
||||
cy.contains('span', 'Add').forceClick();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('clusters').then((cluster) => {
|
||||
cy.get('[data-test-subj="remoteClusterFormNameInput"]').type(
|
||||
`${td.remoteClusterName}${random}`,
|
||||
`${cluster.newCluster.name}${random}`,
|
||||
{
|
||||
force: true,
|
||||
}
|
||||
);
|
||||
cy.get('[data-test-subj="comboBoxInput"]').type(td.remoteCluster);
|
||||
cy.get('[data-test-subj="comboBoxInput"]').type(cluster.newCluster.cluster);
|
||||
cy.get('[data-test-subj="remoteClusterFormSaveButton"]').forceClick();
|
||||
cy.get('[data-test-subj="remoteClusterDetailFlyout"]').contains(
|
||||
td.remoteClusterName
|
||||
cluster.newCluster.name
|
||||
);
|
||||
cy.get('#remoteClusterDetailsFlyoutTitle').should(
|
||||
'contain.text',
|
||||
`${td.remoteClusterName}${random}`
|
||||
`${cluster.newCluster.name}${random}`
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -116,10 +116,10 @@ it('allows adding of a canvas', () => {
|
||||
cy.visit('app/canvas#/');
|
||||
closeThePopups();
|
||||
cy.get('[data-test-subj="create-workpad-button"]').forceClick();
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.fixture('workpads').then((workpad) => {
|
||||
cy.get('input[value="My Canvas Workpad"]')
|
||||
.clear()
|
||||
.type(`${td.workpadName}${random}`);
|
||||
.type(`${workpad.newWorkpad.name}${random}`);
|
||||
});
|
||||
|
||||
cy.contains('span', 'Add element').forceClick({
|
||||
@@ -127,7 +127,7 @@ it('allows adding of a canvas', () => {
|
||||
});
|
||||
cy.contains('span', 'Text').forceClick();
|
||||
cy.visit('app/canvas#/');
|
||||
cy.fixture('testdata').then((td) => {
|
||||
cy.contains(`${td.workpadName}${random}`);
|
||||
cy.fixture('workpads').then((workpad) => {
|
||||
cy.contains(`${workpad.newWorkpad.name}${random}`);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
export let random = (Math.random() + 1).toString(36).substring(9);
|
||||
|
||||
export const skipTheWelcomeScreen = () => {
|
||||
cy.visit('/');
|
||||
closeThePopups();
|
||||
cy.get("body").then(($body) => {
|
||||
if ($body.text().includes('Explore on my own')) {
|
||||
cy.get('button[data-test-subj="skipWelcomeScreen"]').click();
|
||||
}
|
||||
})
|
||||
}
|
||||
cy.visit('/');
|
||||
closeThePopups();
|
||||
cy.get('body').then(($body) => {
|
||||
if ($body.text().includes('Explore on my own')) {
|
||||
cy.get('button[data-test-subj="skipWelcomeScreen"]').click();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const closeThePopups = () => {
|
||||
cy.get('[data-test-subj="kbnLoadingMessage"]').should('not.exist');
|
||||
cy.get('[data-test-subj="toastCloseButton"]').click({
|
||||
multiple: true
|
||||
});
|
||||
}
|
||||
cy.get('[data-test-subj="kbnLoadingMessage"]').should('not.exist');
|
||||
cy.get('[data-test-subj="toastCloseButton"]').click({
|
||||
multiple: true,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands'
|
||||
import './commands';
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
|
||||
Reference in New Issue
Block a user