RadioButton: Make description appear in a Tooltip component (#78010)

This commit is contained in:
Laura Fernández
2023-11-27 13:54:07 +01:00
committed by GitHub
parent 1c270b1dc2
commit e422a92eae
10 changed files with 44 additions and 29 deletions

View File

@@ -55,7 +55,7 @@ describe('Exemplars', () => {
cy.contains(dataSourceName).scrollIntoView().should('be.visible').click();
// Switch to code editor
cy.contains('label', 'Code').click();
e2e.components.RadioButton.container().filter(':contains("Code")').click();
// we need to wait for the query-field being lazy-loaded, in two steps:
// 1. first we wait for the text 'Loading...' to appear

View File

@@ -37,7 +37,7 @@ describe('Loki Query Editor', () => {
e2e.components.DataSourcePicker.container().should('be.visible').click();
cy.contains(dataSourceName).scrollIntoView().should('be.visible').click();
cy.contains('Code').click();
e2e.components.RadioButton.container().filter(':contains("Code")').click();
// Wait for lazy loading
const monacoLoadingText = 'Loading...';

View File

@@ -78,7 +78,8 @@ describe('Loki query builder', () => {
cy.contains(finalQuery).should('be.visible');
// Change to code editor
cy.contains('label', 'Code').click();
e2e.components.RadioButton.container().filter(':contains("Code")').click();
// We need to test this manually because the final query is split into separate DOM elements using cy.contains(finalQuery).should('be.visible'); does not detect the query.
cy.contains('rate').should('be.visible');
cy.contains('instance1|instance2').should('be.visible');

View File

@@ -35,7 +35,8 @@ describe('MySQL datasource', () => {
});
it('code editor autocomplete should handle table name escaping/quoting', () => {
cy.get("label[for^='option-code']").should('be.visible').click();
e2e.components.RadioButton.container().filter(':contains("Code")').click();
cy.get('textarea').type('S{downArrow}{enter}');
cy.wait('@tables');
cy.get('.suggest-widget').contains(tableNameWithSpecialCharacter).should('be.visible');

View File

@@ -12,7 +12,7 @@ describe('Query editor', () => {
cy.contains('gdev-prometheus').scrollIntoView().should('be.visible').click();
const queryText = `rate(http_requests_total{job="grafana"}[5m])`;
cy.contains('label', 'Code').click();
e2e.components.RadioButton.container().filter(':contains("Code")').click();
// we need to wait for the query-field being lazy-loaded, in two steps:
// it is a two-step process:

View File

@@ -10,7 +10,7 @@ describe('Visualization suggestions', () => {
// Try visualization suggestions
e2e.components.PanelEditor.toggleVizPicker().click();
cy.contains('Suggestions').click();
e2e.components.RadioButton.container().filter(':contains("Suggestions")').click();
// Verify we see suggestions
e2e.components.VisualizationPreview.card('Line chart').should('be.visible');