Skip to content

Add E2E tests for extension and workflow execution#67

Merged
mraible merged 23 commits intomainfrom
e2e-workflow-execution
Nov 13, 2025
Merged

Add E2E tests for extension and workflow execution#67
mraible merged 23 commits intomainfrom
e2e-workflow-execution

Conversation

@mraible
Copy link
Copy Markdown
Contributor

@mraible mraible commented Oct 28, 2025

Implements comprehensive E2E testing for foundry-sample-functions-python covering:

Test Coverage:

  • UI extension rendering (hello extension in detection details)
  • Workflow execution (3 workflows with full execution + parameters)
  • Workflow rendering (ServiceNow workflow without execution)
  • App installation with ServiceNow API configuration
  • App uninstallation with 3-dot menu pattern

Key Features:

  • Automatic ServiceNow configuration during installation
  • Host ID lookup for dynamic workflow parameters
  • Simple, non-over-engineered patterns
  • 8/8 tests passing in both cold start and warm start scenarios

Framework:

  • Playwright with Page Object Model
  • Semantic locators (getByRole > getByText > getByTestId)
  • Smart waiting and retry strategies
  • Comprehensive logging and error handling

All tests verified working with app both installed and uninstalled beforehand.

Implements comprehensive E2E testing covering:
- UI extension rendering (hello extension in detection details)
- Workflow execution (3 workflows with full execution + parameters)
- Workflow rendering (ServiceNow workflow without execution)
- App installation with ServiceNow API configuration
- App uninstallation with 3-dot menu pattern

Framework:
- Playwright with Page Object Model
- Semantic locators (getByRole > getByText > getByTestId)
- Smart waiting and retry strategies
- Comprehensive logging and error handling

All tests verified working with app both installed and uninstalled beforehand.
8/8 tests passing.
@mraible mraible force-pushed the e2e-workflow-execution branch from c20c448 to 4321a48 Compare October 28, 2025 01:40
- Corrected app name from category-blocking to functions-python
- Fixed APP_NAME environment variable
- Added Installation section with npm ci command
- Enhanced Test Structure section with detailed component descriptions
- Replace direct URL navigation with menu-based navigation for reliability
- Menu structure is stable while URLs can change (e.g., /activity/detections → /activity-v2/detections)
- Remove sensitive test data from comments
- Add home navigation before opening menu
- Use data-test-selector to avoid strict mode violations
- Use popout-button selector for Next-Gen SIEM menu item
- Use section-link selector for Incidents link
- Prevents matching home page cards instead of menu items
- Add Foundry home navigation before opening menu in Endpoint Detections
- Increase app uninstall success message timeout from 10s to 30s
@mraible mraible force-pushed the e2e-workflow-execution branch from 56f4b1a to 4aff7cb Compare November 4, 2025 23:54
Addresses PR feedback from Javier to avoid mixing import/require syntax
- Update AppCatalogPage waitForInstallation() to wait for both 'installing' and 'installed' toast messages sequentially
- Throw clear error if 'installing' message never appears
- Wait up to 60s for final 'installed' or 'error' message
- Detect and report installation failures immediately
Removed serial mode configuration to allow tests to run in parallel.
Tests now execute concurrently using 4 workers locally (2 in CI),
reducing overall execution time while maintaining stability.

All 5 tests passed successfully in parallel mode with no race conditions.
@mraible mraible force-pushed the e2e-workflow-execution branch from dd96e84 to 42012d9 Compare November 6, 2025 09:00
@mraible mraible merged commit 107a562 into main Nov 13, 2025
@mraible mraible deleted the e2e-workflow-execution branch November 13, 2025 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants