diff --git a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts index 8f439fb6fac..0bd5c38344a 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/e2e/Pages/DataInsightSettings.spec.ts @@ -11,9 +11,13 @@ * limitations under the License. */ +import { + customFormatDateTime, + getCurrentMillis, + getEpochMillisForFutureDays, +} from '../../../src/utils/date-time/DateTimeUtils'; import { interceptURL, verifyResponseStatusCode } from '../../common/common'; import { checkDataInsightSuccessStatus } from '../../common/DataInsightUtils'; -import { BASE_URL } from '../../constants/constants'; import { GlobalSettingOptions } from '../../constants/settings.constant'; describe( @@ -89,6 +93,23 @@ describe( ).click(); cy.get('[data-testid="install-application"]').click(); cy.get('[data-testid="save-button"]').click(); + + cy.get('#root\\/backfillConfiguration\\/enabled').click(); + + const startDate = customFormatDateTime(getCurrentMillis(), 'yyyy-MM-dd'); + const endDate = customFormatDateTime( + getEpochMillisForFutureDays(5), + 'yyyy-MM-dd' + ); + cy.get('#root\\/backfillConfiguration\\/startDate') + .click() + .type(`${startDate}`); + cy.get('#root\\/backfillConfiguration\\/endDate') + .click() + .type(`${endDate}`); + + cy.get('[data-testid="submit-btn"]').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'); @@ -106,11 +127,6 @@ describe( '/api/v1/apps/name/DataInsightsApplication?fields=*', 'getDataInsightDetails' ); - interceptURL( - 'POST', - '/api/v1/apps/deploy/DataInsightsApplication', - 'deploy' - ); interceptURL( 'POST', '/api/v1/apps/trigger/DataInsightsApplication', @@ -120,20 +136,18 @@ describe( '[data-testid="data-insights-application-card"] [data-testid="config-btn"]' ).click(); verifyResponseStatusCode('@getDataInsightDetails', 200); - cy.get('[data-testid="deploy-button"]').click(); - verifyResponseStatusCode('@deploy', 200); - cy.reload(); - verifyResponseStatusCode('@getDataInsightDetails', 200); - // Adding a manual wait to allow some time between deploying the pipeline and triggering it - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.wait(2000); cy.get('[data-testid="run-now-button"]').click(); verifyResponseStatusCode('@triggerPipeline', 200); cy.reload(); checkDataInsightSuccessStatus(); cy.get('[data-testid="logs"]').click(); - cy.url().should('eq', `${BASE_URL}/apps/DataInsightsApplication/logs`); + + cy.get('[data-testid="stats-component"]').contains('Success'); + + cy.get('[data-testid="app-entity-stats-history-table"]').should( + 'be.visible' + ); }); } ); diff --git a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts index 89844e61a0e..61acba1ca6b 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/Glossary.spec.ts @@ -385,6 +385,8 @@ test.describe('Glossary tests', () => { }); test('Rename Glossary Term and verify assets', async ({ browser }) => { + test.slow(); + const { page, afterAction, apiContext } = await performAdminLogin(browser); const table = new TableClass(); const topic = new TopicClass(); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.component.tsx index 5ca02aed787..126af27437b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.component.tsx @@ -11,6 +11,7 @@ * limitations under the License. */ +import Icon from '@ant-design/icons/lib/components/Icon'; import { Badge, Button, @@ -22,11 +23,11 @@ import { Table, Typography, } from 'antd'; -import { isEmpty, isNil } from 'lodash'; +import { capitalize, isEmpty, isNil } from 'lodash'; import React, { useCallback, useMemo } from 'react'; import { useTranslation } from 'react-i18next'; import { LazyLog } from 'react-lazylog'; -import { ReactComponent as IconSuccessBadge } from '../../../../assets/svg/success-badge.svg'; +import { ICON_DIMENSION, STATUS_ICON } from '../../../../constants/constants'; import { getEntityStatsData } from '../../../../utils/ApplicationUtils'; import { formatDateTimeWithTimezone } from '../../../../utils/date-time/DateTimeUtils'; import { formatJsonString } from '../../../../utils/StringsUtils'; @@ -42,7 +43,7 @@ import { const AppLogsViewer = ({ data }: AppLogsViewerProps) => { const { t } = useTranslation(); - const { successContext, failureContext, timestamp } = data; + const { successContext, failureContext, timestamp, status } = data; const handleJumpToEnd = () => { const logsBody = document.getElementsByClassName( @@ -101,8 +102,11 @@ const AppLogsViewer = ({ data }: AppLogsViewerProps) => { )}:`} - - {t('label.success')} + + {capitalize(status)} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.test.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.test.tsx index 59bf41ccfba..ca2c9a393d7 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.test.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Settings/Applications/AppLogsViewer/AppLogsViewer.test.tsx @@ -13,6 +13,7 @@ import { render, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import React from 'react'; +import { ReactComponent as IconSuccessBadge } from '../../../../assets/svg/success-badge.svg'; import { ScheduleTimeline, Status, @@ -55,6 +56,16 @@ jest.mock('../../../common/Badge/Badge.component', () => }) ); +jest.mock('../../../../constants/constants', () => ({ + ICON_DIMENSION: { + with: 14, + height: 14, + }, + STATUS_ICON: { + success: IconSuccessBadge, + }, +})); + const mockProps1 = { data: { appId: '6e4d3dcf-238d-4874-b4e4-dd863ede6544', @@ -175,7 +186,7 @@ describe('AppLogsViewer component', () => { render(); expect(screen.getByText('label.status:')).toBeInTheDocument(); - expect(screen.getByText('label.success')).toBeInTheDocument(); + expect(screen.getByText('Success')).toBeInTheDocument(); expect(screen.getByText('label.index-states:')).toBeInTheDocument(); expect(screen.getAllByText('Badge')).toHaveLength(3); expect(screen.getByText('label.last-updated:')).toBeInTheDocument(); diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts index 6c7d08c59b3..6a1cfff8956 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/constants.ts @@ -15,6 +15,9 @@ import { t } from 'i18next'; import { isUndefined } from 'lodash'; import Qs from 'qs'; import { CSSProperties } from 'react'; +import { ReactComponent as IconCompleteBadge } from '../assets/svg/complete.svg'; +import { ReactComponent as IconFailedBadge } from '../assets/svg/fail-badge.svg'; +import { ReactComponent as IconSuccessBadge } from '../assets/svg/success-badge.svg'; import { COOKIE_VERSION } from '../components/Modals/WhatsNewModal/whatsNewData'; import { EntityTabs, EntityType } from '../enums/entity.enum'; import { getPartialNameFromFQN } from '../utils/CommonUtils'; @@ -579,3 +582,9 @@ export const COMMON_ICON_STYLES: CSSProperties = { export const APPLICATION_JSON_CONTENT_TYPE_HEADER = { headers: { 'Content-type': 'application/json' }, }; + +export const STATUS_ICON = { + success: IconSuccessBadge, + failed: IconFailedBadge, + completed: IconCompleteBadge, +};