Added node index in assert texts, code formatting and use createPseudoElement()