mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #1818 from gradido/fix-double-load-transaction-links
fix: Double Load Transaction Links
This commit is contained in:
commit
d7801ba342
@ -132,6 +132,27 @@ describe('TransactionLinkSummary', () => {
|
||||
it('has no component CollapseLinksList', () => {
|
||||
expect(wrapper.findComponent({ name: 'CollapseLinksList' }).isVisible()).toBe(false)
|
||||
})
|
||||
|
||||
describe('reopen transaction link details', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks()
|
||||
wrapper.find('div.transaction-link-details').trigger('click')
|
||||
})
|
||||
|
||||
it('calls the API to get the list transaction links', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith({
|
||||
query: listTransactionLinks,
|
||||
variables: {
|
||||
currentPage: 1,
|
||||
},
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
})
|
||||
|
||||
it('has four transactionLinks', () => {
|
||||
expect(wrapper.vm.transactionLinks).toHaveLength(4)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
describe('load more transaction links', () => {
|
||||
|
||||
@ -83,6 +83,7 @@ export default {
|
||||
if (this.visible) {
|
||||
this.visible = false
|
||||
} else {
|
||||
this.transactionLinks = []
|
||||
this.updateListTransactionLinks()
|
||||
this.visible = true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user