Project

General

Profile

« Previous | Next » 

Revision 57ce414c

Added by koszko over 1 year ago

validate repository responses against JSON schemas

  • compute_scripts.awk (include_file): don't enforce specific path format on #INCLUDE'd files
  • .gitmodules, schemas: add Haketilo JSON schemas subrepo
  • html/install.js (InstallView): import schema validator and run it against downloaded mapping and resource definitions
  • html/repo_query.js (RepoEntry): import schema validator and run it against obtained query results
  • test/haketilo_test/unit/test_install.py (test_install_normal_usage, test_install_dialogs): use underscore instead of hyphen in item identifiers
  • test/haketilo_test/unit/test_install.py (test_install_dialogs): adapt error message test cases to new handling method of invalid JSON instanced
  • test/haketilo_test/unit/test_repo_query.py (test_repo_query_normal_usage): use underscore instead of hyphen in item identifiers
  • test/haketilo_test/unit/test_repo_query.py (test_repo_query_messages): use higher sample unsupported schema version to avoid having to modify the test case soon
  • test/haketilo_test/world_wide_library.py: use underscore instead of hyphen in item identifiers
  • common/jsonschema.js, common/jsonschema: adapt tdegrunt's jsonschema and include in Haketilo, load schema documents from schemas/

View differences:

test/haketilo_test/unit/test_popup.py
224 224
    # Click the "Show results" button.
225 225
    selector = '.repo_query_buttons > button:first-child'
226 226
    driver.find_element_by_css_selector(selector).click()
227
    shown = lambda d: 'MAPPING_A' in containers['repo_query'].text
227
    shown = lambda d: 'MAPPING-A' in containers['repo_query'].text
228 228
    WebDriverWait(driver, 10).until(shown)
229 229

  
230 230
    # Click the "Cancel" button

Also available in: Unified diff