Prometheus: Enable Combobox metric select by default (#101045)

* Prometheus: enable prometheusUsesCombobox toggle by default

* bold Combobox
This commit is contained in:
Josh Hunt
2025-03-30 20:24:53 +03:00
committed by GitHub
parent 88e51d549c
commit 7ea0fab606
12 changed files with 37 additions and 30 deletions
@@ -106,6 +106,6 @@ describe('Prometheus config', () => {
// exemplars tested in exemplar.spec
});
export function selectOption(option: string) {
e2e.components.Select.option().contains(option).should('be.visible').click();
function selectOption(option: string) {
cy.get('[role="option"]').filter(`:contains("${option}")`).should('be.visible').click();
}
@@ -141,8 +141,7 @@ describe('Prometheus query editor', () => {
getResources();
e2e.components.DataSource.Prometheus.queryEditor.builder.metricSelect().should('exist').click();
e2e.components.DataSource.Prometheus.queryEditor.builder.metricSelect().should('exist').click().type('metric1');
selectOption('metric1');
e2e.components.DataSource.Prometheus.queryEditor.builder.hints().contains('hint: add rate');
@@ -153,15 +152,11 @@ describe('Prometheus query editor', () => {
getResources();
e2e.components.DataSource.Prometheus.queryEditor.builder.metricSelect().should('exist').click();
selectOption('Metrics explorer');
e2e.components.DataSource.Prometheus.queryEditor.builder.metricsExplorer().should('exist');
cy.get(`[aria-label="Open metrics explorer"]`).should('exist');
});
});
});
function selectOption(option: string) {
e2e.components.Select.option().contains(option).should('be.visible').click();
cy.get('[role="option"]').filter(`:contains("${option}")`).should('be.visible').click();
}
@@ -118,5 +118,5 @@ describe('Prometheus variable query editor', () => {
});
function selectOption(option: string) {
e2e.components.Select.option().contains(option).should('be.visible').click();
cy.get('[role="option"]').filter(`:contains("${option}")`).should('be.visible').click();
}