Tried to make an integration test that asserts the rendered
act-as footer html with a regular expression, but saw that this
will not work

It's possible to check for hardcoded text with regular expressions on the
rendered html, but there's no apparent way to detect the rendered html

For example page.body contains the anuglar markup, not what a user sees as rendered:

<p>
 You're currently viewing as <span data-ng-bind="api.user.profile.full_name"></span> (<span data-ng-bind="api.user.profile.uid"></span>)
 <button class="cc-button cc-button-blue cc-right" data-ng-click="admin.stopActAs()" type="button">Stop viewing as</button>
</p>

So, how can we test this?????