afv-library/tests/using-ui-bundle-salesforce-data/script-tests/graphql_search.bats

21 lines
515 B
Plaintext
Raw Normal View History

2026-04-21 13:02:25 +08:00
#!/usr/bin/env bats
SCRIPT="skills/using-ui-bundle-salesforce-data/scripts/graphql-search.sh"
@test "exits 1 with no arguments" {
run bash "$SCRIPT"
[ "$status" -eq 1 ]
}
@test "shows usage text when called with no arguments" {
run bash "$SCRIPT"
[[ "$output" == *"Usage:"* ]]
}
@test "exits 1 when schema file does not exist" {
run bash "$SCRIPT" -s /nonexistent/schema.graphql Account
[ "$status" -eq 1 ]
}
# TODO: Add more tests - valid schema lookup, entity extraction, multiple entities, etc.