minor: fix custom property for AUT (#17937)

This commit is contained in:
Sachin Chaurasiya 2024-09-20 21:44:10 +05:30 committed by GitHub
parent f85246583e
commit e99e8a3e11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -540,7 +540,10 @@ export const addCustomPropertiesForEntity = async ({
// Enum configuration // Enum configuration
if (customType === 'Enum' && enumConfig) { if (customType === 'Enum' && enumConfig) {
for (const val of enumConfig.values) { for (const val of enumConfig.values) {
await page.fill('#root\\/enumConfig', `${val}{Enter}`); await page.click('#root\\/enumConfig');
await page.fill('#root\\/enumConfig', val);
await page.press('#root\\/enumConfig', 'Enter');
await page.mouse.click(0, 0);
} }
if (enumConfig.multiSelect) { if (enumConfig.multiSelect) {
@ -615,16 +618,17 @@ export const editCreatedProperty = async (
await page.locator(descriptionBox).fill('This is new description'); await page.locator(descriptionBox).fill('This is new description');
if (type === 'Enum') { if (type === 'Enum') {
await page await page.click('#root\\/customPropertyConfig');
.locator('#root\\/customPropertyConfig') await page.fill('#root\\/customPropertyConfig', 'updatedValue');
.fill(`updatedValue{Enter}`); await page.press('#root\\/customPropertyConfig', 'Enter');
await page.click('body'); // Equivalent to clicking outside await page.mouse.click(0, 0);
} }
if (ENTITY_REFERENCE_PROPERTIES.includes(type ?? '')) { if (ENTITY_REFERENCE_PROPERTIES.includes(type ?? '')) {
await page.locator('#root\\/customPropertyConfig').click(); await page.click('#root\\/customPropertyConfig');
await page.locator('#root\\/customPropertyConfig').fill(`Table{Enter}`); await page.fill('#root\\/customPropertyConfig', 'Table');
await page.click('body'); // Equivalent to clicking outside await page.press('#root\\/customPropertyConfig', 'Enter');
await page.mouse.click(0, 0);
} }
const patchRequest = page.waitForResponse('/api/v1/metadata/types/*'); const patchRequest = page.waitForResponse('/api/v1/metadata/types/*');