Tests: HTMLElement.new()

Create new HTMLElements:

1. Usage: HTMLElement.new(name <String>, [attributelist], text <String>))

Expected: three new items are added below this text, each with a short text explaining what they are:

Expected: a list of new items is added to the list element below:

Create new element with attributes:

Usage: HTMLElement.new(name <String>, attributelist <Object>, text <String>))

Expected: A link with href, target and class attributes. Also with a text content:

Link:

Create new element with sub-elements

Usage: HTMLElement.new(name <String>, [attributelist], subElement <HTMLElement>))

Expected: a new details/summary field with a title. The field is open by default (but has no content!)

Create new element with multiple sub-elements

Usage: HTMLElement.new(name <String>, [attributelist], elementList <Array> of <HTMLElement>))

Expected: a new details/summary field (closed by default). When opening, it reveals a list of items: