Skip to content

Commit 5bf5f32

Browse files
committed
Add questionnaire to appendix
1 parent 007135a commit 5bf5f32

File tree

7 files changed

+88
-4
lines changed

7 files changed

+88
-4
lines changed

Dissertate.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@
246246
\renewcommand{\frontmatter}{
247247
\input{frontmatter/personalize}
248248
\maketitle
249+
\includepdf[pages={1,2}]{figures/james_gee_project_definition_v2.pdf}
249250
% \copyrightpage
250251
\abstractpage
251252
\tableofcontents
@@ -326,8 +327,8 @@
326327
\addcontentsline{toc}{chapter}{References}
327328
\begin{appendices}
328329
\input{chapters/appendixA}
329-
\input{chapters/appendixB}
330330
\input{chapters/appendixC}
331+
\input{chapters/appendixD}
331332
\end{appendices}
332333
\input{endmatter/colophon}
333334
}

chapters/3-a11y-tool.tex

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,72 @@ \subsubsection{Bootstrapping the browser}
348348
at development time through a script tag. Users could add this to the html
349349
file they wished to test.
350350

351+
\subsection{Testing}
352+
\subsubsection{Enabling others}
353+
With the tool mainly exposing a means for others to plugin and create custom
354+
accessibility `checkers' it was important to demonstrate how developers can
355+
write tests to confirm their checkers. With this in mind a small collection
356+
of utility methods were created. The aim of these was to reduce the amount of
357+
boiler plate required to write the tests. For example when creating dom
358+
elements a test initially looked similar \ref{lst:before}.
359+
\begin{lstlisting}[label={lst:before}]
360+
it('should expect only A elements: Negative test', () => {
361+
const actual = AChecker.expects(mount(<li></li>).getDOMNode());
362+
expect(actual).toBe(false);
363+
});
364+
\end{lstlisting}
365+
366+
But I kept on finding I was forgetting to add the .getDomNode on the end of
367+
the call to create the component. This therefore became a candidate for
368+
extraction. The effect was a much cleaner syntax as demonstrated below.
369+
370+
\begin{lstlisting}[label={lst:before}]
371+
it('should expect only A elements: Negative test', () => {
372+
const actual = AChecker.expects(render(<li></li>));
373+
expect(actual).toBe(false);
374+
});
375+
\end{lstlisting}
376+
377+
378+
\subsubsection{The A11Y tool}
379+
Unit testing of the tool was completed using Jest \citep{jest} with jasmine
380+
\citep{jasmine}. These are two frameworks which interlink well
381+
together and offer a simple means to drive web based APIs. Below is a snippet
382+
of some tests for a HREF Checker whos purpose is to check anchor html elements
383+
for correct href attributes.
384+
385+
Note how each test increases the functionality expected of the checker which
386+
enables checking of regressions every time it is excuted. This model was
387+
applied accross most of the code base.
388+
389+
\begin{lstlisting}
390+
describe('The Link Checker should', () => {
391+
392+
it('should expect only A elements: Negative test', () => {
393+
const actual = AChecker.expects(render(<li></li>));
394+
expect(actual).toBe(false);
395+
});
396+
397+
it('should expect only A elements: Positive test', () => {
398+
const actual = AChecker.expects(render(<a></a>));
399+
expect(actual).toBe(true);
400+
});
401+
402+
it('should return an error when there is no HREF present', () => {
403+
const HTML = render(<a></a>);
404+
const actual = new AChecker().execute(HTML);
405+
expect(actual.detail.moreInfo).toBe('No HREF present');
406+
});
407+
408+
it('should return an error when the HREF is only a #', () => {
409+
const HTML = render(<a href="#"></a>);
410+
const actual = new AChecker().execute(HTML);
411+
expect(actual.detail.moreInfo).toBe('HREF should go to an anchor on the page. \'#\' is not one of these!');
412+
});
413+
414+
...
415+
\end{lstlisting}
416+
351417

352418
%\newthought{Lorem ipsum dolor sit amet},
353419
%

chapters/4-evaluation.tex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,10 @@ \subsection{Meeting requirements}
167167
\subsection{Next time}
168168
Due to the lost time I was only able to complete two iterations on the A11Y
169169
Tool in comparison to the six on the A11Y Guide. I feel this reflects in both
170-
the report and product produced. The design feels sound, but the product
170+
the report and product produced. One of the areas I accumulated technical
171+
debt in was the testing of the tool. I did some manual testing of the A11Y
172+
Browser component, and wrote unit tests around the checkers but very
173+
little of the A11Y Core. To me the design feels sound, but the product
171174
relatively immature.
172175

173176
If I were to deliver this project again with the same incidents and time

chapters/appendixB.tex

Lines changed: 0 additions & 2 deletions
This file was deleted.

chapters/appendixD.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
\chapter{Questionnaire}
2+
\includepdf[pages={1,2,3}]{figures/questionnaire.pdf}

figures/questionnaire.pdf

150 KB
Binary file not shown.

references.bib

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,20 @@ @misc{bicycle
319319
year = {2016},
320320
note = "[Online; accessed 21-May-2017]"
321321
}
322+
@misc{jest,
323+
author = {Facebook},
324+
title = {{Testing with Jest}},
325+
howpublished = "\url{https://facebook.github.io/jest/}",
326+
year = {2017},
327+
note = "[Online; accessed 23-May-2017]"
328+
}
329+
@misc{jasmine,
330+
author = {Jasmine},
331+
title = {{BDD Testing in Javascript}},
332+
howpublished = "\url{https://jasmine.github.io/}",
333+
year = {2016},
334+
note = "[Online; accessed 21-May-2017]"
335+
}
322336

323337

324338

0 commit comments

Comments
 (0)