afv-library/tests/using-ui-bundle-salesforce-data/script-tests/graphql_search.bats
2026-04-21 10:32:25 +05:30

21 lines
515 B
Bash

#!/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.