TestData: wire scenarioSelect and labelsInput onto QueryEditor (#128759)

* TestData: wire scenario select and labels input e2e selectors

Wires the existing-but-unused scenarioSelect aria-label onto the
Scenario <Select>, and adds+wires a new templated labelsInput(refId)
selector onto the per-query Labels input.

Split out of grafana/grafana#128750 per the MT service compatibility
check, since this touches an independently-deployed data source
plugin (public/app/plugins/datasource/*).

* Revert QueryEditor.tsx wiring, moved to a stacked follow-up PR

check-separation flags any PR touching both packages/grafana-e2e-selectors
and public/app/plugins/datasource/*, regardless of what else is in the
diff. Keeping this PR to just the new labelsInput selector definition;
the QueryEditor.tsx wiring (this + the pre-existing scenarioSelect) moves
to a PR stacked on top of this one.

* Fix version key on labelsInput to computed main version

Per the add-e2e-selectors skill: new selectors use the current main
version (13.2.0), not MIN_GRAFANA_VERSION.

* TestData: wire scenarioSelect and labelsInput onto QueryEditor

Stacked on jayclifford/first-dashboard-testdata-e2e-selectors, which
adds the labelsInput selector definition. This PR only touches the
datasource plugin file itself, so check-separation passes.

* chore: revert change

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
This commit is contained in:
Jay Clifford
2026-07-30 09:07:30 +00:00
committed by GitHub
co-authored by Jack Westbrook Hugo Häggmark
parent 929b2bd0e2
commit 6cc99a7ec1
@@ -209,6 +209,7 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props)
<InlineField labelWidth={14} label="Scenario">
<Select
inputId={`test-data-scenario-select-${query.refId}`}
aria-label={selectors.scenarioSelect}
options={options}
value={options.find((item) => item.value === query.scenarioId)}
onChange={onScenarioChange}
@@ -280,6 +281,7 @@ export const QueryEditor = ({ query, datasource, onChange, onRunQuery }: Props)
<Input
width={32}
id={`labels-${query.refId}`}
data-testid={selectors.labelsInput(query.refId)}
name="labels"
onChange={onInputChange}
value={query?.labels}