Skip to content

override fixture config for a specific test #1592

Open

Description

@alexcjohnson

In plotly/dash-core-components#932 @AnnMarieW discovered a browser feature (the clipboard API) that fails in headless mode. We introduced a hacky solution to it there to override --headless that the tests run with on CI (or whenever you run via npm run test or npm run test:intg): a separate fixture that's identical to dash_dcc (which itself is a minor modification of dash_duo) except that it explicitly sets headless=False rather than reading it from request.config.

We should have a better way to do this - maybe there already is one, I just couldn't find it? I'd love to have a decorator something like:

@dash_config(headless=False)
def test_clp001_clipboard_text(dash_dcc):
    ...

Activity

  1. self-assigned this
    on Jul 18, 2024
  2. removed their assignment
    on Aug 2, 2024
  3. added
    P3
    feature
    on Aug 13, 2024
  4. changed the title [-][Feature Request] dash.testing: override fixture config for a specific test[/-] [+]override fixture config for a specific test[/+] on Aug 13, 2024
  5. added
    testing
    on Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3featuretesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions