Skip to content
Open
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
26 changes: 13 additions & 13 deletions e2e/src/pages/RapidResponseHomePage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class RapidResponseHomePage extends BasePage {
await this.page.keyboard.press('Enter');

// Wait for search results to load
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

// Check if app exists in catalog
const appLink = this.page.getByRole('link', { name: appName, exact: true });
Expand All @@ -208,12 +208,12 @@ export class RapidResponseHomePage extends BasePage {
// Try refresh and retry
this.logger.debug(`App not immediately visible, refreshing...`);
await this.page.reload();
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

const refreshedSearchBox = this.page.getByRole('searchbox', { name: 'Search' });
await refreshedSearchBox.fill(appName);
await this.page.keyboard.press('Enter');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

const refreshedAppLink = this.page.getByRole('link', { name: appName, exact: true });
await expect(refreshedAppLink).toBeVisible({ timeout: 10000 });
Expand All @@ -235,7 +235,7 @@ export class RapidResponseHomePage extends BasePage {
this.logger.step('Checking app installation status');

// Wait for page to be fully loaded
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(2000);

// Check if app is already installed by looking for "Installed" status indicator
Expand Down Expand Up @@ -403,7 +403,7 @@ export class RapidResponseHomePage extends BasePage {

// Fallback: Try App manager approach
await this.navigateToPath('/foundry/app-manager', 'App manager page');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

const appLink = this.page.getByRole('link', { name: appName, exact: true });

Expand Down Expand Up @@ -435,7 +435,7 @@ export class RapidResponseHomePage extends BasePage {
this.logger.step('Attempting navigation via Custom apps menu');

await this.navigateToPath('/foundry/home', 'Foundry home page');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

// Retry with page refresh if Custom apps menu or app button doesn't appear
const appName = config.appName;
Expand All @@ -444,7 +444,7 @@ export class RapidResponseHomePage extends BasePage {
const menuButton = this.page.getByTestId('nav-trigger');
await menuButton.waitFor({ state: 'visible', timeout: 30000 });
await menuButton.click();
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

const customAppsButton = this.page.getByRole('button', { name: 'Custom apps' });
try {
Expand All @@ -455,7 +455,7 @@ export class RapidResponseHomePage extends BasePage {
} catch (e) {
this.logger.warn(`Custom apps not visible on attempt ${attempt}, refreshing page...`);
await this.page.reload();
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(3000);
continue;
}
Expand All @@ -470,7 +470,7 @@ export class RapidResponseHomePage extends BasePage {
} catch (e) {
this.logger.warn(`App '${appName}' not in Custom apps on attempt ${attempt}, refreshing page...`);
await this.page.reload();
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(3000);
}
}
Expand Down Expand Up @@ -501,7 +501,7 @@ export class RapidResponseHomePage extends BasePage {
*/
async navigateToAllJobs(): Promise<void> {
this.logger.step('Navigate to All Jobs page');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(2000);

// The app content is in an iframe - find it first
Expand All @@ -522,7 +522,7 @@ export class RapidResponseHomePage extends BasePage {
*/
async navigateToRunHistory(): Promise<void> {
this.logger.step('Navigate to Run History page');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(2000);

// The app content is in an iframe - find it first
Expand All @@ -543,7 +543,7 @@ export class RapidResponseHomePage extends BasePage {
*/
async navigateToAuditLog(): Promise<void> {
this.logger.step('Navigate to Audit Log page');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');
await this.waiter.delay(2000);

// The app content is in an iframe - find it first
Expand Down Expand Up @@ -575,7 +575,7 @@ export class RapidResponseHomePage extends BasePage {
const searchBox = this.page.getByRole('searchbox', { name: 'Search' });
await searchBox.fill(appName);
await this.page.keyboard.press('Enter');
await this.page.waitForLoadState('networkidle');
await this.page.waitForLoadState('domcontentloaded');

// Find the app link
const appLink = this.page.getByRole('link', { name: appName, exact: true });
Expand Down
Loading