LogListControls: make tooltip more obvious (#105138)
* LogListControls: make tooltip more obvious * Update test
This commit is contained in:
@@ -32,7 +32,7 @@ describe('LogListControls', () => {
|
||||
</LogListContextProvider>
|
||||
);
|
||||
expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Oldest logs first')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/oldest logs first/)).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Deduplication')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Display levels')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Show timestamps')).toBeInTheDocument();
|
||||
@@ -68,7 +68,7 @@ describe('LogListControls', () => {
|
||||
expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Scroll to top')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Display levels')).toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Oldest logs first')).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText(/oldest logs first/)).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Deduplication')).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Show timestamps')).not.toBeInTheDocument();
|
||||
expect(screen.queryByLabelText('Wrap lines')).not.toBeInTheDocument();
|
||||
@@ -83,7 +83,7 @@ describe('LogListControls', () => {
|
||||
</LogListContextProvider>
|
||||
);
|
||||
expect(screen.getByLabelText('Scroll to bottom')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Oldest logs first')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText(/oldest logs first/)).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Deduplication')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Display levels')).toBeInTheDocument();
|
||||
expect(screen.getByLabelText('Show timestamps')).toBeInTheDocument();
|
||||
@@ -132,7 +132,7 @@ describe('LogListControls', () => {
|
||||
<LogListControls eventBus={new EventBusSrv()} />
|
||||
</LogListContextProvider>
|
||||
);
|
||||
await userEvent.click(screen.getByLabelText('Oldest logs first'));
|
||||
await userEvent.click(screen.getByLabelText(/oldest logs first/));
|
||||
expect(onLogOptionsChange).toHaveBeenCalledTimes(1);
|
||||
expect(onLogOptionsChange).toHaveBeenCalledWith('sortOrder', LogsSortOrder.Descending);
|
||||
});
|
||||
|
||||
@@ -226,8 +226,8 @@ export const LogListControls = ({ eventBus, visualisationType = 'logs' }: Props)
|
||||
onClick={onSortOrderClick}
|
||||
tooltip={
|
||||
sortOrder === LogsSortOrder.Descending
|
||||
? t('logs.logs-controls.newest-first', 'Newest logs first')
|
||||
: t('logs.logs-controls.oldest-first', 'Oldest logs first')
|
||||
? t('logs.logs-controls.newest-first', 'Sorted by newest logs first - Click to show oldest first')
|
||||
: t('logs.logs-controls.oldest-first', 'Sorted by oldest logs first - Click to show newest first')
|
||||
}
|
||||
size="lg"
|
||||
/>
|
||||
|
||||
@@ -6231,8 +6231,8 @@
|
||||
"escape-newlines": "Fix incorrectly escaped newline and tab sequences in log lines",
|
||||
"hide-timestamps": "Hide timestamps",
|
||||
"hide-unique-labels": "Hide unique labels",
|
||||
"newest-first": "Newest logs first",
|
||||
"oldest-first": "Oldest logs first",
|
||||
"newest-first": "Sorted by newest logs first - Click to show oldest first",
|
||||
"oldest-first": "Sorted by oldest logs first - Click to show newest first",
|
||||
"prettify-json": "Expand JSON logs",
|
||||
"remove-escaping": "Remove escaping",
|
||||
"scroll-bottom": "Scroll to bottom",
|
||||
|
||||
Reference in New Issue
Block a user