cypress: fix AUT flakiness part 7 (#16348)

This commit is contained in:
Shailesh Parmar 2024-05-20 15:57:27 +05:30 committed by GitHub
parent 38bdcc4112
commit 8c3a02481e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 1 deletions

View File

@ -20,6 +20,11 @@ export const checkDataInsightSuccessStatus = (
count = 1,
timer = BASE_WAIT_TIME
) => {
interceptURL(
'GET',
'/api/v1/apps/name/DataInsightsApplication/status?*',
'getAppStatus'
);
cy.get('[data-testid="app-run-history-table"]')
.find('[data-testid="pipeline-status"]')
.first()
@ -35,6 +40,7 @@ export const checkDataInsightSuccessStatus = (
cy.wait(timer);
timer *= 2;
cy.reload();
verifyResponseStatusCode('@getAppStatus', 200);
checkDataInsightSuccessStatus(++count, timer * 2);
} else {
if ($ingestionStatus.text() !== 'Success') {

View File

@ -12,6 +12,7 @@
*/
import { SERVICE_TYPE } from '../../constants/constants';
import { EntityType } from '../../constants/Entity.interface';
import { POSTGRES } from '../../constants/service.constants';
import {
checkServiceFieldSectionHighlighting,
interceptURL,
@ -29,7 +30,12 @@ class PostgresIngestionClass extends ServiceBaseClass {
queryLogFilePath: string;
constructor() {
super(Services.Database, 'cypress-Postgres', 'Postgres', 'order_items');
super(
Services.Database,
POSTGRES.serviceName,
POSTGRES.serviceType,
POSTGRES.tableName
);
this.filterPattern = 'sales';
this.queryLogFilePath =

View File

@ -33,6 +33,12 @@ export const REDSHIFT = {
description: `This is Redshift-ct-test-${uniqueID} description`,
};
export const POSTGRES = {
serviceType: 'Postgres',
serviceName: `cy-postgres-test-${uniqueID}`,
tableName: 'order_items',
};
export const MYSQL = {
serviceType: 'Mysql',
serviceName: `mysql-ct-test-${uniqueID}`,