minor(test): fix ingestion related flaky for aut (#17727)

This commit is contained in:
Chirag Madlani 2024-09-05 22:09:43 +05:30 committed by Shailesh Parmar
parent 1243f50b0f
commit 29b5ee9dcc
3 changed files with 10 additions and 6 deletions

View File

@ -166,15 +166,15 @@ class RedshiftWithDBTIngestionClass extends ServiceBaseClass {
await sidebarClick(page, SidebarItem.TAGS);
await page.waitForSelector('[data-testid="data-summary-container"]');
await page.click(
`[data-testid="data-summary-container"] >> text=${DBT.classification}`
);
// Verify DBT tag category is added
await page.waitForSelector('[data-testid="tag-name"]');
const tagName = await page.textContent('[data-testid="tag-name"]');
expect(tagName).toContain(DBT.classification);
await page.waitForSelector('[data-testid="loader"]', {
state: 'detached',
});
await page.waitForSelector('.ant-table-row');

View File

@ -41,6 +41,7 @@ class ServiceBaseClass {
protected entityName: string;
protected shouldTestConnection: boolean;
protected shouldAddIngestion: boolean;
protected entityFQN: string | null;
constructor(
category: Services,
@ -56,6 +57,7 @@ class ServiceBaseClass {
this.entityName = entity;
this.shouldTestConnection = shouldTestConnection;
this.shouldAddIngestion = shouldAddIngestion;
this.entityFQN = null;
}
visitService() {
@ -402,7 +404,7 @@ class ServiceBaseClass {
// Navigate to ingested table
await visitEntityPage({
page,
searchTerm: this.entityName,
searchTerm: this.entityFQN ?? this.entityName,
dataTestId: entityDataTestId ?? `${this.serviceName}-${this.entityName}`,
});
@ -446,7 +448,7 @@ class ServiceBaseClass {
// Navigate to table name
await visitEntityPage({
page,
searchTerm: this.entityName,
searchTerm: this.entityFQN ?? this.entityName,
dataTestId: entityDataTestId ?? `${this.serviceName}-${this.entityName}`,
});

View File

@ -29,6 +29,8 @@ class SnowflakeIngestionClass extends ServiceBaseClass {
'CUSTOMER'
);
this.schema = 'TPCH_SF1000';
const database = process.env.PLAYWRIGHT_SNOWFLAKE_DATABASE ?? '';
this.entityFQN = `${this.serviceName}.${database}.${this.schema}.${this.entityName} `;
}
async createService(page: Page) {