Fix: #21729 Test Cases Not Returned When Service Name Contains Spaces (#21737)

This commit is contained in:
Shailesh Parmar 2025-06-13 03:17:03 +05:30 committed by GitHub
parent eb7ca6087e
commit 269d967b2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 14 deletions

View File

@ -26,9 +26,9 @@ test(
await redirectToHomePage(page);
const { apiContext, afterAction } = await getApiContext(page);
const table = new TableClass();
const table = new TableClass(`multi pipeline !@#$%^&*()_-+=test-${uuid()}`);
await table.create(apiContext);
await table.visitEntityPage(page);
await table.visitEntityPage(page, table.entity.name);
const testCaseName = `multi-pipeline-test-${uuid()}`;
const pipelineName = `test suite pipeline 2`;
@ -193,7 +193,7 @@ test(
await redirectToHomePage(page);
const { apiContext, afterAction } = await getApiContext(page);
const table = new TableClass();
const table = new TableClass(`multi pipeline !@#$%^&*()_-+=test-${uuid()}`);
await table.create(apiContext);
for (let index = 0; index < 4; index++) {
await table.createTestCase(apiContext);
@ -206,7 +206,7 @@ test(
apiContext,
testCaseNames
);
await table.visitEntityPage(page);
await table.visitEntityPage(page, table.entity.name);
await page.getByText('Data Observability').click();
await page.getByRole('menuitem', { name: 'Data Quality' }).click();

View File

@ -158,19 +158,25 @@ export class TableClass extends EntityClass {
data: this.service,
}
);
const service = await serviceResponse.json();
const databaseResponse = await apiContext.post('/api/v1/databases', {
data: this.database,
data: { ...this.database, service: service.fullyQualifiedName },
});
const database = await databaseResponse.json();
const schemaResponse = await apiContext.post('/api/v1/databaseSchemas', {
data: this.schema,
data: { ...this.schema, database: database.fullyQualifiedName },
});
const schema = await schemaResponse.json();
const entityResponse = await apiContext.post('/api/v1/tables', {
data: this.entity,
data: {
...this.entity,
databaseSchema: schema.fullyQualifiedName,
},
});
const service = await serviceResponse.json();
const database = await databaseResponse.json();
const schema = await schemaResponse.json();
const entity = await entityResponse.json();
this.serviceResponseData = service;
@ -220,10 +226,10 @@ export class TableClass extends EntityClass {
};
}
async visitEntityPage(page: Page) {
async visitEntityPage(page: Page, searchTerm?: string) {
await visitEntityPage({
page,
searchTerm: this.entityResponseData?.['fullyQualifiedName'],
searchTerm: searchTerm ?? this.entityResponseData?.['fullyQualifiedName'],
dataTestId: `${this.service.name}-${this.entity.name}`,
});
}

View File

@ -182,9 +182,9 @@ const AddTestSuitePipeline = ({
<AddTestCaseList
filters={
!testSuiteId
? `testSuite.fullyQualifiedName:${escapeESReservedCharacters(
? `testSuite.fullyQualifiedName:"${escapeESReservedCharacters(
testSuite?.fullyQualifiedName ?? fqn
)}`
)}"`
: undefined
}
showButton={false}