mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-05 20:17:07 +00:00
PLAYWRIGHT: fix the tag playwright test (#24222)
* fix the tag playwright test * minor changes
This commit is contained in:
parent
a9edab2ece
commit
2bbeace734
@ -47,20 +47,6 @@ const dataConsumerUser = new UserClass();
|
||||
const dataStewardUser = new UserClass();
|
||||
const limitedAccessUser = new UserClass();
|
||||
|
||||
const classification = new ClassificationClass({
|
||||
provider: 'system',
|
||||
mutuallyExclusive: true,
|
||||
});
|
||||
const tag = new TagClass({
|
||||
classification: classification.data.name,
|
||||
});
|
||||
const classification1 = new ClassificationClass();
|
||||
const tag1 = new TagClass({
|
||||
classification: classification1.data.name,
|
||||
});
|
||||
const user1 = new UserClass();
|
||||
const domain = new Domain();
|
||||
|
||||
const test = base.extend<{
|
||||
adminPage: Page;
|
||||
dataConsumerPage: Page;
|
||||
@ -101,33 +87,37 @@ base.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
await dataStewardUser.create(apiContext);
|
||||
await dataStewardUser.setDataStewardRole(apiContext);
|
||||
await limitedAccessUser.create(apiContext);
|
||||
await classification.create(apiContext);
|
||||
await classification1.create(apiContext);
|
||||
await tag.create(apiContext);
|
||||
await tag1.create(apiContext);
|
||||
await user1.create(apiContext);
|
||||
await domain.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
base.afterAll('Cleanup', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await adminUser.delete(apiContext);
|
||||
await dataConsumerUser.delete(apiContext);
|
||||
await dataStewardUser.delete(apiContext);
|
||||
await limitedAccessUser.delete(apiContext);
|
||||
await classification.delete(apiContext);
|
||||
await classification1.delete(apiContext);
|
||||
await tag.delete(apiContext);
|
||||
await tag1.delete(apiContext);
|
||||
await user1.delete(apiContext);
|
||||
await domain.delete?.(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test.describe('Tag Page with Admin Roles', () => {
|
||||
const classification = new ClassificationClass({
|
||||
provider: 'system',
|
||||
mutuallyExclusive: true,
|
||||
});
|
||||
const tag = new TagClass({
|
||||
classification: classification.data.name,
|
||||
});
|
||||
const classification1 = new ClassificationClass();
|
||||
const tag1 = new TagClass({
|
||||
classification: classification1.data.name,
|
||||
});
|
||||
const user1 = new UserClass();
|
||||
const domain = new Domain();
|
||||
|
||||
test.slow(true);
|
||||
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await classification.create(apiContext);
|
||||
await classification1.create(apiContext);
|
||||
await tag.create(apiContext);
|
||||
await tag1.create(apiContext);
|
||||
await user1.create(apiContext);
|
||||
await domain.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test('Verify Tag UI', async ({ adminPage }) => {
|
||||
await verifyTagPageUI(adminPage, classification.data.name, tag);
|
||||
});
|
||||
@ -328,6 +318,21 @@ test.describe('Tag Page with Admin Roles', () => {
|
||||
test.describe('Tag Page with Data Consumer Roles', () => {
|
||||
test.slow(true);
|
||||
|
||||
const classification = new ClassificationClass({
|
||||
provider: 'system',
|
||||
mutuallyExclusive: true,
|
||||
});
|
||||
const tag = new TagClass({
|
||||
classification: classification.data.name,
|
||||
});
|
||||
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await classification.create(apiContext);
|
||||
await tag.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test('Verify Tag UI for Data Consumer', async ({ dataConsumerPage }) => {
|
||||
await verifyTagPageUI(
|
||||
dataConsumerPage,
|
||||
@ -346,7 +351,7 @@ test.describe('Tag Page with Data Consumer Roles', () => {
|
||||
test('Edit Tag Description for Data Consumer', async ({
|
||||
dataConsumerPage,
|
||||
}) => {
|
||||
await editTagPageDescription(dataConsumerPage, tag1);
|
||||
await editTagPageDescription(dataConsumerPage, tag);
|
||||
});
|
||||
|
||||
test('Add and Remove Assets for Data Consumer', async ({
|
||||
@ -370,6 +375,21 @@ test.describe('Tag Page with Data Consumer Roles', () => {
|
||||
test.describe('Tag Page with Data Steward Roles', () => {
|
||||
test.slow(true);
|
||||
|
||||
const classification = new ClassificationClass({
|
||||
provider: 'system',
|
||||
mutuallyExclusive: true,
|
||||
});
|
||||
const tag = new TagClass({
|
||||
classification: classification.data.name,
|
||||
});
|
||||
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await classification.create(apiContext);
|
||||
await tag.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test('Verify Tag UI for Data Steward', async ({ dataStewardPage }) => {
|
||||
await verifyTagPageUI(dataStewardPage, classification.data.name, tag, true);
|
||||
});
|
||||
@ -381,7 +401,7 @@ test.describe('Tag Page with Data Steward Roles', () => {
|
||||
});
|
||||
|
||||
test('Edit Tag Description for Data Steward', async ({ dataStewardPage }) => {
|
||||
await editTagPageDescription(dataStewardPage, tag1);
|
||||
await editTagPageDescription(dataStewardPage, tag);
|
||||
});
|
||||
|
||||
test('Add and Remove Assets for Data Steward', async ({
|
||||
@ -405,6 +425,21 @@ test.describe('Tag Page with Data Steward Roles', () => {
|
||||
test.describe('Tag Page with Limited EditTag Permission', () => {
|
||||
test.slow(true);
|
||||
|
||||
const classification = new ClassificationClass({
|
||||
provider: 'system',
|
||||
mutuallyExclusive: true,
|
||||
});
|
||||
const tag = new TagClass({
|
||||
classification: classification.data.name,
|
||||
});
|
||||
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await classification.create(apiContext);
|
||||
await tag.create(apiContext);
|
||||
await afterAction();
|
||||
});
|
||||
|
||||
test('Add and Remove Assets and Check Restricted Entity', async ({
|
||||
adminPage,
|
||||
limitedAccessPage,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user