Files
openobserve/tests/test-data/sample_pipeline_template.json
Shrinath Rao 6ae38d5ce2 test(e2e): refactor pipeline condition tests and fix data ingestion timeout (#9528)
## Summary
Refactored pipeline condition tests into 2 new spec files for better
organization and maintainability, fixed data ingestion timeout issue,
and added comprehensive test coverage for pipeline conditions.

## Changes
- Refactored pipeline condition tests into 2 new spec files for better
organization
- Added 14 new comprehensive test cases (7 UI-based + 7 API-based
validation tests)
- Fixed beforeEach timeout issue by reducing data ingestion from 3,800+
to 10 records per stream
- Added cleanup patterns for `e2e_conditions_*` streams to prevent data
accumulation
- Updated apiCleanup.js to include 7 new stream names in pipeline
cleanup
- Removed outdated comments referencing conditional wait logic
- Added page object methods for condition testing in pipelinesPage.js,
logsPage.js, and streamsPage.js

## Test Coverage

### pipeline-conditions.spec.js (7 tests - all passing ✅)
- Basic condition operations with multiple operators (=, !=, Contains,
NotContains, >=)
- Condition groups, nesting, and reordering
- Field validation and error messages
- Complex operator precedence (A OR B AND C)
- Multiple conditions (A, B, C, D)
- Condition node deletion
- Comparison operators validation

### pipeline-conditions-validation.spec.js (7 tests - API-based)
- Operator precedence validation
- Nested groups with AND/OR logic
- Numeric comparisons
- String operators (case-insensitive Contains)

## Performance
- Reduced test execution time from 180s timeout to ~4.6 minutes for full
suite
- 100% pass rate for active UI tests (7/7)

## Files Changed
- `.github/workflows/playwright.yml` - Updated test configuration
- `tests/test-data/data_100.json` - Added test data for validation tests
- `tests/test-data/sample_pipeline_template.json` - Added pipeline
template
- `tests/ui-testing/pages/apiCleanup.js` - Added stream cleanup patterns
- `tests/ui-testing/pages/pipelinesPages/pipelinesPage.js` - Added
condition testing methods
- `tests/ui-testing/pages/logsPages/logsPage.js` - Added data ingestion
helpers
- `tests/ui-testing/pages/streamsPages/streamsPage.js` - Added stream
management helpers
-
`tests/ui-testing/playwright-tests/Pipelines/pipeline-conditions.spec.js`
- Refactored UI tests
-
`tests/ui-testing/playwright-tests/Pipelines/pipeline-conditions-validation.spec.js`
- New API validation tests
- `tests/ui-testing/playwright-tests/cleanup.spec.js` - Added
e2e_conditions_* pattern

## Testing
All 7 UI-based tests passing with 100% pass rate.
2025-12-09 15:49:28 +05:30

180 lines
4.5 KiB
JSON

{
"pipeline_id": "7402696020770947072",
"version": 0,
"enabled": true,
"org": "default",
"name": "test",
"description": "",
"source": {
"source_type": "realtime",
"org_id": "default",
"stream_name": "default",
"stream_type": "logs"
},
"nodes": [
{
"id": "9aab959a-0d22-42a4-be84-f15488862bfa",
"data": {
"node_type": "stream",
"org_id": "default",
"stream_name": "default",
"stream_type": "logs"
},
"position": {
"x": 597,
"y": 222.5
},
"io_type": "input"
},
{
"id": "95c8ef15-2b44-4ba7-87c8-efc28b0d7b59",
"data": {
"node_type": "stream",
"org_id": "default",
"stream_name": "default",
"stream_type": "logs"
},
"position": {
"x": 602.5,
"y": 537.5
},
"io_type": "output"
},
{
"id": "c160107d-ba19-427d-8e9b-95cca5973373",
"data": {
"node_type": "condition",
"version": 2,
"conditions": {
"filterType": "group",
"logicalOperator": "AND",
"conditions": [
{
"filterType": "condition",
"column": "code",
"operator": "=",
"value": "test",
"logicalOperator": "AND"
},
{
"filterType": "condition",
"column": "code",
"operator": ">=",
"value": "test",
"logicalOperator": "OR"
},
{
"filterType": "condition",
"column": "code",
"operator": "contains",
"value": "test",
"logicalOperator": "AND"
},
{
"filterType": "condition",
"column": "",
"operator": "=",
"value": "",
"logicalOperator": "AND"
},
{
"filterType": "condition",
"column": "field",
"operator": "=",
"value": "rrewt",
"logicalOperator": "AND"
},
{
"filterType": "group",
"logicalOperator": "OR",
"conditions": [
{
"filterType": "condition",
"column": "code",
"operator": "<=",
"value": "test",
"logicalOperator": "OR"
},
{
"filterType": "condition",
"column": "code",
"operator": ">",
"value": "test",
"logicalOperator": "OR"
},
{
"filterType": "condition",
"column": "code",
"operator": "<",
"value": "test",
"logicalOperator": "AND"
}
]
},
{
"filterType": "group",
"logicalOperator": "AND",
"conditions": [
{
"filterType": "condition",
"column": "code",
"operator": "not_contains",
"value": "test",
"logicalOperator": "OR"
}
]
}
]
}
},
"position": {
"x": 206.75,
"y": 392.5
},
"io_type": "default"
}
],
"edges": [
{
"id": "e9aab959a-0d22-42a4-be84-f15488862bfa-c160107d-ba19-427d-8e9b-95cca5973373",
"source": "9aab959a-0d22-42a4-be84-f15488862bfa",
"target": "c160107d-ba19-427d-8e9b-95cca5973373",
"markerEnd": {
"type": "arrowclosed",
"width": 20,
"height": 20
},
"type": "custom",
"style": {
"strokeWidth": 2
},
"animated": true,
"updatable": true
},
{
"id": "ec160107d-ba19-427d-8e9b-95cca5973373-95c8ef15-2b44-4ba7-87c8-efc28b0d7b59",
"source": "c160107d-ba19-427d-8e9b-95cca5973373",
"target": "95c8ef15-2b44-4ba7-87c8-efc28b0d7b59",
"markerEnd": {
"type": "arrowclosed",
"width": 20,
"height": 20
},
"type": "custom",
"style": {
"strokeWidth": 2
},
"animated": true,
"updatable": true
}
],
"paused_at": null,
"type": "realtime",
"stream_name": "default",
"stream_type": "logs",
"frequency": "--",
"period": "--",
"cron": "--",
"sql_query": "--",
"#": 1
}