test(tour): start with no steps is the built-in tour, not an error
#129137 made gui_tour's start without steps run the app's built-in tour on surface='app' and refuse it on 'preview'. test_start_validates_its_steps still expected the old 'non-empty steps' error for a bare start, so it fails on onboarding/next. Assert the current contract instead.
This commit is contained in:
@@ -31,7 +31,9 @@ def test_show_needs_something_to_point_at_or_say():
|
||||
|
||||
|
||||
def test_start_validates_its_steps():
|
||||
assert "non-empty steps" in _run(action="start")["error"]
|
||||
# No steps is the app's built-in tour; it exists only on the app surface.
|
||||
assert "error" not in _run(action="start")
|
||||
assert "surface='app'" in _run(action="start", surface="preview")["error"]
|
||||
assert "non-empty steps" in _run(action="start", steps=[])["error"]
|
||||
assert "steps[1] must be an object" in _run(action="start", steps=[{"selector": "#a"}, "nope"])["error"]
|
||||
assert "steps[1] needs" in _run(action="start", steps=[{"selector": "#a"}, {}])["error"]
|
||||
|
||||
Reference in New Issue
Block a user