mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-07 05:53:46 +00:00
This reverts commit 529f2a0c58045f93cab2cda1c0d290964e3b639c.
This commit is contained in:
parent
768a8ef422
commit
563e689553
@ -101,11 +101,11 @@ test.describe('Teams drag and drop should work properly', () => {
|
|||||||
|
|
||||||
test('Add teams in hierarchy', async ({ page }) => {
|
test('Add teams in hierarchy', async ({ page }) => {
|
||||||
for (const teamDetails of DRAG_AND_DROP_TEAM_DETAILS) {
|
for (const teamDetails of DRAG_AND_DROP_TEAM_DETAILS) {
|
||||||
|
const getOrganizationResponse = page.waitForResponse(
|
||||||
|
'/api/v1/teams/name/*'
|
||||||
|
);
|
||||||
await addTeamHierarchy(page, teamDetails);
|
await addTeamHierarchy(page, teamDetails);
|
||||||
await page.waitForLoadState('networkidle');
|
await getOrganizationResponse;
|
||||||
await page.waitForSelector('[data-testid="loader"]', {
|
|
||||||
state: 'detached',
|
|
||||||
});
|
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.locator(`[data-row-key="${teamDetails.name}"]`)
|
page.locator(`[data-row-key="${teamDetails.name}"]`)
|
||||||
|
|||||||
@ -10,11 +10,9 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { expect, Page, test as base } from '@playwright/test';
|
import { expect, test } from '@playwright/test';
|
||||||
import { SidebarItem } from '../../constant/sidebar';
|
import { SidebarItem } from '../../constant/sidebar';
|
||||||
import { MetricClass } from '../../support/entity/MetricClass';
|
import { MetricClass } from '../../support/entity/MetricClass';
|
||||||
import { UserClass } from '../../support/user/UserClass';
|
|
||||||
import { performAdminLogin } from '../../utils/admin';
|
|
||||||
import { createNewPage, redirectToHomePage } from '../../utils/common';
|
import { createNewPage, redirectToHomePage } from '../../utils/common';
|
||||||
import {
|
import {
|
||||||
addMetric,
|
addMetric,
|
||||||
@ -36,24 +34,13 @@ const metric4 = new MetricClass();
|
|||||||
const metric5 = new MetricClass();
|
const metric5 = new MetricClass();
|
||||||
|
|
||||||
// use the admin user to login
|
// use the admin user to login
|
||||||
const adminUser = new UserClass();
|
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||||
|
|
||||||
const test = base.extend<{ page: Page }>({
|
|
||||||
page: async ({ browser }, use) => {
|
|
||||||
const adminPage = await browser.newPage();
|
|
||||||
await adminUser.login(adminPage);
|
|
||||||
await use(adminPage);
|
|
||||||
await adminPage.close();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
test.describe('Metric Entity Special Test Cases', () => {
|
test.describe('Metric Entity Special Test Cases', () => {
|
||||||
test.slow(true);
|
test.slow(true);
|
||||||
|
|
||||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.create(apiContext);
|
|
||||||
await adminUser.setAdminRole(apiContext);
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
metric1.create(apiContext),
|
metric1.create(apiContext),
|
||||||
@ -70,8 +57,7 @@ test.describe('Metric Entity Special Test Cases', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
test.afterAll('Cleanup', async ({ browser }) => {
|
test.afterAll('Cleanup', async ({ browser }) => {
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.delete(apiContext);
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
metric1.delete(apiContext),
|
metric1.delete(apiContext),
|
||||||
|
|||||||
@ -33,7 +33,7 @@ test.describe.serial('Data Insight Report Application', () => {
|
|||||||
await apiContext.delete(
|
await apiContext.delete(
|
||||||
'/api/v1/apps/name/DataInsightsReportApplication?hardDelete=true'
|
'/api/v1/apps/name/DataInsightsReportApplication?hardDelete=true'
|
||||||
);
|
);
|
||||||
} catch {
|
} catch (error) {
|
||||||
// Do Nothing
|
// Do Nothing
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,13 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { expect, Page, test as base } from '@playwright/test';
|
import test, { expect } from '@playwright/test';
|
||||||
import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete';
|
import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete';
|
||||||
import { EntityDataClass } from '../../support/entity/EntityDataClass';
|
import { EntityDataClass } from '../../support/entity/EntityDataClass';
|
||||||
import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface';
|
import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface';
|
||||||
import { TableClass } from '../../support/entity/TableClass';
|
import { TableClass } from '../../support/entity/TableClass';
|
||||||
import { UserClass } from '../../support/user/UserClass';
|
|
||||||
import { performAdminLogin } from '../../utils/admin';
|
|
||||||
import {
|
import {
|
||||||
|
createNewPage,
|
||||||
descriptionBoxReadOnly,
|
descriptionBoxReadOnly,
|
||||||
redirectToHomePage,
|
redirectToHomePage,
|
||||||
toastNotification,
|
toastNotification,
|
||||||
@ -52,24 +51,13 @@ const entities = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// use the admin user to login
|
// use the admin user to login
|
||||||
const adminUser = new UserClass();
|
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||||
|
|
||||||
const test = base.extend<{ page: Page }>({
|
|
||||||
page: async ({ browser }, use) => {
|
|
||||||
const adminPage = await browser.newPage();
|
|
||||||
await adminUser.login(adminPage);
|
|
||||||
await use(adminPage);
|
|
||||||
await adminPage.close();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
test.describe('Entity Version pages', () => {
|
test.describe('Entity Version pages', () => {
|
||||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||||
test.slow();
|
test.slow();
|
||||||
|
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.create(apiContext);
|
|
||||||
await adminUser.setAdminRole(apiContext);
|
|
||||||
|
|
||||||
await EntityDataClass.preRequisitesForTests(
|
await EntityDataClass.preRequisitesForTests(
|
||||||
apiContext,
|
apiContext,
|
||||||
@ -130,9 +118,7 @@ test.describe('Entity Version pages', () => {
|
|||||||
test.afterAll('Cleanup', async ({ browser }) => {
|
test.afterAll('Cleanup', async ({ browser }) => {
|
||||||
test.slow();
|
test.slow();
|
||||||
|
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.delete(apiContext);
|
|
||||||
|
|
||||||
await EntityDataClass.postRequisitesForTests(
|
await EntityDataClass.postRequisitesForTests(
|
||||||
apiContext,
|
apiContext,
|
||||||
entityCreationConfig
|
entityCreationConfig
|
||||||
|
|||||||
@ -10,13 +10,12 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { expect, Page, test as base } from '@playwright/test';
|
import test, { expect } from '@playwright/test';
|
||||||
import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete';
|
import { BIG_ENTITY_DELETE_TIMEOUT } from '../../constant/delete';
|
||||||
import { EntityDataClass } from '../../support/entity/EntityDataClass';
|
import { EntityDataClass } from '../../support/entity/EntityDataClass';
|
||||||
import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface';
|
import { EntityDataClassCreationConfig } from '../../support/entity/EntityDataClass.interface';
|
||||||
import { UserClass } from '../../support/user/UserClass';
|
|
||||||
import { performAdminLogin } from '../../utils/admin';
|
|
||||||
import {
|
import {
|
||||||
|
createNewPage,
|
||||||
descriptionBoxReadOnly,
|
descriptionBoxReadOnly,
|
||||||
redirectToHomePage,
|
redirectToHomePage,
|
||||||
toastNotification,
|
toastNotification,
|
||||||
@ -53,24 +52,13 @@ const entities = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
// use the admin user to login
|
// use the admin user to login
|
||||||
const adminUser = new UserClass();
|
test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||||
|
|
||||||
const test = base.extend<{ page: Page }>({
|
|
||||||
page: async ({ browser }, use) => {
|
|
||||||
const adminPage = await browser.newPage();
|
|
||||||
await adminUser.login(adminPage);
|
|
||||||
await use(adminPage);
|
|
||||||
await adminPage.close();
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
test.describe('Service Version pages', () => {
|
test.describe('Service Version pages', () => {
|
||||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||||
test.slow();
|
test.slow();
|
||||||
|
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.create(apiContext);
|
|
||||||
await adminUser.setAdminRole(apiContext);
|
|
||||||
|
|
||||||
await EntityDataClass.preRequisitesForTests(
|
await EntityDataClass.preRequisitesForTests(
|
||||||
apiContext,
|
apiContext,
|
||||||
@ -124,9 +112,7 @@ test.describe('Service Version pages', () => {
|
|||||||
test.afterAll('Cleanup', async ({ browser }) => {
|
test.afterAll('Cleanup', async ({ browser }) => {
|
||||||
test.slow();
|
test.slow();
|
||||||
|
|
||||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
const { apiContext, afterAction } = await createNewPage(browser);
|
||||||
await adminUser.delete(apiContext);
|
|
||||||
|
|
||||||
await EntityDataClass.postRequisitesForTests(
|
await EntityDataClass.postRequisitesForTests(
|
||||||
apiContext,
|
apiContext,
|
||||||
entityCreationConfig
|
entityCreationConfig
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user