Skip to content

Commit

Permalink
fix(cypress): fix restore, advance search & data insight (#14684)
Browse files Browse the repository at this point in the history
  • Loading branch information
chirag-madlani authored Jan 11, 2024
1 parent 241f3c6 commit 99b8e79
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 181 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,36 @@ export const deleteEntity = (entityName: string, endPoint: EntityType) => {

deletedEntityCommonChecks({ entityType: endPoint, deleted: true });

if (endPoint === EntityType.Table) {
interceptURL(
'GET',
'/api/v1/tables?databaseSchema=*&include=deleted',
'queryDeletedTables'
);
interceptURL(
'GET',
'/api/v1/databaseSchemas/name/*?fields=*&include=all',
'getDatabaseSchemas'
);

cy.get('[data-testid="breadcrumb-link"]').last().click();
verifyResponseStatusCode('@getDatabaseSchemas', 200);

cy.get('[data-testid="show-deleted"]')
.scrollIntoView()
.click({ waitForAnimations: true });

verifyResponseStatusCode('@queryDeletedTables', 200);

cy.get('[data-testid="table"] [data-testid="count"]').should(
'contain',
'1'
);

cy.get('.ant-table-row > :nth-child(1)').should('contain', entityName);
cy.get('.ant-table-row > :nth-child(1)').contains(entityName).click();
}

restoreEntity();
cy.reload();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ describe(`Advanced search quick filters should work properly for assets`, () =>
const querySearchURL = `/api/v1/search/query?*index=${
asset.searchIndex
}*query_filter=*should*${filter.key}*${encodeURI(
Cypress._.toLower(filter.selectOption1)
Cypress._.toLower(filter.selectOption1).replace(' ', '+')
)}*`;

interceptURL('GET', querySearchURL, 'querySearchAPI');

cy.get('[data-testid="update-btn"]')
.should('exist')
.and('be.visible')
.click();
cy.get('[data-testid="update-btn"]').click();

verifyResponseStatusCode('@querySearchAPI', 200);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ export const COMMON_DROPDOWN_ITEMS = [
label: t('label.service-type'),
key: 'serviceType',
},
{
label: t('label.column'),
key: 'columns.name.keyword',
},
];

export const TABLE_DROPDOWN_ITEMS = [
Expand Down

0 comments on commit 99b8e79

Please sign in to comment.