Minor: fixed test case and mysql query bug (#17205)

This commit is contained in:
Shailesh Parmar 2024-07-27 10:39:13 +05:30 committed by GitHub
parent 10040a2e8d
commit b9e57c71e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -119,7 +119,7 @@ test('Table difference test case', async ({ page }) => {
await test.step('Delete', async () => { await test.step('Delete', async () => {
await deleteTestCase(page, testCase.name); await deleteTestCase(page, testCase.name);
}); });
} catch (error) { } finally {
await table1.delete(apiContext); await table1.delete(apiContext);
await table2.delete(apiContext); await table2.delete(apiContext);
@ -212,7 +212,7 @@ test('Custom SQL Query', async ({ page }) => {
await test.step('Delete', async () => { await test.step('Delete', async () => {
await deleteTestCase(page, testCase.name); await deleteTestCase(page, testCase.name);
}); });
} catch (error) { } finally {
await table.delete(apiContext); await table.delete(apiContext);
await afterAction(); await afterAction();
} }

View File

@ -44,6 +44,7 @@ import {
} from '../../../utils/EntityUtils'; } from '../../../utils/EntityUtils';
import { getEntityFQN } from '../../../utils/FeedUtils'; import { getEntityFQN } from '../../../utils/FeedUtils';
import { generateFormFields } from '../../../utils/formUtils'; import { generateFormFields } from '../../../utils/formUtils';
import { isValidJSONString } from '../../../utils/StringsUtils';
import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils'; import { showErrorToast, showSuccessToast } from '../../../utils/ToastUtils';
import Loader from '../../common/Loader/Loader'; import Loader from '../../common/Loader/Loader';
import RichTextEditor from '../../common/RichTextEditor/RichTextEditor'; import RichTextEditor from '../../common/RichTextEditor/RichTextEditor';
@ -144,7 +145,10 @@ const EditTestCaseModal: React.FC<EditTestCaseModalProps> = ({
(definition) => definition.name === curr.name (definition) => definition.name === curr.name
); );
if (param?.dataType === TestDataType.Array) { if (
param?.dataType === TestDataType.Array &&
isValidJSONString(curr.value)
) {
const value = JSON.parse(curr.value || '[]'); const value = JSON.parse(curr.value || '[]');
return { return {