Skip to content

Commit

Permalink
Attempt to debug FTR add filter failures
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Aug 8, 2022
1 parent 54e1c9d commit ed4dcaf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const AddFilterPopover = React.memo(function AddFilterPopover({
iconType="plusInCircleFilled"
aria-label={buttonIconLabel}
data-test-subj="addFilter"
onClick={() => setIsAddFilterPopoverOpen(!isAddFilterPopoverOpen)}
onClick={() => setIsAddFilterPopoverOpen((isOpen) => !isOpen)}
size="m"
{...buttonProps}
/>
Expand All @@ -63,6 +63,7 @@ export const AddFilterPopover = React.memo(function AddFilterPopover({
closePopover={() => setIsAddFilterPopoverOpen(false)}
anchorPosition="downLeft"
panelPaddingSize="none"
panelProps={{ 'data-test-subj': 'addFilterPopover' }}
initialFocus=".filterEditor__hiddenItem"
ownFocus
repositionOnScroll
Expand Down
3 changes: 2 additions & 1 deletion test/functional/services/filter_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export class FilterBarService extends FtrService {
*/
public async addFilter(field: string, operator: string, ...values: any): Promise<void> {
await this.testSubjects.click('addFilter');
await this.testSubjects.existOrFail('addFilterPopover');
await this.comboBox.set('filterFieldSuggestionList', field);
await this.comboBox.set('filterOperatorList', operator);
const params = await this.testSubjects.find('filterParams');
Expand All @@ -152,7 +153,7 @@ export class FilterBarService extends FtrService {
}
}
}
await this.testSubjects.click('saveFilter');
await this.testSubjects.clickWhenNotDisabled('saveFilter');
await this.header.awaitGlobalLoadingIndicatorHidden();
}

Expand Down
1 change: 1 addition & 0 deletions x-pack/test/functional/apps/lens/group2/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await PageObjects.timePicker.setDefaultAbsoluteRange();
await filterBar.addFilter('geo.src', 'is', 'US');
await filterBar.toggleFilterPinned('geo.src');
await new Promise((resolve) => setTimeout(resolve, 500)); // Wait between adding multiple filters - stale element issues otherwise
await filterBar.addFilter('geo.dest', 'is', 'LS');

await dashboardAddPanel.clickCreateNewLink();
Expand Down

0 comments on commit ed4dcaf

Please sign in to comment.