Skip to content

[Backport 2.19] Traces - Filter Adjustment and DataGrid abstraction #2327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,17 @@
});

it('Renders data grid, flyout and filters', () => {
cy.get('.euiButton__text[title="Span list"]').click({ force: true });

Check warning on line 99 in .cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.contains('2 columns hidden').should('exist');

cy.get('.euiLink').contains(SPAN_ID).trigger('mouseover', { force: true });

Check warning on line 102 in .cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true });

Check warning on line 103 in .cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls
cy.get('button[data-datagrid-interactable="true"]').eq(0).click({ force: true }); // first click doesn't go through eui data grid

Check warning on line 104 in .cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls

cy.contains('Span detail').should('exist');
cy.contains('Span attributes').should('exist');
cy.get('.euiTextColor').contains('Span ID').trigger('mouseover');
cy.get('.euiButtonIcon[aria-label="span-flyout-filter-icon"').click({ force: true });

Check warning on line 109 in .cypress/integration/trace_analytics_test/trace_analytics_traces.spec.js

View workflow job for this annotation

GitHub Actions / Lint

Do not use force on click and type calls

cy.get('.euiBadge__text').contains('spanId: ').should('exist');
cy.contains('Spans (1)').should('exist');
Expand Down Expand Up @@ -179,22 +179,22 @@
cy.get("[data-test-subj='treeExpandAll']").click();
cy.get("[data-test-subj='treeCollapseAll']").click();

cy.get("[data-test-subj='spanId-link']")
cy.get("[data-test-subj='spanId-flyout-button']")
.should('have.length', 6)
.then((initialSpanIds) => {
const initialCount = initialSpanIds.length;
expect(initialCount).to.equal(6);

cy.get("[data-test-subj='treeExpandAll']").click();

cy.get("[data-test-subj='spanId-link']").then((expandedSpanIds) => {
cy.get("[data-test-subj='spanId-flyout-button']").then((expandedSpanIds) => {
const expandedCount = expandedSpanIds.length;
expect(expandedCount).to.equal(10);
});

cy.get("[data-test-subj='treeCollapseAll']").click();

cy.get("[data-test-subj='spanId-link']").then((collapsedSpanIds) => {
cy.get("[data-test-subj='spanId-flyout-button']").then((collapsedSpanIds) => {
const collapsedCount = collapsedSpanIds.length;
expect(collapsedCount).to.equal(6); // Collapsed rows should match the initial count
});
Expand All @@ -209,15 +209,15 @@
cy.get("[data-test-subj='treeExpandAll']").click();
cy.get("[data-test-subj='treeCollapseAll']").click();

cy.get("[data-test-subj='spanId-link']").then((initialSpanIds) => {
cy.get("[data-test-subj='spanId-flyout-button']").then((initialSpanIds) => {
const initialCount = initialSpanIds.length;
expect(initialCount).to.equal(6);

// Find and click the first tree view expand arrow
cy.get("[data-test-subj='treeViewExpandArrow']").first().click();

// Check the number of Span IDs after expanding the arrow (should be 7)
cy.get("[data-test-subj='spanId-link']").then((expandedSpanIds) => {
cy.get("[data-test-subj='spanId-flyout-button']").then((expandedSpanIds) => {
const expandedCount = expandedSpanIds.length;
expect(expandedCount).to.equal(7);
});
Expand All @@ -233,7 +233,7 @@
cy.get("[data-test-subj='treeCollapseAll']").click();

// Open flyout for a span
cy.get("[data-test-subj='spanId-link']")
cy.get("[data-test-subj='spanId-flyout-button']")
.contains(SPAN_ID_TREE_VIEW)
.click()
cy.contains('Span detail').should('exist');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`Filter popover component renders filter popover 1`] = `
<div
style={
Object {
"width": 500,
"width": 600,
}
}
>
Expand All @@ -44,28 +44,29 @@ exports[`Filter popover component renders filter popover 1`] = `
}
/>
<EuiFlexGroup
gutterSize="s"
direction="column"
gutterSize="m"
>
<div
className="euiFlexGroup euiFlexGroup--gutterSmall euiFlexGroup--directionRow euiFlexGroup--responsive"
className="euiFlexGroup euiFlexGroup--gutterMedium euiFlexGroup--directionColumn euiFlexGroup--responsive"
>
<EuiFlexItem
grow={6}
grow={true}
>
<div
className="euiFlexItem euiFlexItem--flexGrow6"
className="euiFlexItem"
>
<EuiCompressedFormRow
describedByIds={Array []}
display="rowCompressed"
fullWidth={false}
fullWidth={true}
hasChildLabel={true}
hasEmptyLabelSpace={false}
label="Field"
labelType="label"
>
<div
className="euiFormRow euiFormRow--compressed"
className="euiFormRow euiFormRow--fullWidth euiFormRow--compressed"
id="random_html_id-row"
>
<div
Expand All @@ -92,7 +93,7 @@ exports[`Filter popover component renders filter popover 1`] = `
async={false}
compressed={true}
data-test-subj="field-selector-filter-panel"
fullWidth={false}
fullWidth={true}
id="random_html_id"
isClearable={false}
onBlur={[Function]}
Expand Down Expand Up @@ -129,15 +130,15 @@ exports[`Filter popover component renders filter popover 1`] = `
<div
aria-expanded={false}
aria-haspopup="listbox"
className="euiComboBox euiComboBox--compressed"
className="euiComboBox euiComboBox--compressed euiComboBox--fullWidth"
data-test-subj="field-selector-filter-panel"
onKeyDown={[Function]}
role="combobox"
>
<EuiComboBoxInput
autoSizeInputRef={[Function]}
compressed={true}
fullWidth={false}
fullWidth={true}
hasSelectedOptions={false}
id="random_html_id"
inputRef={[Function]}
Expand All @@ -164,7 +165,7 @@ exports[`Filter popover component renders filter popover 1`] = `
>
<EuiFormControlLayout
compressed={true}
fullWidth={false}
fullWidth={true}
icon={
Object {
"aria-label": "Open list of options",
Expand All @@ -178,13 +179,13 @@ exports[`Filter popover component renders filter popover 1`] = `
}
>
<div
className="euiFormControlLayout euiFormControlLayout--compressed"
className="euiFormControlLayout euiFormControlLayout--fullWidth euiFormControlLayout--compressed"
>
<div
className="euiFormControlLayout__childrenWrapper"
>
<div
className="euiComboBox__inputWrap euiComboBox__inputWrap--compressed euiComboBox__inputWrap--noWrap"
className="euiComboBox__inputWrap euiComboBox__inputWrap--compressed euiComboBox__inputWrap--fullWidth euiComboBox__inputWrap--noWrap"
data-test-subj="comboBoxInput"
onClick={[Function]}
tabIndex={-1}
Expand Down Expand Up @@ -332,22 +333,22 @@ exports[`Filter popover component renders filter popover 1`] = `
</div>
</EuiFlexItem>
<EuiFlexItem
grow={5}
grow={true}
>
<div
className="euiFlexItem euiFlexItem--flexGrow5"
className="euiFlexItem"
>
<EuiCompressedFormRow
describedByIds={Array []}
display="rowCompressed"
fullWidth={false}
fullWidth={true}
hasChildLabel={true}
hasEmptyLabelSpace={false}
label="Operator"
labelType="label"
>
<div
className="euiFormRow euiFormRow--compressed"
className="euiFormRow euiFormRow--fullWidth euiFormRow--compressed"
id="random_html_id-row"
>
<div
Expand All @@ -374,7 +375,7 @@ exports[`Filter popover component renders filter popover 1`] = `
async={false}
compressed={true}
data-test-subj="operator-selector-filter-panel"
fullWidth={false}
fullWidth={true}
id="random_html_id"
isClearable={false}
isDisabled={true}
Expand All @@ -394,15 +395,15 @@ exports[`Filter popover component renders filter popover 1`] = `
<div
aria-expanded={false}
aria-haspopup="listbox"
className="euiComboBox euiComboBox--compressed euiComboBox-isDisabled"
className="euiComboBox euiComboBox--compressed euiComboBox--fullWidth euiComboBox-isDisabled"
data-test-subj="operator-selector-filter-panel"
onKeyDown={[Function]}
role="combobox"
>
<EuiComboBoxInput
autoSizeInputRef={[Function]}
compressed={true}
fullWidth={false}
fullWidth={true}
hasSelectedOptions={false}
id="random_html_id"
inputRef={[Function]}
Expand Down Expand Up @@ -430,7 +431,7 @@ exports[`Filter popover component renders filter popover 1`] = `
>
<EuiFormControlLayout
compressed={true}
fullWidth={false}
fullWidth={true}
icon={
Object {
"aria-label": "Open list of options",
Expand All @@ -444,13 +445,13 @@ exports[`Filter popover component renders filter popover 1`] = `
}
>
<div
className="euiFormControlLayout euiFormControlLayout--compressed"
className="euiFormControlLayout euiFormControlLayout--fullWidth euiFormControlLayout--compressed"
>
<div
className="euiFormControlLayout__childrenWrapper"
>
<div
className="euiComboBox__inputWrap euiComboBox__inputWrap--compressed euiComboBox__inputWrap--noWrap"
className="euiComboBox__inputWrap euiComboBox__inputWrap--compressed euiComboBox__inputWrap--fullWidth euiComboBox__inputWrap--noWrap"
data-test-subj="comboBoxInput"
onClick={[Function]}
tabIndex={-1}
Expand Down
Loading
Loading