mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 04:14:34 +00:00
Minor: fixed AUT failure of main branch (#15170)
This commit is contained in:
parent
cdbcea11f6
commit
cc2d30be84
@ -10,9 +10,11 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { RETRY_TIMES } from './common';
|
||||
import { SidebarItem } from '../constants/Entity.interface';
|
||||
import { interceptURL, RETRY_TIMES, verifyResponseStatusCode } from './common';
|
||||
|
||||
const BASE_WAIT_TIME = 4000;
|
||||
let isSuccessStatus = false;
|
||||
|
||||
export const checkDataInsightSuccessStatus = (
|
||||
count = 1,
|
||||
@ -38,10 +40,29 @@ export const checkDataInsightSuccessStatus = (
|
||||
if ($ingestionStatus.text() !== 'Success') {
|
||||
cy.get('@checkRun').should('have.text', 'Success');
|
||||
|
||||
return true;
|
||||
isSuccessStatus = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
isSuccessStatus = false;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const verifyKpiChart = () => {
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/analytics/dataInsights/charts/aggregate?*',
|
||||
'dataInsightsChart'
|
||||
);
|
||||
checkDataInsightSuccessStatus();
|
||||
|
||||
cy.sidebarClick(SidebarItem.DATA_INSIGHT);
|
||||
verifyResponseStatusCode('@dataInsightsChart', 200);
|
||||
cy.get('[data-testid="search-dropdown-Team"]').should('be.visible');
|
||||
cy.get('[data-testid="search-dropdown-Tier"]').should('be.visible');
|
||||
cy.get('[data-testid="summary-card"]').should('be.visible');
|
||||
cy.get('[data-testid="kpi-card"]').should('be.visible');
|
||||
if (isSuccessStatus) {
|
||||
cy.get('#kpi-chart').scrollIntoView().should('be.visible');
|
||||
}
|
||||
};
|
||||
|
@ -625,7 +625,7 @@ export const editCreatedProperty = (propertyName) => {
|
||||
|
||||
cy.get('[data-testid="save"]').click();
|
||||
|
||||
cy.wait('@checkPatchForDescription', { timeout: 10000 });
|
||||
cy.wait('@checkPatchForDescription', { timeout: 15000 });
|
||||
|
||||
cy.get('.ant-modal-wrap').should('not.exist');
|
||||
|
||||
|
@ -22,7 +22,7 @@ import {
|
||||
interceptURL,
|
||||
verifyResponseStatusCode,
|
||||
} from '../../common/common';
|
||||
import { checkDataInsightSuccessStatus } from '../../common/DataInsightUtils';
|
||||
import { verifyKpiChart } from '../../common/DataInsightUtils';
|
||||
import { SidebarItem } from '../../constants/Entity.interface';
|
||||
import { GlobalSettingOptions } from '../../constants/settings.constant';
|
||||
|
||||
@ -39,8 +39,6 @@ const KPI_DATA = [
|
||||
},
|
||||
];
|
||||
|
||||
let isSuccessStatus = false;
|
||||
|
||||
const deleteKpiRequest = () => {
|
||||
cy.get('[data-menu-id*="kpi"]').click();
|
||||
cy.wait('@getKpi').then(({ response }) => {
|
||||
@ -141,7 +139,7 @@ describe('Data Insight feature', () => {
|
||||
cy.get('[data-testid="run-now-button"]').click();
|
||||
verifyResponseStatusCode('@triggerPipeline', 200);
|
||||
cy.reload();
|
||||
isSuccessStatus = checkDataInsightSuccessStatus();
|
||||
verifyKpiChart();
|
||||
});
|
||||
|
||||
it('Verifying Data assets tab', () => {
|
||||
@ -151,9 +149,6 @@ describe('Data Insight feature', () => {
|
||||
cy.get('[data-testid="search-dropdown-Tier"]').should('be.visible');
|
||||
cy.get('[data-testid="summary-card"]').should('be.visible');
|
||||
cy.get('[data-testid="kpi-card"]').should('be.visible');
|
||||
if (isSuccessStatus) {
|
||||
cy.get('#kpi-chart').scrollIntoView().should('be.visible');
|
||||
}
|
||||
cy.get('#entity-summary-chart').scrollIntoView().should('be.visible');
|
||||
cy.get('#PercentageOfEntitiesWithDescriptionByType-graph')
|
||||
.scrollIntoView()
|
||||
|
@ -37,7 +37,7 @@ describe('Data Insight settings page should work properly', () => {
|
||||
).click();
|
||||
verifyResponseStatusCode('@getDataInsightDetails', 200);
|
||||
cy.get('[data-testid="edit-button"]').click();
|
||||
cy.get('#cronType').click();
|
||||
cy.get('[data-testid="cron-type"]').click();
|
||||
cy.get('[title="Day"]').click();
|
||||
cy.get('[data-testid="hour-options"]').click();
|
||||
cy.get('[title="01"]').click();
|
||||
@ -82,8 +82,8 @@ describe('Data Insight settings page should work properly', () => {
|
||||
).click();
|
||||
cy.get('[data-testid="install-application"]').click();
|
||||
cy.get('[data-testid="save-button"]').click();
|
||||
cy.get('#cronType').click();
|
||||
cy.get('[title="Day"]').click();
|
||||
cy.get('[data-testid="cron-type"]').click();
|
||||
cy.get('.rc-virtual-list [title="Day"]').click();
|
||||
cy.get('[data-testid="cron-type"]').should('contain', 'Day');
|
||||
cy.get('[data-testid="deploy-button"]').click();
|
||||
verifyResponseStatusCode('@installApplication', 201);
|
||||
|
@ -119,7 +119,9 @@ const verifyEntities = ({ url }) => {
|
||||
tables.forEach((table) => {
|
||||
cy.get(
|
||||
`[data-testid="table-data-card_${table.databaseSchema}.${table.name}"]`
|
||||
).should('be.exist');
|
||||
)
|
||||
.scrollIntoView()
|
||||
.should('be.exist');
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -40,7 +40,7 @@ describe('Search Index Application', () => {
|
||||
interceptURL('PATCH', '/api/v1/apps/*', 'updateApplication');
|
||||
visitSearchApplicationPage();
|
||||
cy.get('[data-testid="edit-button"]').click();
|
||||
cy.get('#cronType').click();
|
||||
cy.get('[data-testid="cron-type"]').click();
|
||||
cy.get('[title="Day"]').click();
|
||||
cy.get('[data-testid="hour-options"]').click();
|
||||
cy.get('[title="01"]').click();
|
||||
@ -86,8 +86,8 @@ describe('Search Index Application', () => {
|
||||
cy.get('[data-testid="install-application"]').click();
|
||||
cy.get('[data-testid="save-button"]').scrollIntoView().click();
|
||||
cy.get('[data-testid="submit-btn"]').scrollIntoView().click();
|
||||
cy.get('#cronType').click();
|
||||
cy.get('[title="Day"]').click();
|
||||
cy.get('[data-testid="cron-type"]').click();
|
||||
cy.get('.rc-virtual-list [title="Day"]').click();
|
||||
cy.get('[data-testid="cron-type"]').should('contain', 'Day');
|
||||
cy.get('[data-testid="deploy-button"]').click();
|
||||
verifyResponseStatusCode('@installApplication', 201);
|
||||
|
Loading…
x
Reference in New Issue
Block a user