Reword button to "Add new data source" (#69125)

* reword button to Create a new data source

The previous wording included the name of the data source, which made it
difficult for the doc team to refer to it.
This allows the doc team to refer to this button in an obvious way.

* "Create a"-> "Add"

* update tests
This commit is contained in:
mikkancso
2023-05-26 10:15:16 +02:00
committed by GitHub
parent 4cf77424fd
commit 37c960e104
2 changed files with 5 additions and 5 deletions
@@ -30,7 +30,7 @@ export function GetStartedWithDataSource({ plugin }: Props): React.ReactElement
return (
<Button variant="primary" onClick={onAddDataSource}>
Create a {plugin.name} data source
Add new data source
</Button>
);
}
@@ -513,7 +513,7 @@ describe('Plugin details page', () => {
});
await waitFor(() => queryByText('Uninstall'));
expect(queryByText(`Create a ${name} data source`)).toBeInTheDocument();
expect(queryByText('Add new data source')).toBeInTheDocument();
});
it('should not display a "Create" button as a post installation step for disabled data source plugins', async () => {
@@ -526,7 +526,7 @@ describe('Plugin details page', () => {
});
await waitFor(() => queryByText('Uninstall'));
expect(queryByText(`Create a ${name} data source`)).toBeNull();
expect(queryByText('Add new data source')).toBeNull();
});
it('should not display post installation step for panel plugins', async () => {
@@ -538,7 +538,7 @@ describe('Plugin details page', () => {
});
await waitFor(() => queryByText('Uninstall'));
expect(queryByText(`Create a ${name} data source`)).toBeNull();
expect(queryByText('Add new data source')).toBeNull();
});
it('should display an enable button for app plugins that are not enabled as a post installation step', async () => {
@@ -787,7 +787,7 @@ describe('Plugin details page', () => {
});
await waitFor(() => queryByText('Uninstall'));
expect(queryByText(`Create a ${name} data source`)).toBeNull();
expect(queryByText('Add new data source')).toBeNull();
});
});
});