mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
tests for pagenation exists
This commit is contained in:
parent
d488b037bd
commit
48b73c2515
@ -405,33 +405,22 @@ describe('GddTransactionList', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('pagination buttons', () => {
|
// describe('pagination buttons', () => {
|
||||||
/* const transactions = Array.from({ length: 42 }, (_, idx) => {
|
// describe('updates transaction count < 25', () => {
|
||||||
return {
|
// beforeEach(async () => {
|
||||||
amount: '3.14',
|
// await wrapper.setProps({
|
||||||
balanceDate: '2021-04-29T17:26:40+00:00',
|
// transactionCount: 2,
|
||||||
decay: {},
|
// })
|
||||||
memo: 'Kreiszahl PI',
|
// })
|
||||||
linkedUser: {
|
|
||||||
firstName: 'Bibi',
|
|
||||||
lastName: 'Bloxberg',
|
|
||||||
__typename: 'User',
|
|
||||||
},
|
|
||||||
id: idx + 1,
|
|
||||||
typeId: 'RECEIVE',
|
|
||||||
balance: '33.33',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
*/
|
|
||||||
|
|
||||||
it('shows no pagination buttons if transactionCount < pageSize', () => {
|
// it('updates transaction count', () => {
|
||||||
beforeEach(async () => {
|
// expect(wrapper.vm.transactionCount).toBe(2)
|
||||||
await wrapper.setProps({
|
// })
|
||||||
transactionCount: 2,
|
|
||||||
})
|
// it('shows no pagination buttons if transactionCount < pageSize', () => {
|
||||||
})
|
// expect(wrapper.find('div.pagination').exists()).toBe(false)
|
||||||
expect(wrapper.find('div.pagination').exists()).toBe(false)
|
// })
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@ -166,25 +166,41 @@ describe('GdtTransactionList ', () => {
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
|
||||||
describe('pagination buttons', () => {
|
describe('pagination buttons', () => {
|
||||||
it('shows the pagination buttons if transactionCount > pageSize', () => {
|
describe('with transactionCount > pageSize', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await wrapper.setProps({
|
apolloMock.mockResolvedValue({
|
||||||
transactionGdtCount: 42,
|
data: {
|
||||||
|
listGDTEntries: {
|
||||||
|
count: 42,
|
||||||
|
gdtEntries: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
it('shows the pagination buttons', () => {
|
||||||
|
expect(wrapper.find('ul.pagination').exists()).toBe(true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
expect(wrapper.find('div.pagination').exists()).toBe(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it('shows no the pagination buttons if transactionCount < pageSize', () => {
|
describe('with transactionCount < pageSize', () => {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
await wrapper.setProps({
|
apolloMock.mockResolvedValue({
|
||||||
transactionGdtCount: 2,
|
data: {
|
||||||
|
listGDTEntries: {
|
||||||
|
count: 2,
|
||||||
|
gdtEntries: [],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
wrapper = Wrapper()
|
||||||
|
})
|
||||||
|
it('shows no pagination buttons', () => {
|
||||||
|
expect(wrapper.find('ul.pagination').exists()).toBe(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
expect(wrapper.find('div.pagination').exists()).toBe(false)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user