Skip to content

Commit 92934d3

Browse files
committed
Add E2E testing framework for workflow verification
- Add Playwright E2E test suite - Add WorkflowsPage for verifying workflows exist in Fusion SOAR - Tests verify both ServiceNow IDP workflows are deployed - Update manifest to ignore e2e directory
1 parent 50bf894 commit 92934d3

23 files changed

+2395
-8
lines changed

e2e/.env.sample

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Falcon Authentication
2+
FALCON_USERNAME=[email protected]
3+
FALCON_PASSWORD=your-password
4+
FALCON_AUTH_SECRET=your-totp-secret
5+
FALCON_BASE_URL=https://falcon.us-2.crowdstrike.com
6+
7+
# App Configuration
8+
APP_NAME=foundry-sample-servicenow-idp

e2e/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# .dotenvx
2+
.env
3+
.env.keys
4+
5+
# IntelliJ IDEA
6+
.idea
7+
8+
# Playwright
9+
node_modules/
10+
/test-results/
11+
/playwright/
12+
/playwright-report/
13+
/blob-report/
14+
/playwright/.cache/

e2e/README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# E2E Tests
2+
3+
End-to-end tests for the ServiceNow IDP Foundry app using Playwright.
4+
5+
## Tests Included
6+
7+
- **Workflow Verification**: Verifies that the app's workflows are deployed and accessible in Fusion SOAR
8+
9+
## About This App
10+
11+
This app synchronizes ServiceNow Configuration Management Database (CMDB) configuration rules with Identity Protection policies. It includes two workflows for synchronizing policy rules and managing checkpoints. The E2E tests verify that both workflows are properly deployed and discoverable.
12+
13+
## Setup
14+
15+
```bash
16+
npm ci
17+
npx playwright install chromium
18+
cp .env.sample .env
19+
# Edit .env with your credentials
20+
```
21+
22+
## Run Tests
23+
24+
```bash
25+
npm test # All tests
26+
npm run test:debug # Debug mode
27+
npm run test:ui # Interactive UI
28+
```
29+
30+
## Environment Variables
31+
32+
```env
33+
APP_NAME=foundry-sample-servicenow-idp
34+
FALCON_BASE_URL=https://falcon.us-2.crowdstrike.com
35+
FALCON_USERNAME=your-username
36+
FALCON_PASSWORD=your-password
37+
FALCON_AUTH_SECRET=your-mfa-secret
38+
```
39+
40+
**Important:** The `APP_NAME` must exactly match the app name as deployed in Falcon.
41+
42+
## Test Flow
43+
44+
1. **Setup**: Authenticates and installs the app
45+
2. **Workflow Verification**:
46+
- Searches for both workflows
47+
- Verifies both workflows are discoverable in Fusion SOAR
48+
3. **Teardown**: Uninstalls the app
49+
50+
## CI/CD
51+
52+
Tests run automatically in GitHub Actions on push/PR to main. The workflow deploys the app, runs tests, and cleans up.

e2e/constants/AuthFile.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const AuthFile = 'playwright/.auth/user.json';

0 commit comments

Comments
 (0)