Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/minor-python-test-failure' into …
Browse files Browse the repository at this point in the history
…minor-python-test-failure
  • Loading branch information
TeddyCr committed Sep 18, 2024
2 parents c36dc0b + ac60526 commit 1705cc0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,9 @@ test.describe('Activity feed', () => {

await page.getByText('Accept Suggestion').click();

const waitForCountFetch = page.waitForResponse('/api/v1/feed/count?**');
await toastNotification(page, /Task resolved successfully/);
await waitForCountFetch;

await checkTaskCount(page, 0, 2);
});
Expand Down Expand Up @@ -366,7 +368,9 @@ test.describe('Activity feed', () => {

await page.getByText('Accept Suggestion').click();

const waitForCountFetch = page.waitForResponse('/api/v1/feed/count?**');
await toastNotification(page, /Task resolved successfully/);
await waitForCountFetch;

await checkTaskCount(page, 0, 2);
});
Expand Down Expand Up @@ -428,7 +432,9 @@ test.describe('Activity feed', () => {
await page.getByRole('menuitem', { name: 'close' }).click();
await commentWithCloseTask;

const waitForCountFetch = page.waitForResponse('/api/v1/feed/count?**');
await toastNotification(page, 'Task closed successfully.');
await waitForCountFetch;

await checkTaskCount(page, 0, 1);
});
Expand Down Expand Up @@ -460,9 +466,11 @@ test.describe('Activity feed', () => {
await page.getByTestId('request-entity-tags').click();

// create tag task
const waitForCountFetch = page.waitForResponse('/api/v1/feed/count?**');
const openTaskAfterTagResponse = page.waitForResponse(TASK_OPEN_FETCH_LINK);
await createTagTask(page, { ...value, tag: 'PII.None' });
await openTaskAfterTagResponse;
await waitForCountFetch;

// open task count after description
await checkTaskCount(page, 2, 0);
Expand All @@ -482,11 +490,9 @@ test.describe('Activity feed', () => {
await page.getByRole('menuitem', { name: 'close' }).click();
await commentWithCloseTask;

const waitForCountFetch = page.waitForResponse('/api/v1/feed/count?*');

const waitForCountFetch2 = page.waitForResponse('/api/v1/feed/count?**');
await toastNotification(page, 'Task closed successfully.');

await waitForCountFetch;
await waitForCountFetch2;

// open task count after closing one task
await checkTaskCount(page, 1, 1);
Expand Down Expand Up @@ -758,7 +764,9 @@ base.describe('Activity feed with Data Consumer User', () => {

await page2.getByText('Accept Suggestion').click();

const waitForCountFetch = page2.waitForResponse('/api/v1/feed/count?**');
await toastNotification(page2, /Task resolved successfully/);
await waitForCountFetch;

// TODO: Ashish - Enable them once issue is resolved from Backend https://github.com/open-metadata/OpenMetadata/issues/17059
// const openTask = await page2.getByTestId('open-task').textContent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const test = base.extend<{ page: Page }>({
},
});

test.describe('My Data page', () => {
test.describe.serial('My Data page', () => {
test.beforeAll('Setup pre-requests', async ({ browser }) => {
const { apiContext, afterAction } = await performAdminLogin(browser);
await user.create(apiContext);
for (const table of TableEntities) {
const tablePromises = TableEntities.map(async (table) => {
await table.create(apiContext);
await table.patch({
apiContext,
Expand All @@ -56,16 +56,18 @@ test.describe('My Data page', () => {
],
});
await table.followTable(apiContext, user.responseData.id);
}
});

await Promise.all(tablePromises);

await afterAction();
});

test.afterAll('Cleanup', async ({ browser }) => {
const { apiContext, afterAction } = await performAdminLogin(browser);
await user.delete(apiContext);
for (const table of TableEntities) {
await table.delete(apiContext);
}

await Promise.all(TableEntities.map((table) => table.delete(apiContext)));
await afterAction();
});

Expand Down

0 comments on commit 1705cc0

Please sign in to comment.