mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-14 00:44:41 +00:00
fix tests after new layout
This commit is contained in:
parent
281c3bf717
commit
0f0a5a8807
@ -17,6 +17,12 @@ const mocks = {
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
},
|
||||
$store: {
|
||||
state: {
|
||||
firstName: 'Bibi',
|
||||
lastName: 'Bloxberg',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
const propsData = {
|
||||
@ -102,10 +108,10 @@ describe('TransactionLinkSummary', () => {
|
||||
|
||||
describe('click on transaction links', () => {
|
||||
beforeEach(async () => {
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
|
||||
it.skip('calls the API to get the list transaction links', () => {
|
||||
it('calls the API to get the list transaction links', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith({
|
||||
query: listTransactionLinks,
|
||||
variables: {
|
||||
@ -115,14 +121,14 @@ describe('TransactionLinkSummary', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it.skip('has four transactionLinks', () => {
|
||||
it('has four transactionLinks', () => {
|
||||
expect(wrapper.vm.transactionLinks).toHaveLength(4)
|
||||
})
|
||||
|
||||
describe('close transaction link details', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks()
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
|
||||
it('does not call the API', () => {
|
||||
@ -136,10 +142,10 @@ describe('TransactionLinkSummary', () => {
|
||||
describe('reopen transaction link details', () => {
|
||||
beforeEach(() => {
|
||||
jest.clearAllMocks()
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
|
||||
it.skip('calls the API to get the list transaction links', () => {
|
||||
it('calls the API to get the list transaction links', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith({
|
||||
query: listTransactionLinks,
|
||||
variables: {
|
||||
@ -149,7 +155,7 @@ describe('TransactionLinkSummary', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it.skip('has four transactionLinks', () => {
|
||||
it('has four transactionLinks', () => {
|
||||
expect(wrapper.vm.transactionLinks).toHaveLength(4)
|
||||
})
|
||||
})
|
||||
@ -214,8 +220,8 @@ describe('TransactionLinkSummary', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('has four transactionLinks', () => {
|
||||
expect(wrapper.vm.transactionLinks).toHaveLength(4)
|
||||
it('has eight transactionLinks', () => {
|
||||
expect(wrapper.vm.transactionLinks).toHaveLength(8)
|
||||
})
|
||||
|
||||
it('loads more transaction links', () => {
|
||||
@ -230,19 +236,19 @@ describe('TransactionLinkSummary', () => {
|
||||
|
||||
describe('close transaction link list', () => {
|
||||
beforeEach(async () => {
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
describe('reopen transaction link list', () => {
|
||||
beforeEach(async () => {
|
||||
jest.clearAllMocks()
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
|
||||
it.skip('calls the API once', () => {
|
||||
it('calls the API once', () => {
|
||||
expect(apolloQueryMock).toBeCalledTimes(1)
|
||||
})
|
||||
|
||||
it.skip('calls the API with current page one', () => {
|
||||
it('calls the API with current page one', () => {
|
||||
expect(apolloQueryMock).toBeCalledWith({
|
||||
query: listTransactionLinks,
|
||||
variables: {
|
||||
@ -289,10 +295,10 @@ describe('TransactionLinkSummary', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe.skip('loads transaction links with error', () => {
|
||||
describe('loads transaction links with error', () => {
|
||||
beforeEach(() => {
|
||||
apolloQueryMock.mockRejectedValue({ message: 'OUCH!' })
|
||||
wrapper.find('div.transaction-slot-link').trigger('click')
|
||||
wrapper.find('div.row').trigger('click')
|
||||
})
|
||||
|
||||
it('toasts an error message', () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user