Skip to content

Instantly share code, notes, and snippets.

@loklaan
Last active August 6, 2023 22:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save loklaan/ded8101a0425ec024b706dd16ef87464 to your computer and use it in GitHub Desktop.
Save loklaan/ded8101a0425ec024b706dd16ef87464 to your computer and use it in GitHub Desktop.
JSONSchema: Pages Under Test
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"default": {
"pages": [
{
"url": "/my-url/",
"is_indexable": true
}
]
},
"required": [
"pages"
],
"additionalProperties": true,
"properties": {
"pages": {
"description": "The list of pages to test with Cypress.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"default": {
"url": "/my-url/",
"is_indexable": true
},
"required": [
"url"
],
"additionalProperties": false,
"properties": {
"url": {
"description": "The path of the URL to test, such as /about/. Locales code prefixes should not be used since the page's header alternate links are used to resolve localised pages dynamically.",
"type": "string",
"default": "/my-url/"
},
"is_indexable": {
"description": "Optional - when true all localised versions of the page are checked for valid self-referencing canonical links, and that noindex/nofollow aren't present in the page's header metadata.",
"type": "boolean",
"default": true
},
"check_locales": {
"description": "Optional - the list of locales to verify are present in the page's header alternate links. Missing locales will cause test failure.",
"type": "array",
"minItems": 1,
"items": {
"$comment": "Note: The values below are taken from the Renderers 'PageLanguages' enum - the only locales removed were 'en' and 'zh_dotcn'.",
"type": "string",
"enum": ["af_za","ar","ar_ae","ar_eg","ar_sa","as_in","az_az","bg_bg","ceb_ph","ca_es","cs_cz","cy_gb","da_dk","de_de","el_gr","en_au","en_in","en_ph","en_gb","es_419","es_ar","es_co","es_es","es_us","es_mx","et_ee","eu_es","fa_ir","ff_sn","fi_fi","fr_be","fr_ca","fr_fr","gl_es","gu_in","ha_ng","he_il","hi_in","hr_hr","hu_hu","hy_am","id_id","ig_ng","it_it","ja_jp","jv_id","ka_ge","kk_kz","kn_in","km_kh","ko_kr","ku_tr","ky_kg","lt_lt","lv_lv","ne_np","ma_in","mg_mg","mk_mk","ml_in","mn_mn","ms_my","mr_in","my_mm","nl_be","nl_nl","bn_bd","nb_no","om_et","pa_in","pa_pk","pl_pl","pt_br","pt_pt","ro_ro","ru_ru","sd_in","si_lk","sk_sk","sl_si","sn_zw","so_so","sq_al","sr_rs","sv_se","su_id","sw_ke","ta_in","te_in","th_th","tl_ph","tr_tr","uk_ua","ur_pk","uz_uz","vi_vn","wo_sn","xh_za","yo_ng","zh_cn","zh_hk","zh_tw","zu_za"]
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment