Merge pull request #987 from gradido/test-default-pid

fix: Test Default Publisher ID in Sidebar Menu
This commit is contained in:
Moriz Wahl 2021-10-18 19:03:56 +02:00 committed by GitHub
commit dfd4ebf155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,6 +124,23 @@ describe('SideBar', () => {
expect(wrapper.findAll('li').at(0).text()).not.toContain('!') expect(wrapper.findAll('li').at(0).text()).not.toContain('!')
}) })
}) })
describe("member's area with default publisher ID and no elopage", () => {
beforeEach(() => {
mocks.$store.state.publisherId = null
mocks.$store.state.hasElopage = false
})
it('links to the elopage member area with default publisher ID', () => {
expect(wrapper.findAll('li').at(0).find('a').attributes('href')).toBe(
'https://elopage.com/s/gradido/basic-de/payment?locale=de&prid=111&pid=2896&firstName=test&lastName=example&email=test@example.org',
)
})
it('has a badge', () => {
expect(wrapper.findAll('li').at(0).text()).toContain('!')
})
})
}) })
describe('logout', () => { describe('logout', () => {