Skip to content

Cover API example sideways scrolling with a browser journey #4847

Open

Description

@reakaleek

A browser journey should fail if long lines in the API examples rail stop being scrollable with a mouse, or if the line numbers or the "Generated from the API spec" note stop staying in place.

What is getting in your way

#4843 fixes these with CSS only: a draggable scrollbar on the code cards, a sticky line-number gutter, and a sticky note in responses. The carousel tests run in jsdom with stubbed sizes, and the only API journey (api-explorer/synth/browse-api) never scrolls an example. Nothing checks the real layout, so a later CSS change can bring the invisible scrollbar or the drifting gutter back while mise run site:test still passes. The review on that pull request asked for this coverage: #4843 (comment)

What would you like instead

A journey that opens an API operation with an overflowing request sample and an overflowing generated response, then for each one:

  • drags the code card's scrollbar sideways,
  • checks that the code scrolled and the carousel kept the same language,
  • checks that the line-number gutter and the "Generated from the API spec" note are still at the left and bottom-right of the visible code.

Anything else

Two open questions decide the shape:

  • The journeys use click, expect, get, wait and snapshot today. A drag on a scrollbar and a position check may need commands the journey runner does not have yet.
  • The only API journey requires an assembler build with the API explorer. A journey against the isolated docs/ site would add the Elasticsearch spec generation, about two minutes locally, to every run, unless it uses a small spec such as cloud.json. /api/doc/cloud/operation/operation-add-role-assignments has an overflowing curl sample with the note.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions