---
  - config:
    - testset: "Bridge API Tests"
    - api: &api "bridge"
    - variable_binds:
      - api: *api
    - generators:
      - test_id: {type: 'number_sequence', start: 1}

  - base_test: &base_test
    - generator_binds:
      - test_id: test_id
    - group: *api
    - url: "/"
    - method: "POST"
    - body: {template: {file: "../../templates/request_template.json"}}
    - validators:
      - extract_test: {jsonpath_mini: "error", test: "not_exists"}
      - extract_test: {jsonpath_mini: "result", test: "exists"}
      - compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}}
      - json_file_validator: {jsonpath_mini: "result", comparator: "json_compare", expected: {template: 'full_sync/$api/$method'}}

#  - test:
#    - name: "normalize_post"
#    - variable_binds:
#      - method: "normalize_post"
#      - args: {}
#    - <<: *base_test

  - test:
    - name: "get_post_header"
    - variable_binds:
      - method: "get_post_header"
      - args: '{"author":"steemit", "permlink":"firstpost"}'
    - <<: *base_test

# Timeouts - to much data
#  - test:
#    - name: "get_discussion"
#    - variable_binds:
#      - method: "get_discussion"
#      - args: '{"author":"steemit", "permlink":"firstpost"}'
#    - <<: *base_test

  - test:
    - name: "get_post"
    - variable_binds:
      - method: "get_post"
      - args: '{"author":"steemit", "permlink":"firstpost"}'
    - <<: *base_test

  - test:
    - name: "get_account_posts"
    - variable_binds:
      - method: "get_account_posts"
      - args: '{"sort":"posts", "account":"steemit"}'
    - <<: *base_test

# Timeouts - to much data
#  - test:
#    - name: "get_ranked_posts"
#    - variable_binds:
#      - method: "get_ranked_posts"
#      - args: '{"sort":"trending","tag":"","observer":"steemit"}'
#    - <<: *base_test

  - test:
    - name: "get_profile"
    - variable_binds:
      - method: "get_profile"
      - args: '{"account":"steemit"}'
    - <<: *base_test

  - test:
    - name: "get_trending_topics"
    - variable_binds:
      - method: "get_trending_topics"
      - args: '{}'
    - <<: *base_test

  - test:
    - name: "post_notifications"
    - variable_binds:
      - method: "post_notifications"
      - args: '{"author":"steemit", "permlink":"firstpost"}'
    - <<: *base_test

  - test:
    - name: "account_notifications"
    - variable_binds:
      - method: "account_notifications"
      - args: '{"account":"steemit","limit":100}'
    - <<: *base_test

  - test:
    - name: "unread_notifications"
    - variable_binds:
      - method: "unread_notifications"
      - args: '{"account":"steemit"}'
    - <<: *base_test

  - test:
    - name: "get_payout_stats"
    - variable_binds:
      - method: "get_payout_stats"
      - args: '{}'
    - generator_binds:
      - test_id: test_id
    - group: *api
    - url: "/"
    - method: "POST"
    - body: {template: {file: "../../templates/request_template.json"}}
    - validators:
      - extract_test: {jsonpath_mini: "error", test: "not_exists"}
      - extract_test: {jsonpath_mini: "result", test: "exists"}
      - compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}}
      - extract_test: {jsonpath_mini: "result.blogs", test: "exists"}
      - extract_test: {jsonpath_mini: "result.items", test: "exists"}

  - test:
    - name: "get_community"
    - variable_binds:
      - method: "get_community"
      - args: '{"name":"hive-123456","observer":"steemit"}'
    - <<: *base_test

  - test:
    - name: "get_community_context"
    - variable_binds:
      - method: "get_community_context"
      - args: '{"name":"hive-123456", "account":"steemit"}'
    - <<: *base_test

  - test:
    - name: "list_communities"
    - variable_binds:
      - method: "list_communities"
      - args: '{"limit":1}'
    - generator_binds:
      - test_id: test_id
    - group: *api
    - url: "/"
    - method: "POST"
    - body: {template: {file: "../../templates/request_template.json"}}
    - validators:
      - extract_test: {jsonpath_mini: "error", test: "not_exists"}
      - extract_test: {jsonpath_mini: "result", test: "exists"}
      - compare: {jsonpath_mini: "id", comparator: "str_eq", expected: {template: $test_id}}
      - extract_test: {jsonpath_mini: "result.0.about", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.admins", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.avatar_url", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.context", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.created_at", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.id", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.is_nsfw", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.lang", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.name", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.num_authors", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.num_pending", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.subscribers", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.sum_pending", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.title", test: "exists"}
      - extract_test: {jsonpath_mini: "result.0.type_id", test: "exists"}

# Disabled as its not used, not ready
#  - test:
#    - name: "list_pop_communities"
#    - variable_binds:
#      - method: "list_pop_communities"
#      - args: '{}'
#    - <<: *base_test

  - test:
    - name: "list_community_roles"
    - variable_binds:
      - method: "list_community_roles"
      - args: '{"community":"hive-123456"}'
    - <<: *base_test

  - test:
    - name: "list_subscribers"
    - variable_binds:
      - method: "list_subscribers"
      - args: '{"community":"hive-123456"}'
    - <<: *base_test

  - test:
    - name: "list_all_subscriptions"
    - variable_binds:
      - method: "list_all_subscriptions"
      - args: '{"account":"steemit"}'
    - <<: *base_test