Fix valuePair cypress test by reverting script setup conversion for now

This commit is contained in:
Matthias 2022-12-17 20:42:19 +01:00
parent b2ef4343ec
commit d227360942
2 changed files with 14 additions and 12 deletions

View File

@ -1,12 +1,8 @@
import ValuePair from './ValuePair.vue'; import ValuePair from '@/components/general/ValuePair.vue';
it('renders a message', () => { it('renders a message', () => {
const msg = 'Test description'; const msg = 'Test description';
cy.mount(ValuePair, { cy.mount(ValuePair, { props: { description: msg } });
propsData: {
description: msg,
},
});
cy.get('label').contains(msg); cy.get('label').contains(msg);
}); });

View File

@ -10,14 +10,20 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script lang="ts">
import InfoBox from '@/components/general/InfoBox.vue'; import InfoBox from '@/components/general/InfoBox.vue';
defineProps({ import { defineComponent } from 'vue';
description: { type: String, required: true },
help: { type: String, default: '', required: false }, export default defineComponent({
classLabel: { type: String, default: 'col-4 fw-bold mb-0' }, name: 'ValuePair',
classValue: { type: String, default: 'col-8' }, components: { InfoBox },
props: {
description: { type: String, required: true },
help: { type: String, default: '', required: false },
classLabel: { type: String, default: 'col-4 fw-bold mb-0' },
classValue: { type: String, default: 'col-8' },
},
}); });
</script> </script>