mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
Fix Add filter button doesnt close popup after openning (#111917)
Co-authored-by: Su Tran <sutranbmt@gmail.com>
This commit is contained in:
parent
3920918d3a
commit
84a3536fe4
4 changed files with 9 additions and 1 deletions
|
@ -55,6 +55,8 @@ function FilterBarUI(props: Props) {
|
|||
}
|
||||
}
|
||||
|
||||
const onAddFilterClick = () => setIsAddFilterPopoverOpen(!isAddFilterPopoverOpen);
|
||||
|
||||
function renderItems() {
|
||||
return props.filters.map((filter, i) => (
|
||||
<EuiFlexItem key={i} grow={false} className="globalFilterBar__flexItem">
|
||||
|
@ -81,7 +83,7 @@ function FilterBarUI(props: Props) {
|
|||
const button = (
|
||||
<EuiButtonEmpty
|
||||
size="s"
|
||||
onClick={() => setIsAddFilterPopoverOpen(true)}
|
||||
onClick={onAddFilterClick}
|
||||
data-test-subj="addFilter"
|
||||
className="globalFilterBar__addButton"
|
||||
>
|
||||
|
|
|
@ -24,6 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
it('a11y test on add filter panel', async () => {
|
||||
await PageObjects.discover.openAddFilterPanel();
|
||||
await a11y.testAppSnapshot();
|
||||
await PageObjects.discover.closeAddFilterPanel();
|
||||
await filterBar.addFilter('OriginCityName', 'is', 'Rome');
|
||||
});
|
||||
|
||||
|
|
|
@ -83,6 +83,10 @@ export class DiscoverPageObject extends FtrService {
|
|||
await this.testSubjects.click('addFilter');
|
||||
}
|
||||
|
||||
public async closeAddFilterPanel() {
|
||||
await this.testSubjects.click('addFilter');
|
||||
}
|
||||
|
||||
public async waitUntilSearchingHasFinished() {
|
||||
await this.testSubjects.missingOrFail('loadingSpinner', {
|
||||
timeout: this.defaultFindTimeout * 10,
|
||||
|
|
|
@ -199,5 +199,6 @@ export class FilterBarService extends FtrService {
|
|||
public async selectIndexPattern(indexPatternTitle: string): Promise<void> {
|
||||
await this.testSubjects.click('addFilter');
|
||||
await this.comboBox.set('filterIndexPatternsSelect', indexPatternTitle);
|
||||
await this.testSubjects.click('addFilter');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue