diff --git a/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap b/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap index f3d4e3df2c92..7588ef567b03 100644 --- a/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap +++ b/src/plugins/data/public/query/query_string/language_service/lib/__snapshots__/query_result.test.tsx.snap @@ -16,6 +16,7 @@ exports[`Query Result show error status with error message 2`] = ` Error @@ -35,6 +36,7 @@ exports[`Query Result show error status with error message 2`] = `
- + {i18n.translate('data.query.languageService.queryResults.error', { defaultMessage: `Error`, })} @@ -146,6 +151,7 @@ export function QueryResult(props: { queryStatus: QueryStatus }) {

diff --git a/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx b/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx index 0b58f0413966..49f8b0647226 100644 --- a/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx +++ b/src/plugins/data/public/query/query_string/language_service/lib/recent_query.tsx @@ -96,6 +96,7 @@ export function RecentQueriesTable({ rowProps={getRowProps} cellProps={getCellProps} className="recentQuery__table" + data-test-subj="recentQueryTable" tableLayout="fixed" compressed /> diff --git a/src/plugins/data/public/ui/dataset_selector/configurator.tsx b/src/plugins/data/public/ui/dataset_selector/configurator.tsx index 4906bec2ef84..56ec77efe784 100644 --- a/src/plugins/data/public/ui/dataset_selector/configurator.tsx +++ b/src/plugins/data/public/ui/dataset_selector/configurator.tsx @@ -187,7 +187,7 @@ export const Configurator = ({ - + - +

{current.columnHeader}

{current.multiSelect ? ( @@ -210,6 +214,7 @@ export const DatasetExplorer = ({ })} height="full" className="datasetExplorer__selectable" + data-test-subj="datasetExplorerSelectable" > {(list, search) => ( <> @@ -252,16 +257,29 @@ export const DatasetExplorer = ({ }; const EmptyColumn = () => ( -
+
); const LoadingEmptyColumn = ({ isLoading }: { isLoading: boolean }) => isLoading ? ( -
- +
+

...

- + {(list) => <>{list}}
diff --git a/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx b/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx index a88aea528e7e..02a65dbe3897 100644 --- a/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx +++ b/src/plugins/data/public/ui/dataset_selector/dataset_selector.tsx @@ -221,7 +221,11 @@ export const DatasetSelector = ({ iconSide="right" onClick={togglePopover} > - + {datasetTitle} @@ -234,6 +238,7 @@ export const DatasetSelector = ({ > )} - + = (props) => { }; return ( -
+
(searchRef.current = node)} @@ -93,7 +93,7 @@ export const DatasetTable: React.FC = (props) => { /> {paginationToken && ( -
+
onTableChange({ paginationToken, search: searchRef.current?.value })} > diff --git a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx index 26fb97606001..a1004758858e 100644 --- a/src/plugins/data/public/ui/filter_bar/filter_bar.tsx +++ b/src/plugins/data/public/ui/filter_bar/filter_bar.tsx @@ -190,10 +190,15 @@ function FilterBarUI(props: Props) { gutterSize="none" alignItems="flexStart" responsive={false} + data-test-subj="globalFilterGroup" > {useNewHeader ? ( - + {filterBarPrefixText}: ) : ( @@ -205,7 +210,10 @@ function FilterBarUI(props: Props) { /> )} - + { -
+
{this.renderIndexPatternInput()} diff --git a/src/plugins/data/public/ui/query_editor/editors/default_editor/index.tsx b/src/plugins/data/public/ui/query_editor/editors/default_editor/index.tsx index 1eaf373f2c8e..55b19894d41e 100644 --- a/src/plugins/data/public/ui/query_editor/editors/default_editor/index.tsx +++ b/src/plugins/data/public/ui/query_editor/editors/default_editor/index.tsx @@ -33,7 +33,7 @@ export const DefaultInput: React.FC = ({ }) => { return (
-
+
= ({ }} triggerSuggestOnFocus={true} /> -
+
{footerItems && ( {footerItems.start?.map((item, idx) => ( {item} @@ -92,6 +94,7 @@ export const DefaultInput: React.FC = ({ key={`defaultEditor__footerItem-end-${idx}`} grow={false} className="defaultEditor__footerItem" + data-test-subj="defaultEditorFooterEndItem" > {item} diff --git a/src/plugins/data/public/ui/query_editor/editors/shared.tsx b/src/plugins/data/public/ui/query_editor/editors/shared.tsx index fb5df10c65c9..8b2da76091a6 100644 --- a/src/plugins/data/public/ui/query_editor/editors/shared.tsx +++ b/src/plugins/data/public/ui/query_editor/editors/shared.tsx @@ -96,7 +96,10 @@ export const SingleLineInput: React.FC = ({ ); return ( -
+
{prepend}
= ({ triggerSuggestOnFocus={true} /> {editorIsFocused && ( -
+
{footerItems && ( {footerItems.start?.map((item) => ( diff --git a/src/plugins/data/public/ui/query_editor/language_selector.tsx b/src/plugins/data/public/ui/query_editor/language_selector.tsx index 0177ede6f7fb..d7aa770f7fe9 100644 --- a/src/plugins/data/public/ui/query_editor/language_selector.tsx +++ b/src/plugins/data/public/ui/query_editor/language_selector.tsx @@ -117,6 +117,7 @@ export const QueryLanguageSelector = (props: QueryLanguageSelectorProps) => { handleLanguageChange(language.value)} > diff --git a/src/plugins/data/public/ui/query_editor/query_editor.tsx b/src/plugins/data/public/ui/query_editor/query_editor.tsx index 20650cca6acc..a9d84f29e693 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor.tsx @@ -309,7 +309,12 @@ export const QueryEditorUI: React.FC = (props) => { }, footerItems: { start: [ - + {`${lineCount} ${lineCount === 1 ? 'line' : 'lines'}`} , = (props) => { size="xs" onClick={toggleRecentQueries} className="queryEditor__footerItem" + data-test-subj="queryEditorFooterToggleRecentQueriesButton" > {'Recent queries'} @@ -362,10 +368,20 @@ export const QueryEditorUI: React.FC = (props) => { prepend: props.prepend, footerItems: { start: [ - + {`${lineCount ?? 1} ${lineCount === 1 || !lineCount ? 'line' : 'lines'}`} , - + {query.dataset?.timeFieldName || ''} , , @@ -378,6 +394,7 @@ export const QueryEditorUI: React.FC = (props) => { size="xs" onClick={toggleRecentQueries} className="queryEditor__footerItem" + data-test-subj="queryEditorFooterToggleRecentQueriesButton" flush="both" > @@ -409,16 +426,20 @@ export const QueryEditorUI: React.FC = (props) => { ref={bannerRef} className={classNames('osdQueryEditor__banner', props.bannerClassName)} /> -
-
+
+
{isCollapsed ? languageEditor.TopBar.Collapsed() : languageEditor.TopBar.Expanded && languageEditor.TopBar.Expanded()}
{languageSelector} -
+
-
+
{renderQueryControls(languageEditor.TopBar.Controls)} {!languageEditor.TopBar.Expanded && renderToggleIcon()} {props.savedQueryManagement} diff --git a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx index ad22750207ed..a6d33ddf7cff 100644 --- a/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx +++ b/src/plugins/data/public/ui/query_editor/query_editor_top_row.tsx @@ -357,6 +357,7 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { dateFormat={uiSettings!.get('dateFormat')} isAutoRefreshOnly={props.showAutoRefreshOnly} className="osdQueryEditor__datePicker" + data-test-subj="osdQueryEditorDatePicker" compressed={true} /> @@ -369,7 +370,11 @@ export default function QueryEditorTopRow(props: QueryEditorTopRowProps) { const datePicker = ( - + {renderUpdateButton()} diff --git a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx index 45e718fd52ba..63cd290273bb 100644 --- a/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_bar_top_row.tsx @@ -321,6 +321,7 @@ export default function QueryBarTopRow(props: QueryBarTopRowProps) { dateFormat={uiSettings!.get('dateFormat')} isAutoRefreshOnly={props.showAutoRefreshOnly} className="osdQueryBar__datePicker" + data-test-subj="osdQueryBarDatePicker" compressed={true} /> @@ -402,7 +403,7 @@ export default function QueryBarTopRow(props: QueryBarTopRowProps) { > {renderQueryInput()} {renderSharingMetaFields()} - + {shouldUseDatePickerRef ? createPortal(renderUpdateButton(), props.datePickerRef!.current!) : renderUpdateButton()} diff --git a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx index b94c38d0f15e..0bfb22db75ba 100644 --- a/src/plugins/data/public/ui/query_string_input/query_string_input.tsx +++ b/src/plugins/data/public/ui/query_string_input/query_string_input.tsx @@ -638,6 +638,7 @@ export default class QueryStringInputUI extends Component {
-
+
{shouldTruncate && (
- + {i18n.translate('data.saved_query.view_more_label', { defaultMessage: '{viewMoreLabel}', values: { diff --git a/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx b/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx index 8e015adf1eb5..ccc801ce60e1 100644 --- a/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx +++ b/src/plugins/data/public/ui/saved_query_management/saved_query_list_item.tsx @@ -76,7 +76,7 @@ export const SavedQueryListItem = ({ }); const label = ( - + {savedQuery.attributes.title}{' '} {savedQuery.attributes.description && ( {savedQueries.length > 0 ? ( - +

{savedQueryDescriptionText}

{savedQueryRows()} @@ -288,6 +294,7 @@ export function SavedQueryManagementComponent({
) : ( - +

{noSavedQueriesDescriptionText}

diff --git a/src/plugins/data/public/ui/search_bar/search_bar.tsx b/src/plugins/data/public/ui/search_bar/search_bar.tsx index 251a0dc86fa0..325f475d1f57 100644 --- a/src/plugins/data/public/ui/search_bar/search_bar.tsx +++ b/src/plugins/data/public/ui/search_bar/search_bar.tsx @@ -489,6 +489,7 @@ class SearchBarUI extends Component { > diff --git a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_description_header.tsx b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_description_header.tsx index 461571975b7c..5dd6bb9b64bc 100644 --- a/src/plugins/data/public/ui/shard_failure_modal/shard_failure_description_header.tsx +++ b/src/plugins/data/public/ui/shard_failure_modal/shard_failure_description_header.tsx @@ -62,7 +62,11 @@ export function getFailureSummaryDetailsText(failure: ShardFailure): string { export function ShardFailureDescriptionHeader(props: ShardFailure) { const failureDetails = getFailurePropsForSummary(props).map((kv) => ( - + {kv.key} {kv.value} )); diff --git a/src/plugins/data/public/ui/typeahead/__snapshots__/suggestion_component.test.tsx.snap b/src/plugins/data/public/ui/typeahead/__snapshots__/suggestion_component.test.tsx.snap index 51f13d5ab108..37487f10a9fa 100644 --- a/src/plugins/data/public/ui/typeahead/__snapshots__/suggestion_component.test.tsx.snap +++ b/src/plugins/data/public/ui/typeahead/__snapshots__/suggestion_component.test.tsx.snap @@ -15,6 +15,7 @@ exports[`SuggestionComponent Should display the suggestion and use the provided >
This is not a helpful suggestion
@@ -50,6 +52,7 @@ exports[`SuggestionComponent Should make the element active if the selected prop >
This is not a helpful suggestion
diff --git a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx index 67243df6415a..b3e1f75dc2b4 100644 --- a/src/plugins/data/public/ui/typeahead/suggestion_component.tsx +++ b/src/plugins/data/public/ui/typeahead/suggestion_component.tsx @@ -87,14 +87,16 @@ export function SuggestionComponent(props: Props) { }-${props.suggestion.text.replace(/\s/g, '-')}`} >
-
+
{props.suggestion.text}
{props.shouldDisplayDescription && ( -
{props.suggestion.description}
+
+ {props.suggestion.description} +
)}