migrating database_settings.test.jsx to typescript (#24946)
* migrating database_settings.test.jsx to typescript * Removing unnecessary type assertion
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6abaf04a95
Коммит
8eaaa7228e
@@ -86,6 +86,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Maximum number of idle connections held open to the database."
|
defaultMessage="Maximum number of idle connections held open to the database."
|
||||||
@@ -106,6 +107,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
value={10}
|
value={10}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Maximum number of open connections held open to the database."
|
defaultMessage="Maximum number of open connections held open to the database."
|
||||||
@@ -126,6 +128,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
value={100}
|
value={100}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="The number of seconds to wait for a response from the database after opening a connection and sending the query. Errors that you see in the UI or in the logs as a result of a query timeout can vary depending on the type of query."
|
defaultMessage="The number of seconds to wait for a response from the database after opening a connection and sending the query. Errors that you see in the UI or in the logs as a result of a query timeout can vary depending on the type of query."
|
||||||
@@ -146,6 +149,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
value={10}
|
value={10}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Maximum lifetime for a connection to the database in milliseconds."
|
defaultMessage="Maximum lifetime for a connection to the database in milliseconds."
|
||||||
@@ -166,6 +170,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
value={10}
|
value={10}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Maximum idle time for a connection to the database in milliseconds."
|
defaultMessage="Maximum idle time for a connection to the database in milliseconds."
|
||||||
@@ -186,6 +191,7 @@ exports[`components/DatabaseSettings should match snapshot 1`] = `
|
|||||||
value={20}
|
value={20}
|
||||||
/>
|
/>
|
||||||
<AdminTextSetting
|
<AdminTextSetting
|
||||||
|
disabled={false}
|
||||||
helpText={
|
helpText={
|
||||||
<Memo(MemoizedFormattedMessage)
|
<Memo(MemoizedFormattedMessage)
|
||||||
defaultMessage="Minimum number of characters in a hashtag. This must be greater than or equal to 2. MySQL databases must be configured to support searching strings shorter than three characters, <link>see documentation</link>."
|
defaultMessage="Minimum number of characters in a hashtag. This must be greater than or equal to 2. MySQL databases must be configured to support searching strings shorter than three characters, <link>see documentation</link>."
|
||||||
@@ -26,10 +26,6 @@ describe('components/DatabaseSettings', () => {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
test('should match snapshot', () => {
|
test('should match snapshot', () => {
|
||||||
const props = {
|
|
||||||
...baseProps,
|
|
||||||
value: [],
|
|
||||||
};
|
|
||||||
const config = {
|
const config = {
|
||||||
SqlSettings: {
|
SqlSettings: {
|
||||||
MaxIdleConns: 10,
|
MaxIdleConns: 10,
|
||||||
@@ -45,10 +41,15 @@ describe('components/DatabaseSettings', () => {
|
|||||||
MinimumHashtagLength: 10,
|
MinimumHashtagLength: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
const props = {
|
||||||
|
...baseProps,
|
||||||
|
value: [],
|
||||||
|
config,
|
||||||
|
isDisabled: false,
|
||||||
|
};
|
||||||
const wrapper = shallow(
|
const wrapper = shallow(
|
||||||
<DatabaseSettings
|
<DatabaseSettings
|
||||||
{...props}
|
{...props}
|
||||||
config={config}
|
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
expect(wrapper).toMatchSnapshot();
|
expect(wrapper).toMatchSnapshot();
|
||||||
Ссылка в новой задаче
Block a user