[Search] Re-enable test on example search app (#139961)

* [Search] Unskip ex-flaky example app test

* comment out flaky test code

* use es.transport.request to downsample the test index

* uncomment blocked test code

* remove browser refresh in beforeEach

* fix ts
This commit is contained in:
Tim Sullivan 2022-09-09 10:25:36 -07:00 committed by GitHub
parent a26cc71578
commit 95c3893e28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 77 additions and 61 deletions

View file

@ -107,9 +107,9 @@ export const SearchExamplesApp = ({
const [selectedBucketField, setSelectedBucketField] = useState<
DataViewField | null | undefined
>();
const [request, setRequest] = useState<Record<string, any>>({});
const [isLoading, setIsLoading] = useState<boolean>(false);
const [currentAbortController, setAbortController] = useState<AbortController>();
const [request, setRequest] = useState<Record<string, any>>({});
const [rawResponse, setRawResponse] = useState<Record<string, any>>({});
const [warningContents, setWarningContents] = useState<SearchResponseWarning[]>([]);
const [selectedTab, setSelectedTab] = useState(0);
@ -202,6 +202,8 @@ export const SearchExamplesApp = ({
// Submit the search request using the `data.search` service.
setRequest(req.params.body);
setRawResponse({});
setWarningContents([]);
setIsLoading(true);
data.search
@ -301,6 +303,8 @@ export const SearchExamplesApp = ({
searchSource.setField('aggs', ac);
}
setRequest(searchSource.getSearchRequestBody());
setRawResponse({});
setWarningContents([]);
const abortController = new AbortController();
const inspector: Required<IInspectorInfo> = {