Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions frontend/e2e/pages/base-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export async function setEditorContent(page: Page, content: string): Promise<voi
}

export async function warmupSPA(page: Page): Promise<void> {
await page.goto('/', { waitUntil: 'domcontentloaded', timeout: 60_000 });
await expect(page.getByTestId('page-heading')).toBeVisible({ timeout: 30_000 });
await expect(async () => {
await page.goto('/', { waitUntil: 'domcontentloaded', timeout: 60_000 });
await expect(page.getByTestId('page-heading')).toBeVisible({ timeout: 30_000 });
}).toPass({ intervals: [1_000, 2_000, 5_000], timeout: 90_000 });
}

export default abstract class BasePage {
Expand Down
8 changes: 7 additions & 1 deletion frontend/e2e/pages/topology-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,13 @@ export class TopologyPage extends BasePage {
}

async fillApplicationName(appName: string): Promise<void> {
await expect(this.applicationNameField).toBeVisible();
// eslint-disable-next-line no-restricted-syntax
const hasDropdown = await this.applicationDropdown.waitFor({ state: 'visible', timeout: 2_000 }).then(() => true).catch(() => false);
if (hasDropdown) {
await this.applicationDropdown.click();
await this.page.getByRole('option', { name: 'Create application' }).click();
}
await expect(this.applicationNameField).toBeVisible({ timeout: 10_000 });
await this.applicationNameField.fill(appName);
await expect(this.applicationNameField).toHaveValue(appName);
}
Expand Down
6 changes: 6 additions & 0 deletions frontend/e2e/tests/console/app/poll-console-updates.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ test.describe('PollConsoleUpdates', { tag: ['@admin'] }, () => {
await navigateAndWaitForInit(page);

updates.setHandler((route) => route.fulfill({ json: UPDATES_NEW_COMMIT }));
await page.waitForResponse((resp) => resp.url().includes('/api/check-updates'), {
timeout: 30_000,
});

await expect(page.getByTestId('refresh-web-console')).toBeVisible({ timeout: 60_000 });
});
Expand All @@ -102,6 +105,9 @@ test.describe('PollConsoleUpdates', { tag: ['@admin'] }, () => {
await navigateAndWaitForInit(page);

updates.setHandler((route) => route.fulfill({ json: UPDATES_NEW_PLUGIN }));
await page.waitForResponse((resp) => resp.url().includes('/api/check-updates'), {
timeout: 30_000,
});

await expect(page.getByTestId('refresh-web-console')).not.toBeAttached({
timeout: 30_000,
Expand Down
Loading