mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 09:22:14 +00:00
fix(test): flaky Domain.spec and Roles.spec (#21950)
* fix domain.spec * fix delete role test * minor fix
This commit is contained in:
parent
35215762cb
commit
a2154df0ec
@ -90,6 +90,8 @@ test.describe('Domains', () => {
|
||||
test.slow(true);
|
||||
|
||||
test.beforeAll('Setup pre-requests', async ({ browser }) => {
|
||||
test.slow(true);
|
||||
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await user.create(apiContext);
|
||||
await classification.create(apiContext);
|
||||
@ -116,6 +118,8 @@ test.describe('Domains', () => {
|
||||
});
|
||||
|
||||
test.afterAll('Cleanup', async ({ browser }) => {
|
||||
test.slow(true);
|
||||
|
||||
const { apiContext, afterAction } = await performAdminLogin(browser);
|
||||
await user.delete(apiContext);
|
||||
await classification.delete(apiContext);
|
||||
@ -899,6 +903,10 @@ test.describe('Data Consumer Domain Ownership', () => {
|
||||
await sidebarClick(dataConsumerPage, SidebarItem.DOMAIN);
|
||||
await selectDomain(dataConsumerPage, testResources.domainForTest.data);
|
||||
|
||||
await dataConsumerPage.locator('[data-testid="loader"]').waitFor({
|
||||
state: 'detached',
|
||||
});
|
||||
|
||||
await dataConsumerPage.getByTestId('domain-details-add-button').click();
|
||||
|
||||
// check Data Products menu item is visible
|
||||
|
@ -47,13 +47,14 @@ test.use({ storageState: 'playwright/.auth/admin.json' });
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
await redirectToHomePage(page);
|
||||
await settingClick(page, GlobalSettingOptions.ROLES);
|
||||
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
|
||||
});
|
||||
|
||||
test('Roles page should work properly', async ({ page }) => {
|
||||
test.slow(true);
|
||||
|
||||
await test.step('Add new role and check all tabs data', async () => {
|
||||
await settingClick(page, GlobalSettingOptions.ROLES);
|
||||
await page.locator('[data-testid="add-role"]').click();
|
||||
|
||||
// Asserting navigation
|
||||
@ -124,7 +125,6 @@ test('Roles page should work properly', async ({ page }) => {
|
||||
});
|
||||
|
||||
await test.step('Add new role without selecting data', async () => {
|
||||
await settingClick(page, GlobalSettingOptions.ROLES);
|
||||
await page.locator('[data-testid="add-role"]').click();
|
||||
|
||||
// Asserting navigation
|
||||
@ -299,7 +299,9 @@ test('Delete role action from manage button options', async ({ page }) => {
|
||||
|
||||
await role.create(apiContext, policies);
|
||||
|
||||
await settingClick(page, GlobalSettingOptions.ROLES);
|
||||
await page.reload();
|
||||
|
||||
await page.waitForSelector('[data-testid="loader"]', { state: 'detached' });
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
|
@ -140,6 +140,9 @@ export const selectSubDomain = async (
|
||||
);
|
||||
await page.getByTestId(subDomain.name).click();
|
||||
await res;
|
||||
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.locator('[data-testid="loader"]').waitFor({ state: 'detached' });
|
||||
};
|
||||
|
||||
export const selectDataProductFromTab = async (
|
||||
|
Loading…
x
Reference in New Issue
Block a user