mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
more tests
This commit is contained in:
parent
28b871f11b
commit
25e42683f3
@ -15,7 +15,7 @@ describe('TransactionCollapse', () => {
|
||||
amount: 100,
|
||||
gdt: 110,
|
||||
factor: 22,
|
||||
gdtEntryType: 4,
|
||||
gdtEntryType: 1,
|
||||
}
|
||||
|
||||
const Wrapper = () => {
|
||||
@ -31,20 +31,32 @@ describe('TransactionCollapse', () => {
|
||||
expect(wrapper.find('div.gdt-transaction-collapse').exists()).toBeTruthy()
|
||||
})
|
||||
|
||||
it('checks the prop amount ', () => {
|
||||
expect(wrapper.props().amount).toBe(100)
|
||||
it('renders the component clooaps-header', () => {
|
||||
expect(wrapper.find('.gdt-list-clooaps-header-text')).toBeTruthy()
|
||||
})
|
||||
|
||||
it('checks the prop gdt ', () => {
|
||||
expect(wrapper.props().gdt).toBe(110)
|
||||
it('renders the component clooaps-headline', () => {
|
||||
expect(wrapper.find('#clooaps-headline').text()).toBe('gdt.calculation')
|
||||
})
|
||||
|
||||
it('checks the prop factor ', () => {
|
||||
expect(wrapper.props().factor).toBe(22)
|
||||
it('renders the component clooaps-first', () => {
|
||||
expect(wrapper.find('#clooaps-first').text()).toBe('gdt.factor')
|
||||
})
|
||||
|
||||
it('renders the component clooaps-second', () => {
|
||||
expect(wrapper.find('#clooaps-second').text()).toBe('gdt.formula')
|
||||
})
|
||||
|
||||
it('renders the component clooaps-firstMath', () => {
|
||||
expect(wrapper.find('#clooaps-firstMath').text()).toBe('22 GDT pro €')
|
||||
})
|
||||
|
||||
it('renders the component clooaps-secondMath', () => {
|
||||
expect(wrapper.find('#clooaps-secondMath').text()).toBe('100 € * 22 GDT / € = 110 GDT')
|
||||
})
|
||||
|
||||
it('checks the prop gdtEntryType ', () => {
|
||||
expect(wrapper.props().gdtEntryType).toBe(4)
|
||||
expect(wrapper.props().gdtEntryType).toBe(1)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div class="gdt-transaction-collapse">
|
||||
<b-row class="gdt-list-clooaps-header-text text-center pb-3">
|
||||
<div class="col h4">
|
||||
<div id="clooaps-headline" class="col h4">
|
||||
{{ getLinesByType(gdtEntryType).headline }}
|
||||
</div>
|
||||
</b-row>
|
||||
<b-row class="gdt-list-clooaps-box--all">
|
||||
<div class="col-6 text-right clooaps-col-left">
|
||||
<div>{{ getLinesByType(gdtEntryType).first }}</div>
|
||||
<div>{{ getLinesByType(gdtEntryType).second }}</div>
|
||||
<div id="clooaps-first">{{ getLinesByType(gdtEntryType).first }}</div>
|
||||
<div id="clooaps-second">{{ getLinesByType(gdtEntryType).second }}</div>
|
||||
</div>
|
||||
<div class="col-6 clooaps-col-right">
|
||||
<div>{{ getLinesByType(gdtEntryType).firstMath }}</div>
|
||||
<div>
|
||||
<div id="clooaps-firstMath">{{ getLinesByType(gdtEntryType).firstMath }}</div>
|
||||
<div id="clooaps-secondMath">
|
||||
{{ getLinesByType(gdtEntryType).secondMath }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user