mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Add test for invisible pagination buttons
This commit is contained in:
parent
9f2d1c4c74
commit
6b9fbc920e
@ -127,7 +127,6 @@ bobsSendings.forEach((sending) => {
|
||||
confirmed: true,
|
||||
})
|
||||
})
|
||||
// Wolle: console.log('bobsSum: ', bobsSum)
|
||||
|
||||
export const creations: CreationInterface[] = [
|
||||
{
|
||||
|
||||
@ -407,9 +407,7 @@ describe('GddTransactionList', () => {
|
||||
})
|
||||
|
||||
describe('pagination buttons', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
transactions: Array.from({ length: 42 }, (_, idx) => {
|
||||
const createTransaction = (idx) => {
|
||||
return {
|
||||
amount: '3.14',
|
||||
balanceDate: '2021-04-29T17:26:40+00:00',
|
||||
@ -428,8 +426,15 @@ describe('GddTransactionList', () => {
|
||||
typeId: 'RECEIVE',
|
||||
balance: '33.33',
|
||||
}
|
||||
}
|
||||
|
||||
beforeEach(async () => {
|
||||
const transactionCount = 42
|
||||
await wrapper.setProps({
|
||||
transactions: Array.from({ length: transactionCount }, (_, idx) => {
|
||||
return createTransaction(idx)
|
||||
}),
|
||||
transactionCount: 42,
|
||||
transactionCount,
|
||||
decayStartBlock,
|
||||
pageSize: 25,
|
||||
showPagination: true,
|
||||
@ -449,23 +454,15 @@ describe('GddTransactionList', () => {
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe.skip('show no pagination', () => {
|
||||
// Wolle: beforeEach(async () => {
|
||||
// await wrapper.setProps({
|
||||
// transactions: [],
|
||||
// transactionCount: 2,
|
||||
// decayStartBlock,
|
||||
// pageSize: 25,
|
||||
// showPagination: false,
|
||||
// })
|
||||
// })
|
||||
|
||||
describe('show no pagination', () => {
|
||||
it('shows no pagination buttons', async () => {
|
||||
const transactionCount = 2
|
||||
await wrapper.setProps({
|
||||
transactions: [],
|
||||
transactionCount: 2,
|
||||
transactions: Array.from({ length: transactionCount }, (_, idx) => {
|
||||
return createTransaction(idx)
|
||||
}),
|
||||
transactionCount,
|
||||
decayStartBlock,
|
||||
pageSize: 25,
|
||||
showPagination: false,
|
||||
@ -475,3 +472,4 @@ describe('GddTransactionList', () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@ -125,10 +125,6 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
isPaginationVisible() {
|
||||
// Wolle: console.log('this.showPagination: ', this.showPagination)
|
||||
// console.log('this.pageSize: ', this.pageSize)
|
||||
// console.log('this.transactions.length: ', this.transactions.length)
|
||||
// console.log('this.transactionCount: ', this.transactionCount)
|
||||
return this.showPagination && this.pageSize < this.transactionCount
|
||||
},
|
||||
},
|
||||
@ -143,6 +139,7 @@ export default {
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
collaps-icon {
|
||||
width: 95%;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user