-
Notifications
You must be signed in to change notification settings - Fork 19
/
criteria-web.json
67 lines (67 loc) · 3.98 KB
/
criteria-web.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
layout: none
title: JSON criteria web
---
[
{% for page in site.checklist-web %}
{
"title" : "{{ page.title | escape }}",
"categories" : "{{ page.categories | uniq | join: ", " }}",
"url" : "{{ page.url | absolute_url }}",
"id" : "{{ page.url | replace_first: '/', '' | replace: '/', '-' | replace: '.html', 'test' }}json",
"compact" : [
"How to test {% assign firstLetter = page.title | downcase | slice: 0 %}{% if firstLetter == 'a' or firstLetter== 'e' or firstLetter== 'i' or firstLetter== 'i' or firstLetter== 'u' %}an{% else %}a{% endif %} {{ page.title | escape | downcase }}",
"1. Test keyboard only, then keyboard + screenreader",
{% for action in page.keyboard -%}
"- {{ action[0] | capitalize }}: {{ action[1] | escape | strip_newlines }}",
{% endfor -%}
"2. Test mobile screenreader gestures",
{% for gesture in page.mobile -%}
"- {{ gesture[0] | capitalize }}: {{ gesture[1] | escape | strip_newlines }}",
{% endfor -%}
"3. Listen to screenreader output on all devices",
{% for output in page.screenreader -%}
"- {{ output[0] | capitalize }}: {{ output[1] | escape | strip_newlines }}",
{% endfor -%}
"Full information: {{ page.url | absolute_url | replace: '.html', '/' | strip_newlines }}"
],
"gherkin" : [
"GIVEN THAT I am on a page with {% if firstLetter == 'a' or firstLetter== 'e' or firstLetter== 'i' or firstLetter== 'i' or firstLetter== 'u' %}an{% else %}a{% endif %} {{ page.title | escape | downcase }}",
"1 - Keyboard for mobile & desktop",
{% for action in page.gherkin-keyboard limit:1 -%}
"- WHEN I use {{ action.when | strip_newlines }} I SEE {{ action.result | strip_newlines }}",
{% endfor -%}
{%- for action in page.gherkin-keyboard offset:1 -%}
"- THEN when I use {{ action.then | strip_newlines }} I SEE {{ action.result | strip_newlines }}",
{% endfor -%}
"2 - Desktop screenreader",
{% for action in page.gherkin-keyboard limit:1 -%}
"- WHEN I use a desktop screenreader (NVDA, JAWS, VoiceOver) AND",
{% for action in page.gherkin-keyboard limit:1 -%}
"- I use {{ action.when | strip_newlines }}",
{%- for requirement in page.screenreader %}
" - I HEAR {{ requirement[1] | escape | strip_newlines }}",
{%- endfor -%}
{% endfor -%}
{% endfor -%}
{% for action in page.gherkin-keyboard offset:1 %}
"- THEN when I use {{ action.then | strip_newlines }} I HEAR {{ action.result | strip_newlines }}",
{%- endfor %}
"3 - Mobile screenreader",
{% for action in page.gherkin-mobile limit:1 -%}
"- WHEN I use a mobile screenreader (Talkback, VoiceOver) AND",
{%- for action in page.gherkin-mobile limit:1 %}
"- I {{ action.when | strip_newlines }}",
{%- for requirement in page.screenreader %}
" - I HEAR {{ requirement[1] | escape | strip_newlines }}",
{%- endfor -%}
{% endfor -%}
{% endfor -%}
{% for action in page.gherkin-mobile offset:1 %}
{% if action and action != "" %}"- THEN when I {{ action.then | strip_newlines }} I HEAR {{ action.result | strip_newlines }}",{% endif -%}
{%- endfor %}
"Full information: {{ page.url | absolute_url | replace: '.html', '/' | strip_newlines }}"
],
} {% unless forloop.last %},{% endunless %}
{%- endfor -%}
]