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