mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-05 20:17:07 +00:00
fix(e2e): remove data insight report if already present (#17654)
(cherry picked from commit 183da3f2b174fb823fe5c46805cbac42fc823997)
This commit is contained in:
parent
7e4a06af34
commit
4f9b0cd067
@ -13,6 +13,7 @@
|
||||
import { expect, test } from '@playwright/test';
|
||||
import { GlobalSettingOptions } from '../../constant/settings';
|
||||
import {
|
||||
createNewPage,
|
||||
getApiContext,
|
||||
redirectToHomePage,
|
||||
toastNotification,
|
||||
@ -22,6 +23,24 @@ import { settingClick } from '../../utils/sidebar';
|
||||
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||
|
||||
test.describe.serial('Data Insight Report Application', () => {
|
||||
test.beforeAll(
|
||||
'remove Data insight report application if exists',
|
||||
async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await createNewPage(browser);
|
||||
try {
|
||||
await apiContext.get('/api/v1/apps/name/DataInsightsReportApplication');
|
||||
|
||||
await apiContext.delete(
|
||||
'/api/v1/apps/name/DataInsightsReportApplication?hardDelete=true'
|
||||
);
|
||||
} catch (error) {
|
||||
// Do Nothing
|
||||
}
|
||||
|
||||
await afterAction();
|
||||
}
|
||||
);
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await redirectToHomePage(page);
|
||||
|
||||
@ -46,6 +65,8 @@ test.describe.serial('Data Insight Report Application', () => {
|
||||
await page.click('[data-value="5"]');
|
||||
await page.click('[data-testid="deploy-button"]');
|
||||
|
||||
await toastNotification(page, 'Application installed successfully');
|
||||
|
||||
await expect(
|
||||
page.locator('[data-testid="data-insights-report-application-card"]')
|
||||
).toBeVisible();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user