[1030889] Refact createExpandableContainer and fixed unit tests with pseudo element rules