js testing: synchronous ajax, assertElements with support for text and RegEx values