diff --git a/src/boot/e2e-testing.js b/src/boot/e2e-testing.js index a083dddf..d10b7e79 100644 --- a/src/boot/e2e-testing.js +++ b/src/boot/e2e-testing.js @@ -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 diff --git a/src/components/CscDialogQrCode.vue b/src/components/CscDialogQrCode.vue index d2e1c9f3..a3e44363 100644 --- a/src/components/CscDialogQrCode.vue +++ b/src/components/CscDialogQrCode.vue @@ -12,6 +12,7 @@ spinner-color="primary" :ratio="1" width="300px" + data-cy="qr-code-img" />