Skip to content

Commit 11e7da4

Browse files
committed
Fix uninstall status detection to use Install now link
Changed from using getByTestId('status-text') filter (which wasn't finding the element) to checking for absence of "Install now" link. This matches the same simple pattern used in isAppInstalled(). Verified with complete install/uninstall cycle: - ✅ Tests pass with app not installed beforehand (performs installation) - ✅ Tests pass with app already installed (skips installation) - ✅ Uninstall correctly uses 3-dot menu pattern - ✅ No warnings or errors
1 parent b359fa3 commit 11e7da4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

e2e/src/pages/AppCatalogPage.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,12 @@ export class AppCatalogPage extends BasePage {
287287
// Search for and navigate to the app's catalog page
288288
await this.searchAndNavigateToApp(appName);
289289

290-
// Check if app is actually installed
291-
const installedStatus = this.page.getByTestId('status-text').filter({ hasText: /^Installed$/i });
292-
const isInstalled = await this.elementExists(installedStatus, 3000);
290+
// Check if app is actually installed by looking for "Install now" link
291+
// If "Install now" link exists, app is NOT installed
292+
const installLink = this.page.getByRole('link', { name: 'Install now' });
293+
const hasInstallLink = await this.elementExists(installLink, 3000);
293294

294-
if (!isInstalled) {
295+
if (hasInstallLink) {
295296
this.logger.info(`App '${appName}' is already uninstalled`);
296297
return;
297298
}

0 commit comments

Comments
 (0)