- Notifications
You must be signed in to change notification settings - Fork715
Commit660dfba
test: Dashboard Joins and Nested Functions e2e tests (#9685)
### **PR Type**Tests, Enhancement---### **Description**This PR adds comprehensive E2E tests for Dashboard Joins and DashboardFunctions features, along with supporting page object helpers.#### Key Changes:- **Dashboard Joins Tests**: 8 consolidated multi-panel tests coveringINNER/LEFT/RIGHT joins, conditions, aggregations, field selection,filters, dynamic operations, persistence, and error handling- **Dashboard Functions Tests**: 2 multi-panel tests covering basic(COUNT, COUNT-DISTINCT, AVG, SUM) and advanced (Multiple Y-axis, MIN,MAX) aggregation functions- **New `JoinHelper` class**: Provides methods for configuring jointypes, streams, conditions, and operators- **Enhanced `ChartTypeSelector`**: Added Y-axis function configurationmethods and stream selection with retry mechanism- **Org Context Fix**: Navigate directly to dashboards with`org_identifier` parameter to ensure correct API context---### **Test Coverage**#### Dashboard Joins Tests (`dashboard-join.spec.js`) - 8 Tests| # | Test Name | Panels | Coverage | Tags ||---|-----------|--------|----------|------|| 1 | Core Join Types - INNER, LEFT, RIGHT | 3 | INNER JOIN (11 rows),LEFT JOIN (12 rows), RIGHT JOIN (5 rows) | `@dashboard-joins`, `@smoke`,`@P0` || 2 | Join Conditions & Multi-Join | 3 | Multiple AND conditions, 3-wayjoin, OR conditions | `@dashboard-joins`, `@dashboard-joins-conditions`,`@P1` || 3 | Aggregation Functions | 4 | Basic aggregation, SUM-like grouping,AVG-like grouping, COUNT grouping | `@dashboard-joins`,`@dashboard-joins-aggregation`, `@P1` || 4 | Field Selection | 4 | response_time_ms, country, bytes, request_idfields | `@dashboard-joins`, `@dashboard-joins-fields`, `@P2` || 5 | Filters & Edge Cases | 6 | Join with filter, LEFT JOIN with NULLs,session duration, not-equal (!=), greater-than (>), self-join |`@dashboard-joins`, `@dashboard-joins-filters`, `@P2` || 6 | Dynamic Join Operations & UI Validation | 1 | Add/remove joins,change join types, modify conditions | `@dashboard-joins`,`@dashboard-joins-dynamic`, `@P2` || 7 | Persistence - Save and Reload Dashboard | 1 | Save panel, navigateaway, reload, verify join config persisted | `@dashboard-joins`,`@dashboard-joins-persistence`, `@P2` || 8 | Error Handling & Recovery | 1 | Incomplete join handling, recoveryfrom invalid state | `@dashboard-joins`, `@dashboard-joins-errors`,`@P3` |#### Dashboard Functions Tests (`dashboard-nested-functions.spec.js`) -2 Tests| # | Test Name | Panels | Coverage | Tags ||---|-----------|--------|----------|------|| 1 | Basic Aggregation Functions | 4 | COUNT, COUNT-DISTINCT, AVG, SUMfunctions | `@dashboard-functions`, `@dashboard-functions-basic`, `@P1`|| 2 | Advanced Aggregation Functions | 2 | Multiple Y-axis (COUNT + SUM+ AVG), MIN + MAX functions | `@dashboard-functions`,`@dashboard-functions-advanced`, `@P2` |---### **New Page Object Methods**#### `JoinHelper` (`dashboard-joins.js`)| Method | Description ||--------|-------------|| `addJoin()` | Open add join popup || `selectJoinType(type)` | Select INNER/LEFT/RIGHT/FULL/CROSS join || `selectJoinStream(streamName)` | Select stream to join with || `selectLeftField(field)` | Select left side join field || `selectRightField(field)` | Select right side join field || `selectOperator(operator)` | Select =, !=, <, >, <=, >= operator || `addCondition()` | Add another join condition || `saveJoin()` | Save join configuration || `removeJoin(index)` | Remove a join by index || `verifyJoinChipVisible(stream, index)` | Verify join chip displayscorrectly |#### `ChartTypeSelector` (`dashboard-chart.js`)| Method | Description ||--------|-------------|| `selectStream(name, retries)` | Select stream with retry mechanism || `configureYAxisFunction(alias, func)` | Configure Y-axis aggregationfunction || `verifyYAxisLabel(alias, func)` | Verify Y-axis label shows function || `openYAxisFunctionPopup(alias)` | Open Y-axis configuration popup || `selectFunction(name)` | Select aggregation function from dropdown |#### `DashboardPanelActions` (`dashboard-panel-actions.js`)| Method | Description ||--------|-------------|| `addNextPanel()` | Add another panel after saving || `getTableRowCount()` | Get count of data rows in table || `verifyChartRenders(expect)` | Verify chart/table renders || `savePanel()` | Save panel with networkidle wait |---### **Test Data**Test data files located in `test-data/` directory:- `joins/test_app_users.json` - 5 user records- `joins/test_web_requests.json` - 12 web request records - `joins/test_sessions.json` - 8 session records- `dashboard-functions/test_records.json` - 7 records with user_name andscore fields---### **Fixes Included**| Issue | Fix ||-------|-----|| Org context mismatch on remote environments | Navigate to`/web/dashboards?org_identifier=${ORGNAME}` || Streams not appearing in dropdown | Page reload after dashboardcreation to refresh stream list || Save panel race condition | Added `waitForLoadState("networkidle")`after save click || Stream selection timing | Retry mechanism with debug logging || Test 5 timeout | Increased to 5 minutes for 6-panel test |---<details><summary><h3>File Walkthrough</h3></summary><table><thead><tr><th></th><th align="left">Relevantfiles</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>5files</summary><table><tr><td><strong>dashboard-chart.js</strong><dd><code>Enhance streamselection and add Y-axis function methods</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-573a312576fce62d8e14f2bbb5f9b7d9a552d746304dce3d79862edddd24de76">+106/-14</a></td></tr><tr><td><strong>dashboard-create.js</strong><dd><code>Add smart paneladdition for empty and existing dashboards</code></dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-c3c5add2b934580a91a79bb580634b70e2376b0452113008a0911102db3863e2">+25/-1</a> </td></tr><tr><td><strong>dashboard-joins.js</strong><dd><code>New JoinHelper forconfiguring and validating joins</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-f88eb0cf951ec45e97befde5c83a2c187bb46db3f6cb27bc0cb88d48c5f45b78">+351/-0</a> </td></tr><tr><td><strong>dashboard-panel-actions.js</strong><dd><code>Add next-panel,row count and chart render verifications</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-d29713fdcc11cbc93bda29da5261da389226cd718e4292a1c2cd96629f573a80">+76/-1</a> </td></tr><tr><td><strong>global-setup.js</strong><dd><code>Include org_identifier inlogin navigation URL</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-06323dad7214f86b41b62e121e716eeea0054bc4d950c6bcf4a0efe53894acc8">+4/-3</a> </td></tr></table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>6files</summary><table><tr><td><strong>dashboard-join.spec.js</strong><dd><code>Consolidateddashboard joins feature E2E tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-552f4ba6f199ade20dbab2c54b8573422fd644587ed1575262a7aa34f8041174">+1160/-0</a></td></tr><tr><td><strong>dashboard-nested-functions.spec.js</strong><dd><code>Multi-paneldashboard functions E2E tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-d2a9855da60f5fd3820832815036c368a680e2885033ad1a7a2bcbd060e2a750">+372/-0</a> </td></tr><tr><td><strong>test_records.json</strong><dd><code>Add test data fordashboard functions tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-3a09d97f4091ae2f4dc97ebc14199c5d94efb878a6ebfa7da686cad5450ddda0">+7/-0</a> </td></tr><tr><td><strong>test_app_users.json</strong><dd><code>Add user data fordashboard joins tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-7c5af3decd88c4f9031fd83282844872f4a0a65eea2b51a46aac849aa4a5c129">+7/-0</a> </td></tr><tr><td><strong>test_sessions.json</strong><dd><code>Add session data fordashboard joins tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-836e072600882ffa58662a4867ac17d2ce799dd338daac585203ccaa01275e3c">+10/-0</a> </td></tr><tr><td><strong>test_web_requests.json</strong><dd><code>Add web requestdata for dashboard joins tests</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-1c4b00b1929e9a01de1cb8129161c49dc1563a5dde1c4b5e770a307245155382">+14/-0</a> </td></tr></table></details></td></tr><tr><td><strong>Configurationchanges</strong></td><td><details><summary>1 files</summary><table><tr><td><strong>cleanup.spec.js</strong><dd><code>Extend cleanup regex forjoin and function test streams</code> </dd></td><td><ahref="https://github.com/openobserve/openobserve/pull/9685/files#diff-c214275a512fa285a7e4f2ab61dfcb42d71a0436b0e4241f94d7b45693587983">+8/-1</a> </td></tr></table></details></td></tr></tbody></table></details>------------Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>1 parent06ab605 commit660dfba
File tree
17 files changed
+2443
-22
lines changed- .claude
- .github/workflows
- tests
- test-data
- dashboard-functions
- joins
- ui-testing
- pages/dashboardPages
- playwright-tests
- Dashboards
- utils
17 files changed
+2443
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
182 | 184 | | |
183 | 185 | | |
184 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments
Comments
(0)