Commit 56dd723
fix(test): unflake GlossaryPermissions team-based test (#27422)
* fix(test): assign role to team in P-11 team-based permissions test
The "Team-based permissions work correctly" test created a team and added
testUser to it, but never attached the new role to the team — so the user
inherited no permissions from team membership. The test relied on default
Organization conditional rules, which the frontend treats as no-permission
(only Access.Allow becomes truthy in PermissionsUtils). The glossary page
then rendered the no-permission placeholder and never fired
/api/v1/glossaries?fields=*, hanging visitGlossaryPage's waitForResponse
for the full 30s toPass budget.
Patch the team's defaultRoles after initializePermissions so the user
actually inherits Allow via team membership, matching the test's intent.
Local repro (full file × 10 repeats × 4 workers, retries=0):
- Before: 10/10 P-11 failures
- After: 10/10 P-11 pass, 93/93 overall pass
* fix(test): isolate P-11 to a dedicated user/team
Avoid mutating the file-shared testUser. Previously the fix added testUser
to a temporary team and attached an Allow role; if cleanup failed, the
elevated permissions would leak into subsequent tests sharing the same
worker.
Now P-11 creates its own UserClass + page, runs the team-permission
verification in isolation, and tears down the user, team, role, and policy
at the end. Other tests in the file see no state change from this test
beyond what initializePermissions/cleanupPermissions already do.
Local verification (full file × 10 repeats × 4 workers, retries=0):
93/93 pass, P-11 10/10.
---------
Co-authored-by: Siddhant <siddhant@MacBook-Pro-621.local>1 parent 5895359 commit 56dd723
1 file changed
Lines changed: 41 additions & 24 deletions
File tree
- openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Permissions
Lines changed: 41 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
| 357 | + | |
361 | 358 | | |
362 | 359 | | |
363 | 360 | | |
364 | 361 | | |
365 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
366 | 365 | | |
367 | 366 | | |
368 | 367 | | |
| |||
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | | - | |
379 | | - | |
| 377 | + | |
380 | 378 | | |
381 | 379 | | |
382 | 380 | | |
383 | 381 | | |
384 | 382 | | |
385 | | - | |
| 383 | + | |
386 | 384 | | |
387 | 385 | | |
388 | 386 | | |
| |||
392 | 390 | | |
393 | 391 | | |
394 | 392 | | |
395 | | - | |
396 | | - | |
| 393 | + | |
397 | 394 | | |
398 | 395 | | |
399 | 396 | | |
400 | 397 | | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
405 | 414 | | |
406 | | - | |
407 | | - | |
408 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
409 | 418 | | |
410 | | - | |
411 | | - | |
412 | | - | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
413 | 422 | | |
414 | | - | |
415 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
416 | 426 | | |
417 | | - | |
418 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
419 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
420 | 437 | | |
421 | 438 | | |
0 commit comments