Skip to content

fix: resolve Playwright test ordering contamination (#2867)#2890

Merged
crivetimihai merged 3 commits intomainfrom
2867-playwight
Feb 12, 2026
Merged

fix: resolve Playwright test ordering contamination (#2867)#2890
crivetimihai merged 3 commits intomainfrom
2867-playwight

Conversation

@crivetimihai
Copy link
Copy Markdown
Member

Add proper synchronization for async UI operations that caused tests to pass individually but fail in the full suite:

  • Wait for JS initialization (showTab + HTMX) in conftest before tab clicks
  • Wait for HTMX partial response in MCP Registry tab navigation
  • Wait for JS redirect after server creation in 5 CRUD tests

Add proper synchronization for async UI operations that caused tests to
pass individually but fail in the full suite:

- Wait for JS initialization (showTab + HTMX) in conftest before tab clicks
- Wait for HTMX partial response in MCP Registry tab navigation
- Wait for JS redirect after server creation in 5 CRUD tests

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- tools_page: add Alpine/HTMX retry in wait_for_tools_table_loaded
  (showTab has no retry logic for "tools" unlike other tabs)
- tools_page: increase modal timeouts from 10s to 30s for slow API fetches
- gateways_page: handle both confirm() dialogs in handleDeleteSubmit
  (delete + purge metrics) and use expect_navigation for form POST
- gateways_page: target delete by row name instead of DOM index to avoid
  clicking hidden (CSS-filtered) rows
- test_gateways: detect RBAC 403 on delete (allow_admin_bypass=False
  blocks admin without explicit role assignments) and skip gracefully

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
- tools_page: fix reload path in wait_for_tools_table_loaded to
  re-navigate to tools tab after reload (showTab doesn't set hash)
- tools_page: add _click_and_wait_for_tool_fetch to intercept async
  API response before waiting for modal (fail fast on RBAC 403)
- test_htmx_interactions: graceful pytest.skip on RBAC 403 for tool
  view/edit/test modal tests
- test_servers_extended: skip on 401/403 for server creation, fix
  search assertion (paginated initial vs full search results), wait
  for table stabilization after pagination change
- test_tools: skip on RBAC 401/403 for tool create and delete
- test_organization: re-navigate to teams tab after page reload and
  wait for search field visibility before fill (3 occurrences)

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai marked this pull request as ready for review February 12, 2026 20:05
@crivetimihai crivetimihai merged commit 606e77f into main Feb 12, 2026
36 of 37 checks passed
@crivetimihai crivetimihai deleted the 2867-playwight branch February 12, 2026 20:05
ja8zyjits pushed a commit that referenced this pull request Feb 13, 2026
* fix: resolve Playwright test ordering contamination (#2867)

Add proper synchronization for async UI operations that caused tests to
pass individually but fail in the full suite:

- Wait for JS initialization (showTab + HTMX) in conftest before tab clicks
- Wait for HTMX partial response in MCP Registry tab navigation
- Wait for JS redirect after server creation in 5 CRUD tests

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve HTMX tool table race and gateway delete failures

- tools_page: add Alpine/HTMX retry in wait_for_tools_table_loaded
  (showTab has no retry logic for "tools" unlike other tabs)
- tools_page: increase modal timeouts from 10s to 30s for slow API fetches
- gateways_page: handle both confirm() dialogs in handleDeleteSubmit
  (delete + purge metrics) and use expect_navigation for form POST
- gateways_page: target delete by row name instead of DOM index to avoid
  clicking hidden (CSS-filtered) rows
- test_gateways: detect RBAC 403 on delete (allow_admin_bypass=False
  blocks admin without explicit role assignments) and skip gracefully

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve Playwright suite failures across tools, servers, and teams

- tools_page: fix reload path in wait_for_tools_table_loaded to
  re-navigate to tools tab after reload (showTab doesn't set hash)
- tools_page: add _click_and_wait_for_tool_fetch to intercept async
  API response before waiting for modal (fail fast on RBAC 403)
- test_htmx_interactions: graceful pytest.skip on RBAC 403 for tool
  view/edit/test modal tests
- test_servers_extended: skip on 401/403 for server creation, fix
  search assertion (paginated initial vs full search results), wait
  for table stabilization after pagination change
- test_tools: skip on RBAC 401/403 for tool create and delete
- test_organization: re-navigate to teams tab after page reload and
  wait for search field visibility before fill (3 occurrences)

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
crivetimihai added a commit that referenced this pull request Feb 13, 2026
- test_delete_prompt: use retry-based wait_for_entity_deleted() instead
  of immediate assertion after API delete (race condition fix)
- test_delete_server_ui_button: add scroll_into_view, force click, and
  expect_navigation (mirrors gateways_page pattern from #2890)
- test_auth_type_filter/category_filter: wait for HTMX swap completion
  instead of fixed 1000ms timeout; skip if filter option not available
- Add unit test for ValueError handler in rbac.py delete_role (line 286)
  to satisfy diff-cover threshold

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
crivetimihai added a commit that referenced this pull request Feb 13, 2026
…ailures (#2921)

* fix: resolve selective export AttributeError and RBAC role deletion failures

- Fix selective export using non-existent model attributes (rate_limit,
  timeout, is_active) by using getattr() and .enabled (#2916)
- Fix broken SQLAlchemy query in role deletion: select().update() →
  update().where().values() (#2917)
- Add ValueError handler for system role deletion returning 400 not 500
- Harden browser UI RBAC tests against intermittent cookie auth failures

Closes #2916
Closes #2917

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: harden flaky browser UI tests and add ValueError coverage

- test_delete_prompt: use retry-based wait_for_entity_deleted() instead
  of immediate assertion after API delete (race condition fix)
- test_delete_server_ui_button: add scroll_into_view, force click, and
  expect_navigation (mirrors gateways_page pattern from #2890)
- test_auth_type_filter/category_filter: wait for HTMX swap completion
  instead of fixed 1000ms timeout; skip if filter option not available
- Add unit test for ValueError handler in rbac.py delete_role (line 286)
  to satisfy diff-cover threshold

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
suciu-daniel pushed a commit that referenced this pull request Feb 16, 2026
…ailures (#2921)

* fix: resolve selective export AttributeError and RBAC role deletion failures

- Fix selective export using non-existent model attributes (rate_limit,
  timeout, is_active) by using getattr() and .enabled (#2916)
- Fix broken SQLAlchemy query in role deletion: select().update() →
  update().where().values() (#2917)
- Add ValueError handler for system role deletion returning 400 not 500
- Harden browser UI RBAC tests against intermittent cookie auth failures

Closes #2916
Closes #2917

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: harden flaky browser UI tests and add ValueError coverage

- test_delete_prompt: use retry-based wait_for_entity_deleted() instead
  of immediate assertion after API delete (race condition fix)
- test_delete_server_ui_button: add scroll_into_view, force click, and
  expect_navigation (mirrors gateways_page pattern from #2890)
- test_auth_type_filter/category_filter: wait for HTMX swap completion
  instead of fixed 1000ms timeout; skip if filter option not available
- Add unit test for ValueError handler in rbac.py delete_role (line 286)
  to satisfy diff-cover threshold

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
vishu-bh pushed a commit that referenced this pull request Feb 18, 2026
* fix: resolve Playwright test ordering contamination (#2867)

Add proper synchronization for async UI operations that caused tests to
pass individually but fail in the full suite:

- Wait for JS initialization (showTab + HTMX) in conftest before tab clicks
- Wait for HTMX partial response in MCP Registry tab navigation
- Wait for JS redirect after server creation in 5 CRUD tests

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve HTMX tool table race and gateway delete failures

- tools_page: add Alpine/HTMX retry in wait_for_tools_table_loaded
  (showTab has no retry logic for "tools" unlike other tabs)
- tools_page: increase modal timeouts from 10s to 30s for slow API fetches
- gateways_page: handle both confirm() dialogs in handleDeleteSubmit
  (delete + purge metrics) and use expect_navigation for form POST
- gateways_page: target delete by row name instead of DOM index to avoid
  clicking hidden (CSS-filtered) rows
- test_gateways: detect RBAC 403 on delete (allow_admin_bypass=False
  blocks admin without explicit role assignments) and skip gracefully

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve Playwright suite failures across tools, servers, and teams

- tools_page: fix reload path in wait_for_tools_table_loaded to
  re-navigate to tools tab after reload (showTab doesn't set hash)
- tools_page: add _click_and_wait_for_tool_fetch to intercept async
  API response before waiting for modal (fail fast on RBAC 403)
- test_htmx_interactions: graceful pytest.skip on RBAC 403 for tool
  view/edit/test modal tests
- test_servers_extended: skip on 401/403 for server creation, fix
  search assertion (paginated initial vs full search results), wait
  for table stabilization after pagination change
- test_tools: skip on RBAC 401/403 for tool create and delete
- test_organization: re-navigate to teams tab after page reload and
  wait for search field visibility before fill (3 occurrences)

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
vishu-bh pushed a commit that referenced this pull request Feb 18, 2026
…ailures (#2921)

* fix: resolve selective export AttributeError and RBAC role deletion failures

- Fix selective export using non-existent model attributes (rate_limit,
  timeout, is_active) by using getattr() and .enabled (#2916)
- Fix broken SQLAlchemy query in role deletion: select().update() →
  update().where().values() (#2917)
- Add ValueError handler for system role deletion returning 400 not 500
- Harden browser UI RBAC tests against intermittent cookie auth failures

Closes #2916
Closes #2917

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: harden flaky browser UI tests and add ValueError coverage

- test_delete_prompt: use retry-based wait_for_entity_deleted() instead
  of immediate assertion after API delete (race condition fix)
- test_delete_server_ui_button: add scroll_into_view, force click, and
  expect_navigation (mirrors gateways_page pattern from #2890)
- test_auth_type_filter/category_filter: wait for HTMX swap completion
  instead of fixed 1000ms timeout; skip if filter option not available
- Add unit test for ValueError handler in rbac.py delete_role (line 286)
  to satisfy diff-cover threshold

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
)

* fix: resolve Playwright test ordering contamination (IBM#2867)

Add proper synchronization for async UI operations that caused tests to
pass individually but fail in the full suite:

- Wait for JS initialization (showTab + HTMX) in conftest before tab clicks
- Wait for HTMX partial response in MCP Registry tab navigation
- Wait for JS redirect after server creation in 5 CRUD tests

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve HTMX tool table race and gateway delete failures

- tools_page: add Alpine/HTMX retry in wait_for_tools_table_loaded
  (showTab has no retry logic for "tools" unlike other tabs)
- tools_page: increase modal timeouts from 10s to 30s for slow API fetches
- gateways_page: handle both confirm() dialogs in handleDeleteSubmit
  (delete + purge metrics) and use expect_navigation for form POST
- gateways_page: target delete by row name instead of DOM index to avoid
  clicking hidden (CSS-filtered) rows
- test_gateways: detect RBAC 403 on delete (allow_admin_bypass=False
  blocks admin without explicit role assignments) and skip gracefully

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: resolve Playwright suite failures across tools, servers, and teams

- tools_page: fix reload path in wait_for_tools_table_loaded to
  re-navigate to tools tab after reload (showTab doesn't set hash)
- tools_page: add _click_and_wait_for_tool_fetch to intercept async
  API response before waiting for modal (fail fast on RBAC 403)
- test_htmx_interactions: graceful pytest.skip on RBAC 403 for tool
  view/edit/test modal tests
- test_servers_extended: skip on 401/403 for server creation, fix
  search assertion (paginated initial vs full search results), wait
  for table stabilization after pagination change
- test_tools: skip on RBAC 401/403 for tool create and delete
- test_organization: re-navigate to teams tab after page reload and
  wait for search field visibility before fill (3 occurrences)

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
…ailures (IBM#2921)

* fix: resolve selective export AttributeError and RBAC role deletion failures

- Fix selective export using non-existent model attributes (rate_limit,
  timeout, is_active) by using getattr() and .enabled (IBM#2916)
- Fix broken SQLAlchemy query in role deletion: select().update() →
  update().where().values() (IBM#2917)
- Add ValueError handler for system role deletion returning 400 not 500
- Harden browser UI RBAC tests against intermittent cookie auth failures

Closes IBM#2916
Closes IBM#2917

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: harden flaky browser UI tests and add ValueError coverage

- test_delete_prompt: use retry-based wait_for_entity_deleted() instead
  of immediate assertion after API delete (race condition fix)
- test_delete_server_ui_button: add scroll_into_view, force click, and
  expect_navigation (mirrors gateways_page pattern from IBM#2890)
- test_auth_type_filter/category_filter: wait for HTMX swap completion
  instead of fixed 1000ms timeout; skip if filter option not available
- Add unit test for ValueError handler in rbac.py delete_role (line 286)
  to satisfy diff-cover threshold

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
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.

1 participant