From 61da9933e40644cd637f90f73b9e12760f96acde Mon Sep 17 00:00:00 2001 From: Carlo Venusino Date: Wed, 14 Jul 2021 14:09:24 +0200 Subject: [PATCH] TT#130250 Add data-cy selectors for QR code Change-Id: I521fcb79feab8a840ea0c88a9e20fe9fa60b92cd --- src/boot/e2e-testing.js | 2 +- src/components/CscDialogQrCode.vue | 1 + src/layouts/CscLayoutMain.vue | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) 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" />