Skip to content

fix(workbench): session capacity test times out on disabled resource profiles #514

Description

@samcofer

Summary

test_launch_sessions_with_the_configured_resource_profile[chromium] fails with a Playwright TimeoutError when a resource profile is visible but disabled for the authenticated user.

Error

playwright._impl._errors.TimeoutError: Locator.click: Timeout 5000ms exceeded.
Call log:
  - waiting for locator("[role='option']:has-text('Large (4 CPUs, 16GB RAM)')").first
  - locator resolved to <div role="option" data-disabled="" aria-disabled="true" ...>
  - attempting click action
    - element is not enabled - retrying click action
  ...

Root cause

Workbench renders resource profiles the user is not entitled to (e.g. a group-restricted profile) as visible [role='option'] elements marked aria-disabled="true" / data-disabled.

In src/vip_tests/workbench/test_session_capacity.py:

  • _detect_profiles() reads every [role='option'], including disabled ones, and returns them as launchable.
  • _launch_session() then does option.click() on the disabled option. Playwright blocks waiting for the element to become "enabled" until the 5s timeout, and the test errors.

The scenario this exposes: a resource profile is visible, but disabled for the currently authenticated user — a legitimate, correctly-configured deployment state, not a product defect.

Expected behavior

  • Auto-detected profiles: detect all profiles but skip the disabled ones; only skip the whole scenario if every profile is disabled (nothing is launchable).
  • Explicitly configured profile (workbench.session_profiles) that is disabled: pytest.skip with a clear reason naming the profile and the likely cause (group/entitlement restriction), rather than timing out.

Affected

  • src/vip_tests/workbench/test_session_capacity.py (_detect_profiles, _launch_session, launch_sessions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions