mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-03 12:08:31 +00:00
fix cypress and some ui issues (#12861)
Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com>
This commit is contained in:
parent
8e4388c35e
commit
d02487f4cf
@ -475,7 +475,8 @@ export const visitEntityDetailsPage = (
|
|||||||
serviceName,
|
serviceName,
|
||||||
entity,
|
entity,
|
||||||
dataTestId,
|
dataTestId,
|
||||||
entityType
|
entityType,
|
||||||
|
count = 0
|
||||||
) => {
|
) => {
|
||||||
interceptURL('GET', '/api/v1/*/name/*', 'getEntityDetails');
|
interceptURL('GET', '/api/v1/*/name/*', 'getEntityDetails');
|
||||||
interceptURL(
|
interceptURL(
|
||||||
@ -486,7 +487,7 @@ export const visitEntityDetailsPage = (
|
|||||||
interceptURL(
|
interceptURL(
|
||||||
'GET',
|
'GET',
|
||||||
`/api/v1/search/suggest?q=*&index=*`,
|
`/api/v1/search/suggest?q=*&index=*`,
|
||||||
`searchQuery-${entity}`
|
`searchQuery-${entity}-${count}`
|
||||||
);
|
);
|
||||||
interceptURL('GET', `/api/v1/search/*`, 'explorePageSearch');
|
interceptURL('GET', `/api/v1/search/*`, 'explorePageSearch');
|
||||||
const id = dataTestId ?? `${serviceName}-${term}`;
|
const id = dataTestId ?? `${serviceName}-${term}`;
|
||||||
@ -499,7 +500,7 @@ export const visitEntityDetailsPage = (
|
|||||||
// searching term in search box
|
// searching term in search box
|
||||||
cy.get('[data-testid="searchBox"]').scrollIntoView().should('be.visible');
|
cy.get('[data-testid="searchBox"]').scrollIntoView().should('be.visible');
|
||||||
cy.get('[data-testid="searchBox"]').type(term);
|
cy.get('[data-testid="searchBox"]').type(term);
|
||||||
verifyResponseStatusCode(`@searchQuery-${entity}`, 200);
|
verifyResponseStatusCode(`@searchQuery-${entity}-${count}`, 200);
|
||||||
cy.get('body').then(($body) => {
|
cy.get('body').then(($body) => {
|
||||||
// checking if requested term is available in search suggestion
|
// checking if requested term is available in search suggestion
|
||||||
if ($body.find(`[data-testid="${id}"] [data-testid="data-name"]`).length) {
|
if ($body.find(`[data-testid="${id}"] [data-testid="data-name"]`).length) {
|
||||||
|
|||||||
@ -211,7 +211,10 @@ describe('DataConsumer Edit policy should work properly', () => {
|
|||||||
visitEntityDetailsPage(
|
visitEntityDetailsPage(
|
||||||
ENTITIES.table.term,
|
ENTITIES.table.term,
|
||||||
ENTITIES.table.serviceName,
|
ENTITIES.table.serviceName,
|
||||||
ENTITIES.table.entity
|
ENTITIES.table.entity,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('[data-testid="add-tag"]')
|
cy.get('[data-testid="add-tag"]')
|
||||||
@ -225,7 +228,10 @@ describe('DataConsumer Edit policy should work properly', () => {
|
|||||||
visitEntityDetailsPage(
|
visitEntityDetailsPage(
|
||||||
ENTITIES.dashboard.term,
|
ENTITIES.dashboard.term,
|
||||||
ENTITIES.dashboard.serviceName,
|
ENTITIES.dashboard.serviceName,
|
||||||
ENTITIES.dashboard.entity
|
ENTITIES.dashboard.entity,
|
||||||
|
undefined,
|
||||||
|
undefined,
|
||||||
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
cy.get('[data-testid="add-tag"]')
|
cy.get('[data-testid="add-tag"]')
|
||||||
|
|||||||
@ -163,7 +163,15 @@ const ActivityFeedCard: FC<ActivityFeedCardProp> = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className={classNames(className)} ref={containerRef}>
|
<div
|
||||||
|
className={classNames(
|
||||||
|
className,
|
||||||
|
'bg-grey-1-hover m--x-sm p-x-sm m--t-xss py-2 m-b-xss rounded-4',
|
||||||
|
{
|
||||||
|
'bg-grey-1-hover': visible,
|
||||||
|
}
|
||||||
|
)}
|
||||||
|
ref={containerRef}>
|
||||||
<Popover
|
<Popover
|
||||||
align={{ targetOffset: [0, -16] }}
|
align={{ targetOffset: [0, -16] }}
|
||||||
content={
|
content={
|
||||||
|
|||||||
@ -244,7 +244,7 @@ const Appbar: React.FC = (): JSX.Element => {
|
|||||||
<div className="text-grey-muted text-xs">{name}</div>
|
<div className="text-grey-muted text-xs">{name}</div>
|
||||||
{userRoleArr.map((userRole, i) => (
|
{userRoleArr.map((userRole, i) => (
|
||||||
<Typography.Paragraph
|
<Typography.Paragraph
|
||||||
className="ant-typography-ellipsis-custom font-normal"
|
className="ant-typography-ellipsis-custom font-normal m-b-0"
|
||||||
ellipsis={{ tooltip: true }}
|
ellipsis={{ tooltip: true }}
|
||||||
key={i}>
|
key={i}>
|
||||||
{userRole}
|
{userRole}
|
||||||
@ -287,7 +287,7 @@ const Appbar: React.FC = (): JSX.Element => {
|
|||||||
data-testid="user-name"
|
data-testid="user-name"
|
||||||
to={getUserPath(currentUser?.name as string)}>
|
to={getUserPath(currentUser?.name as string)}>
|
||||||
<Typography.Paragraph
|
<Typography.Paragraph
|
||||||
className="ant-typography-ellipsis-custom font-medium cursor-pointer text-link-color"
|
className="ant-typography-ellipsis-custom font-medium cursor-pointer text-link-color m-b-0"
|
||||||
ellipsis={{ rows: 1, tooltip: true }}>
|
ellipsis={{ rows: 1, tooltip: true }}>
|
||||||
{name}
|
{name}
|
||||||
</Typography.Paragraph>
|
</Typography.Paragraph>
|
||||||
@ -336,7 +336,7 @@ const Appbar: React.FC = (): JSX.Element => {
|
|||||||
</span>
|
</span>
|
||||||
{teams.map((t, i) => (
|
{teams.map((t, i) => (
|
||||||
<Typography.Paragraph
|
<Typography.Paragraph
|
||||||
className="ant-typography-ellipsis-custom text-sm"
|
className="ant-typography-ellipsis-custom text-sm m-b-0"
|
||||||
ellipsis={{ tooltip: true }}
|
ellipsis={{ tooltip: true }}
|
||||||
key={i}>
|
key={i}>
|
||||||
<Link to={getTeamAndUserDetailsPath(t.name as string)}>
|
<Link to={getTeamAndUserDetailsPath(t.name as string)}>
|
||||||
@ -364,7 +364,7 @@ const Appbar: React.FC = (): JSX.Element => {
|
|||||||
dropDownOption.push({
|
dropDownOption.push({
|
||||||
label: (
|
label: (
|
||||||
<Typography.Link
|
<Typography.Link
|
||||||
className="ant-typography-ellipsis-custom text-sm"
|
className="ant-typography-ellipsis-custom text-sm m-b-0"
|
||||||
onClick={onLogoutHandler}>
|
onClick={onLogoutHandler}>
|
||||||
{t('label.logout')}
|
{t('label.logout')}
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
|
|||||||
@ -248,6 +248,11 @@ a[href].link-text-grey,
|
|||||||
.bg-grey-4 {
|
.bg-grey-4 {
|
||||||
background-color: @grey-4;
|
background-color: @grey-4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-grey-1-hover:hover {
|
||||||
|
background-color: @grey-1;
|
||||||
|
}
|
||||||
|
|
||||||
.bg-white {
|
.bg-white {
|
||||||
background-color: @white;
|
background-color: @white;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,6 +93,11 @@
|
|||||||
.m--r-7 {
|
.m--r-7 {
|
||||||
margin-right: -28px;
|
margin-right: -28px;
|
||||||
}
|
}
|
||||||
|
.m--x-sm {
|
||||||
|
margin-left: -@margin-sm;
|
||||||
|
margin-right: -@margin-sm;
|
||||||
|
}
|
||||||
|
|
||||||
.m--x-6 {
|
.m--x-6 {
|
||||||
margin-left: -1.5rem /* -24px */;
|
margin-left: -1.5rem /* -24px */;
|
||||||
margin-right: -1.5rem /* -24px */;
|
margin-right: -1.5rem /* -24px */;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user