e2e: cleanup tests, remove XPATH selectors

This commit is contained in:
Jens Langhammer
2020-09-28 18:17:07 +02:00
parent 67b69cb5d3
commit e54b98a80e
16 changed files with 60 additions and 101 deletions

View File

@ -14,7 +14,7 @@
{% if application_pre %}
<p>
{% blocktrans with app_name=application_pre.name %}
Login to continue to <strong>{{ app_name }}</strong>.
Login to continue to <strong id="application-name">{{ app_name }}</strong>.
{% endblocktrans %}
</p>
{% endif %}

View File

@ -36,9 +36,7 @@ class OTPTimeStageView(FormView, StageView):
qr_code = QRCode(image_factory=SvgFillImage)
qr_code.add_data(device.config_url)
svg_image = tostring(qr_code.make_image().get_image())
sr_wrapper = (
f'<div aria-label="{device.config_url}">{force_str(svg_image)}</div>'
)
sr_wrapper = f'<div id="qr" data-otpuri="{device.config_url}">{force_str(svg_image)}</div>'
return sr_wrapper
def get(self, request: HttpRequest, *args, **kwargs) -> HttpResponse: