TT#130250 Add data-cy selectors for QR code

Change-Id: I521fcb79feab8a840ea0c88a9e20fe9fa60b92cd
mr10.0
Carlo Venusino 4 years ago committed by Hans-Peter Herzog
parent ac204b353b
commit 61da9933e4

@ -4,7 +4,7 @@ import _ from 'lodash'
export default ({ app, Vue }) => {
Vue.mixin({
mounted () {
if (this.$vnode && this.$el && this.$el.setAttribute) {
if (this.$vnode && this.$el && this.$el.setAttribute && this.$el.getAttribute && !this.$el.getAttribute('data-cy')) {
let dataCy = _.get(this.$vnode, 'componentOptions.Ctor.extendOptions.name', null)
if (dataCy !== null && this.$vnode.key) {
dataCy += '--' + this.$vnode.key

@ -12,6 +12,7 @@
spinner-color="primary"
:ratio="1"
width="300px"
data-cy="qr-code-img"
/>
<div
v-else

@ -61,6 +61,7 @@
class="q-ml-sm"
icon="qr_code"
color="primary"
data-cy="qr-code-btn"
@click="showQrDialog"
/>
<q-space />

Loading…
Cancel
Save