Skip to content

Commit 2937293

Browse files
tests: scope to the two #2462 cases per reviewer feedback
Drop the extra MATCH-repeated-clicks integration test and the ALLSMALLER-still-errors devtools test; keep only the two new-case tests (MATCH → fixed Output, MATCH → no Output) plus the validation smoke test. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 90540e5 commit 2937293

2 files changed

Lines changed: 0 additions & 63 deletions

File tree

tests/integration/callbacks/test_wildcards.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -716,39 +716,3 @@ def announce(_, id_):
716716

717717
assert dash_duo.get_logs() == []
718718

719-
720-
def test_cbwc011_match_input_fixed_output_uses_state(dash_duo):
721-
# Verifies the State-MATCH resolver uses the triggering input's MATCH
722-
# value (not some stale first trigger), across repeated clicks.
723-
app = Dash(__name__)
724-
app.layout = html.Div(
725-
[
726-
html.Button("A", id={"role": "tab", "name": "a"}),
727-
html.Button("B", id={"role": "tab", "name": "b"}),
728-
html.Button("C", id={"role": "tab", "name": "c"}),
729-
html.Pre("-", id="trail"),
730-
]
731-
)
732-
733-
@app.callback(
734-
Output("trail", "children"),
735-
Input({"role": "tab", "name": MATCH}, "n_clicks"),
736-
State({"role": "tab", "name": MATCH}, "id"),
737-
State("trail", "children"),
738-
prevent_initial_call=True,
739-
)
740-
def append(_, id_, current):
741-
prev = "" if current == "-" else current
742-
return f"{prev}{id_['name']}"
743-
744-
dash_duo.start_server(app)
745-
746-
dash_duo.wait_for_text_to_equal("#trail", "-")
747-
748-
for name in ["a", "b", "c", "a"]:
749-
dash_duo.find_element(
750-
f'[id=\\{{\\"name\\"\\:\\"{name}\\"\\,\\"role\\"\\:\\"tab\\"\\}}]'
751-
).click()
752-
753-
dash_duo.wait_for_text_to_equal("#trail", "abca")
754-
assert dash_duo.get_logs() == []

tests/integration/devtools/test_callback_validation.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -875,30 +875,3 @@ def c(_):
875875
dash_duo.wait_for_no_elements(dash_duo.devtools_error_count_locator)
876876
assert dash_duo.get_logs() == []
877877

878-
879-
def test_dvcv018_allsmaller_still_errors_with_fixed_output(dash_duo):
880-
# Issue #2462 leaves ALLSMALLER strict: it still requires a
881-
# corresponding MATCH in the Output(s).
882-
app = Dash(__name__)
883-
app.layout = html.Div()
884-
885-
@app.callback(
886-
Output("out", "children"),
887-
Input({"i": ALLSMALLER}, "value"),
888-
)
889-
def x(_):
890-
return "x"
891-
892-
dash_duo.start_server(app, **debugging)
893-
894-
specs = [
895-
[
896-
"`Input` / `State` wildcards not in `Output`s",
897-
[
898-
'Input 0 ({"i":ALLSMALLER}.value)',
899-
"has MATCH or ALLSMALLER on key(s) i",
900-
"Output 0 (out.children)",
901-
],
902-
],
903-
]
904-
check_errors(dash_duo, specs)

0 commit comments

Comments
 (0)