test(smoke): live case for ownership movements with a Stockbit session

Claude-Session: https://claude.ai/code/session_01RqPPVeVDrnLoP7NUZmLRxY
This commit is contained in:
Rasyidan Akbar F. 2026-11-03 16:02:26 +07:00
commit 615083ee0b
2 changed files with 6 additions and 3 deletions

View file

@ -63,8 +63,8 @@ scripts/live-smoke.sh --dry-run
session sees `market_status: close` and no bid/offer. These run without a
Stockbit login: each side has its own config, and seeding it with a real
refresh token would rotate (and so retire) that token. When
`idx stockbit status` reports a session, `stocks orderbook`, `stocks actions`
and `stocks calendar` also run, on the new binary with your real config
`idx stockbit status` reports a session, `stocks orderbook`, `stocks actions`,
`stocks calendar` and `ownership movements` (market-wide, one page) also run, on the new binary with your real config
directory (the session file is shared under its lock, never copied; cache
and data stay isolated). Check the rest by hand:
`idx --provider stockbit stocks quote BBCA` and

View file

@ -136,6 +136,8 @@ contract() {
echo '(.symbol | type == "string") and (.price | type == "number") and (.market_status | type == "string") and (.bids | type == "array") and (.offers | type == "array")' ;;
"stocks actions "*|"stocks calendar"*)
echo 'type == "array" and length > 0 and all(.[]; (.symbol | type == "string") and (.kind | type == "string") and (.date | type == "string"))' ;;
"ownership movements"*)
echo '(.more | type == "boolean") and (.movements | length > 0) and all(.movements[]; (.symbol | type == "string") and (.date | type == "string") and (.holder_id | type == "string") and (.action | type == "string") and (.shares_change | type == "number"))' ;;
"stocks broker "*)
echo '(.symbol | type == "string") and (.buyers | length > 0) and (.sellers | length > 0) and all(.buyers[]; (.code | type == "string") and (.value | type == "number")) and (.total_value | type == "number")' ;;
"stocks bandar "*)
@ -267,9 +269,10 @@ if selected stockbit; then
run_new_case orderbook "stocks orderbook $SYMBOL --depth 5"
run_new_case actions "stocks actions $SYMBOL --kind dividend,split"
run_new_case calendar "stocks calendar --kind dividend,rights"
run_new_case movements "ownership movements"
REAL_CONFIG=0
else
echo " no Stockbit session: orderbook, actions and calendar not run"
echo " no Stockbit session: orderbook, actions, calendar and movements not run"
fi
fi