fix (ui): select the same episode multiple times
This commit is contained in:
@@ -66,6 +66,24 @@ assert data["items"][1]["episode"]["title"] == "A Classic New York Character", "
|
||||
print("add/list validation passed")
|
||||
PY
|
||||
|
||||
curl --fail --silent --show-error \
|
||||
-X POST "${BASE_URL}/api/session/selected-episodes?session_id=${SESSION_ID}" \
|
||||
-H "Content-Type: application/json" \
|
||||
--data @"${TMP_DIR}/add_payload.json" \
|
||||
-o "${TMP_DIR}/add_duplicate_response.json"
|
||||
|
||||
python3 - "${TMP_DIR}/add_duplicate_response.json" <<'PY'
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
data = json.loads(Path(sys.argv[1]).read_text(encoding="utf-8"))
|
||||
items = data.get("items")
|
||||
assert isinstance(items, list), "items must be a list"
|
||||
assert len(items) == 2, "duplicate add should be skipped; still expected 2 selected episodes"
|
||||
print("duplicate skip validation passed")
|
||||
PY
|
||||
|
||||
echo
|
||||
echo "== Feature test 2: reorder selected episodes =="
|
||||
cat > "${TMP_DIR}/reorder_payload.json" <<'JSON'
|
||||
|
||||
Reference in New Issue
Block a user