mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-26 09:55:52 +00:00
Cypress: Fixed failing cypress for role page (#8381)
* Cypress: Fixed failing cypress for role page * fixed data quality test * fixed memory getting full and cypress getting crush issue * fixed explore page getting unresponsive
This commit is contained in:
parent
80b9555ea2
commit
63f8f9a15b
@ -9,6 +9,7 @@ export default defineConfig({
|
||||
defaultCommandTimeout: 5000,
|
||||
videoUploadOnPasses: false,
|
||||
chromeWebSecurity: false,
|
||||
numTestsKeptInMemory: 0,
|
||||
e2e: {
|
||||
// We've imported your old cypress plugins here.
|
||||
// You may want to clean this up later by importing these.
|
||||
|
@ -413,14 +413,10 @@ export const visitEntityDetailsPage = (term, serviceName, entity) => {
|
||||
interceptURL('GET', '/api/v1/*/name/*', 'getEntityDetails');
|
||||
interceptURL(
|
||||
'GET',
|
||||
`/api/v1/search/query?q=*&from=*&size=*&index=${SEARCH_INDEX[entity]}`,
|
||||
`/api/v1/search/query?q=*&index=${SEARCH_INDEX[entity]}&from=*&size=**`,
|
||||
'explorePageTabSearch'
|
||||
);
|
||||
interceptURL(
|
||||
'GET',
|
||||
`/api/v1/search/suggest?q=*&index=*`,
|
||||
'searchQuery'
|
||||
);
|
||||
interceptURL('GET', `/api/v1/search/suggest?q=*&index=*`, 'searchQuery');
|
||||
interceptURL('GET', `/api/v1/search/*`, 'explorePageSearch');
|
||||
|
||||
// searching term in search box
|
||||
@ -447,8 +443,7 @@ export const visitEntityDetailsPage = (term, serviceName, entity) => {
|
||||
verifyResponseStatusCode('@explorePageSearch', 200);
|
||||
|
||||
cy.get(`[data-testid="${entity}-tab"]`).should('be.visible').click();
|
||||
cy.get(`[data-testid="${entity}-tab"]`)
|
||||
.should('be.visible')
|
||||
cy.get(`[data-testid="${entity}-tab"]`).should('be.visible');
|
||||
verifyResponseStatusCode('@explorePageTabSearch', 200);
|
||||
|
||||
cy.get(`[data-testid="${serviceName}-${term}"]`)
|
||||
|
@ -60,8 +60,6 @@ describe("Test Add role and assign it to the user", () => {
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
//Clicking outside to close the dropdown
|
||||
cy.get('.ant-card-body').click();
|
||||
//Save the role
|
||||
cy.get('[data-testid="submit-btn"]')
|
||||
.scrollIntoView()
|
||||
|
@ -13,8 +13,31 @@
|
||||
|
||||
/// <reference types="cypress" />
|
||||
|
||||
import { deleteCreatedService, descriptionBox, goToAddNewServicePage, handleIngestionRetry, interceptURL, login, mySqlConnectionInput, scheduleIngestion, testServiceCreationAndIngestion, uuid, verifyResponseStatusCode, visitEntityDetailsPage } from '../../common/common';
|
||||
import { DATA_QUALITY_SAMPLE_DATA_TABLE, DELETE_TERM, LOGIN, MYDATA_SUMMARY_OPTIONS, NEW_COLUMN_TEST_CASE, NEW_TABLE_TEST_CASE, NEW_TEST_SUITE, SERVICE_TYPE, TEAM_ENTITY } from '../../constants/constants';
|
||||
import {
|
||||
deleteCreatedService,
|
||||
descriptionBox,
|
||||
goToAddNewServicePage,
|
||||
handleIngestionRetry,
|
||||
interceptURL,
|
||||
login,
|
||||
mySqlConnectionInput,
|
||||
scheduleIngestion,
|
||||
testServiceCreationAndIngestion,
|
||||
uuid,
|
||||
verifyResponseStatusCode,
|
||||
visitEntityDetailsPage
|
||||
} from '../../common/common';
|
||||
import {
|
||||
DATA_QUALITY_SAMPLE_DATA_TABLE,
|
||||
DELETE_TERM,
|
||||
LOGIN,
|
||||
MYDATA_SUMMARY_OPTIONS,
|
||||
NEW_COLUMN_TEST_CASE,
|
||||
NEW_TABLE_TEST_CASE,
|
||||
NEW_TEST_SUITE,
|
||||
SERVICE_TYPE,
|
||||
TEAM_ENTITY
|
||||
} from '../../constants/constants';
|
||||
|
||||
const serviceType = 'Mysql';
|
||||
const serviceName = `${serviceType}-ct-test-${uuid()}`;
|
||||
@ -158,15 +181,13 @@ describe('Data Quality and Profiler should work properly', () => {
|
||||
// wait for ingestion to run
|
||||
cy.clock();
|
||||
cy.wait(10000);
|
||||
interceptURL(
|
||||
'GET',
|
||||
'/api/v1/testCase?fields=testCaseResult,testDefinition,testSuite&testSuiteId=*&limit=10',
|
||||
'testCase'
|
||||
);
|
||||
interceptURL('GET', '/api/v1/testCase?fields=*', 'testCase');
|
||||
cy.get('[data-testid="view-service-button"]')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
|
||||
verifyResponseStatusCode('@getEntityDetails', 200);
|
||||
|
||||
verifyResponseStatusCode('@testCase', 200);
|
||||
cy.contains(`${TEAM_ENTITY}_${NEW_TABLE_TEST_CASE.type}`).should(
|
||||
'be.visible'
|
||||
|
@ -11,10 +11,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { descriptionBox, interceptURL, login, uuid, verifyResponseStatusCode } from '../../common/common';
|
||||
import {
|
||||
descriptionBox,
|
||||
interceptURL,
|
||||
login,
|
||||
uuid,
|
||||
verifyResponseStatusCode
|
||||
} from '../../common/common';
|
||||
import { LOGIN } from '../../constants/constants';
|
||||
|
||||
|
||||
const roles = {
|
||||
dataConsumer: 'Data Consumer',
|
||||
dataSteward: 'Data Steward',
|
||||
@ -111,8 +116,6 @@ describe('Roles page should work properly', () => {
|
||||
.scrollIntoView()
|
||||
.should('be.visible')
|
||||
.click();
|
||||
//Clicking outside to close the dropdown
|
||||
cy.get('.ant-card-body').click();
|
||||
//Save the role
|
||||
cy.get('[data-testid="submit-btn"]')
|
||||
.scrollIntoView()
|
||||
@ -158,9 +161,9 @@ describe('Roles page should work properly', () => {
|
||||
//Navigating to roles tab to verify the added role
|
||||
cy.get('[data-testid="breadcrumb-link"]').first().click();
|
||||
cy.get('table').should('be.visible').should('contain', roleName);
|
||||
cy.get('[data-testid="plus-more-count"]')
|
||||
cy.get(`[data-row-key="${roleName}"]`)
|
||||
.find('[data-testid="plus-more-count"]')
|
||||
.should('be.visible')
|
||||
.contains('+1 more')
|
||||
.click();
|
||||
|
||||
// second policy should be visible on tooltip
|
||||
|
@ -85,17 +85,17 @@ const FacetFilter: React.FC<FacetFilterProps> = ({
|
||||
.sort(([key1], [key2]) => compareAggregationKey(key1, key2));
|
||||
}, [aggregations, filters]);
|
||||
|
||||
useEffect(
|
||||
() =>
|
||||
useEffect(() => {
|
||||
if (!isEmpty(aggregations)) {
|
||||
setAggregationsPageSize(
|
||||
Object.fromEntries(
|
||||
Object.keys(aggregations).map((k) =>
|
||||
k in aggregationsPageSize ? [k, aggregationsPageSize[k]] : [k, 5]
|
||||
)
|
||||
)
|
||||
),
|
||||
[aggregations]
|
||||
);
|
||||
}
|
||||
}, [aggregations]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -29,6 +29,7 @@ import {
|
||||
getEntityId,
|
||||
getEntityName,
|
||||
getEntityPlaceHolder,
|
||||
getNameFromFQN,
|
||||
getOwnerValue,
|
||||
getPartialNameFromTableFQN,
|
||||
} from '../../../utils/CommonUtils';
|
||||
@ -119,9 +120,7 @@ const TableDataCardV2: React.FC<TableDataCardPropsV2> = ({
|
||||
data-testid={`${getPartialNameFromTableFQN(
|
||||
source.fullyQualifiedName ?? '',
|
||||
[FqnPart.Service]
|
||||
)}-${getPartialNameFromTableFQN(source.fullyQualifiedName ?? '', [
|
||||
FqnPart.Table,
|
||||
])}`}
|
||||
)}-${getNameFromFQN(source.fullyQualifiedName ?? '')}`}
|
||||
id={`${id}Title`}
|
||||
onClick={handleLinkClick}>
|
||||
{stringToHTML(source.name)}
|
||||
|
@ -185,7 +185,7 @@ const RolesList: FC<RolesListProps> = ({ roles, fetchRoles }) => {
|
||||
data-testid="roles-list-table"
|
||||
dataSource={roles}
|
||||
pagination={false}
|
||||
rowKey="id"
|
||||
rowKey="name"
|
||||
size="small"
|
||||
/>
|
||||
{selectedRole && (
|
||||
|
Loading…
x
Reference in New Issue
Block a user