mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Explore: minor copy changes (#47922)
* Explore: minor copy changes * fix tests
This commit is contained in:
parent
ff60f39e96
commit
c1490a464a
@ -18,11 +18,11 @@ enum SaveTarget {
|
||||
|
||||
const SAVE_TARGETS: Array<SelectableValue<SaveTarget>> = [
|
||||
{
|
||||
label: 'New Dashboard',
|
||||
label: 'New dashboard',
|
||||
value: SaveTarget.NewDashboard,
|
||||
},
|
||||
{
|
||||
label: 'Existing Dashboard',
|
||||
label: 'Existing dashboard',
|
||||
value: SaveTarget.ExistingDashboard,
|
||||
},
|
||||
];
|
||||
@ -141,7 +141,7 @@ export const AddToDashboardModal = ({ onClose, exploreId }: Props) => {
|
||||
<InputControl
|
||||
control={control}
|
||||
render={({ field: { ref, ...field } }) => (
|
||||
<Field label="Target dashboard" description="Start a new dashboard or save the panel in an existing one.">
|
||||
<Field label="Target dashboard" description="Choose where to add the panel.">
|
||||
<RadioButtonGroup options={SAVE_TARGETS} {...field} id="e2d-save-target" />
|
||||
</Field>
|
||||
)}
|
||||
@ -195,7 +195,7 @@ export const AddToDashboardModal = ({ onClose, exploreId }: Props) => {
|
||||
Open in new tab
|
||||
</Button>
|
||||
<Button type="submit" variant="primary" onClick={handleSubmit(partial(onSubmit, false))} icon="apps">
|
||||
Open
|
||||
Open dashboard
|
||||
</Button>
|
||||
</Modal.ButtonRow>
|
||||
</form>
|
||||
|
@ -86,7 +86,7 @@ describe('AddToDashboardButton', () => {
|
||||
|
||||
await openModal();
|
||||
|
||||
userEvent.click(screen.getByRole('button', { name: /open$/i }));
|
||||
userEvent.click(screen.getByRole('button', { name: /open dashboard$/i }));
|
||||
|
||||
await waitForAddToDashboardResponse();
|
||||
|
||||
@ -138,7 +138,7 @@ describe('AddToDashboardButton', () => {
|
||||
|
||||
await openModal();
|
||||
|
||||
userEvent.click(screen.getByRole('button', { name: /open$/i }));
|
||||
userEvent.click(screen.getByRole('button', { name: /open dashboard$/i }));
|
||||
|
||||
await waitForAddToDashboardResponse();
|
||||
|
||||
@ -170,7 +170,7 @@ describe('AddToDashboardButton', () => {
|
||||
|
||||
userEvent.click(screen.getByRole<HTMLInputElement>('radio', { name: /existing dashboard/i }));
|
||||
|
||||
userEvent.click(screen.getByRole('button', { name: /open$/i }));
|
||||
userEvent.click(screen.getByRole('button', { name: /open dashboard$/i }));
|
||||
await waitForAddToDashboardResponse();
|
||||
|
||||
expect(locationService.push).not.toHaveBeenCalled();
|
||||
@ -255,7 +255,7 @@ describe('AddToDashboardButton', () => {
|
||||
});
|
||||
userEvent.click(screen.getByLabelText('Select option'));
|
||||
|
||||
userEvent.click(screen.getByRole('button', { name: /open$/i }));
|
||||
userEvent.click(screen.getByRole('button', { name: /open dashboard$/i }));
|
||||
|
||||
await waitFor(async () => {
|
||||
expect(screen.queryByRole('dialog')).not.toBeInTheDocument();
|
||||
|
Loading…
Reference in New Issue
Block a user