dox Executable Documentation

Keep state

Keep state of siblings

Given the box container 'a' responding '<a href="">A</a> $b $c'
Given the box container 'b' responding '<a href="x" target="c">B</a>'
Given the box container 'c' responding '<a href="">C</a>'
Given 'a' contains 'b'
Given 'a' contains 'c'
Given the request argument '_d/foo' is 'D'
When I get the response from 'a'
Then the response should be '<a href="">A</a> ' . '<a href="?_d[foo]=D&_c[!]=x&_=c">B</a> ' . '<a href="?_d[foo]=D&_=c">C</a>'

Keep all state

Given the box container 'a' responding '<a href="">A</a> $b $c'
Given the box container 'b' responding '<a href="">B</a> $f'
Given the box container 'c' responding '<a href="">C</a> $d $e'
Given the box container 'd' responding '<a href="">D</a>'
Given the box container 'e' responding '<a href="">E</a>'
Given the box container 'f' responding '<a href="">F</a>'
Given 'a' contains 'b'
Given 'a' contains 'c'
Given 'b' contains 'f'
Given 'c' contains 'd'
Given 'c' contains 'e'
Given the request argument 'foo' is 'A'
Given the request argument '_b/foo' is 'B'
Given the request argument '_b/_f/foo' is 'F'
Given the request argument '_c/foo' is 'C'
Given the request argument '_c/_d/foo' is 'D'
Given the request argument '_c/_e/foo' is 'E'
When I get the response from 'a'
Then the response should be '<a href="">A</a> ' . '<a href="?foo=A&_c[foo]=C&_c[_d][foo]=D&_c[_e][foo]=E&_=b">B</a> ' . '<a href="?foo=A&_c[foo]=C&_c[_d][foo]=D&_c[_e][foo]=E&_b[foo]=B&_b[_]=f&_=b">F</a> ' . '<a href="?foo=A&_b[foo]=B&_b[_f][foo]=F&_=c">C</a> ' . '<a href="?foo=A&_b[foo]=B&_b[_f][foo]=F&_c[foo]=C&_c[_e][foo]=E&_c[_]=d&_=c">D</a> ' . '<a href="?foo=A&_b[foo]=B&_b[_f][foo]=F&_c[foo]=C&_c[_d][foo]=D&_c[_]=e&_=c">E</a>'

Do not keep primary target in state

Given the box container 'o' responding '$a'
Given the box container 'a' responding '<a href="">A</a> $b'
Given the box container 'b' responding '<a href="">B</a>'
Given 'o' contains 'a'
Given 'a' contains 'b'
Given the request argument '_a/_' is 'b'
When I get the response from 'o'
Then the response should be '<a href="?_=a">A</a> <a href="?_a[_]=b&_=a">B</a>'

Do not keep state if target changes

* I don't think this scenario is still required

Given the box container 'o' responding '$a'
Given the box container 'a' responding '<a href="y" target="a">A</a> $b'
Given the box container 'b' responding '<a href="">B</a>'
Given 'o' contains 'a'
Given 'a' contains 'b'
Given the request argument '_a/_b/foo' is 'B'
When I get the response from 'o'
Then the response should be '<a href="?_a[!]=y&_=a">A</a> <a href="?_a[_]=b&_=a">B</a>'

Do not keep child state if target changes

Given the box container 'o' responding '$a $b'
Given the box container 'a' responding '<a href="x" target="b">A</a>'
Given the box container 'b' responding '$c'
Given the box container 'c' responding 'C'
Given 'o' contains 'a'
Given 'o' contains 'b'
Given 'b' contains 'c'
Given the request argument '_b/_c/foo' is 'A'
When I get the response from 'o'
Then the response should be '<a href="?_b[!]=x&_=b">A</a> C'