TEST 1 - default injection mode

Using the default injection mode ('inner bottom'), a list is injected. It should appear at the bottom of the inner gray block.

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 2 - inner top

Using the 'inner top' injection mode, a list is injected. It should appear at the top of the inner gray block.

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 3 - inner replace

Using the 'inner replace' injection mode, a list is injected. It should be the only contents of the inner gray block.

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 4 - outer top

Using the 'outer top' injection mode, a list is injected. It should appear just before the inner gray block, in the outer block.

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 5 - outer bottom

Using the 'outer bottom' injection mode, a list is injected. It should appear just after the inner gray block, in the outer block.

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 6 - outer replace

Using the 'outer replace' injection mode, a list is injected. It should completely replace the inner gray block (which, therefore, you shouldn't see), and should appear in the middle of the outer block's content, between the "stuff before the test node" and the "stuff after the test node".

stuff before the test node

existing stuff inside the test node

stuff after the test node

TEST 7 - outer bottom (when no existing content there)

Using the 'outer bottom' injection mode, a list is injected when there is no existing content after the node. It should appear just after the inner gray block, in the outer block. This specifically tests conditional logic in Uize.Dom.Basics.injectHtml that handles choosing the appropriate DOM methods when the node has no next sibling to insert before (so appendChild has to be used instead).

stuff before the test node

existing stuff inside the test node

TEST 8 - inner top (when no existing content there)

Using the 'inner top' injection mode, a list is injected when there is no existing content inside the node. It should appear inside the inner gray block. This specifically tests conditional logic in Uize.Dom.Basics.injectHtml that handles using innerHTML replacement as an optimization for this special case.

stuff before the test node
stuff after the test node