Closed aciccarello closed 5 years ago
Enhancement Add a method to assertion templates to allow removing an element using a selector. This currently requires replacing the children of the parent element and filtering out the children.
Package Version: @dojo/framework@^5.0.0
@dojo/framework@^5.0.0
Code
const baseTemplate = assertionTemplate(() => v('div', { key: 'wrapper' } [ v('div', { key: 'first' }, ['Content']), v('div', { key: 'second' }, ['Content']), v('div', { key: 'third' }, ['Content']), v('div', { key: 'fourth' }, ['Content']), ]));
Expected behavior:
baseTemplate.remove('@second')
Would return the assertion template without the node with key
Actual behavior:
baseTemplate.replace('@wrapper', [ v('div', { key: 'first' }, ['Content']), v('div', { key: 'third' }, ['Content']), v('div', { key: 'fourth' }, ['Content']), ]);
Currently you need to replace all the children to remove one.
Would be closed by #314
Closed by #412
Enhancement Add a method to assertion templates to allow removing an element using a selector. This currently requires replacing the children of the parent element and filtering out the children.
Package Version:
@dojo/framework@^5.0.0
Code
Expected behavior:
Would return the assertion template without the node with key
Actual behavior:
Currently you need to replace all the children to remove one.
Would be closed by #314