remove further emails

This commit is contained in:
Moriz Wahl 2023-04-18 13:42:56 +02:00
parent fce0f04ab6
commit a09f1b3800
7 changed files with 7 additions and 37 deletions

View File

@ -15,7 +15,7 @@ describe('LanguageSwitch', () => {
let wrapper
const state = {
email: 'he@ho.he',
gradidoID: 'current-user-id',
language: null,
}

View File

@ -31,7 +31,7 @@ export default {
async saveLocale(locale) {
// if (this.$i18n.locale === locale) return
this.setLocale(locale)
if (this.$store.state.email) {
if (this.$store.state.gradidoID) {
this.$apollo
.mutate({
mutation: updateUserInfos,

View File

@ -15,7 +15,7 @@ describe('LanguageSwitch', () => {
let wrapper
const state = {
email: 'he@ho.he',
gradidoID: 'current-user-id',
language: null,
}

View File

@ -59,7 +59,7 @@ export default {
async saveLocale(locale) {
if (this.$i18n.locale === locale) return
this.setLocale(locale)
if (this.$store.state.email) {
if (this.$store.state.gradidoID) {
this.$apollo
.mutate({
mutation: updateUserInfos,

View File

@ -20,7 +20,7 @@ const mocks = {
state: {
firstName: 'Testy',
lastName: 'User',
email: 'testy.user@example.com',
gradidoID: 'current-user-id',
},
},
}
@ -64,8 +64,8 @@ describe('AuthNavbar', () => {
)
})
it('has the email address', () => {
// expect(wrapper.find('div.small:nth-child(2)').text()).toBe(wrapper.vm.$store.state.email)
// I think this should be username
it.skip('has the email address', () => {
expect(wrapper.find('div[data-test="navbar-item-email"]').text()).toBe(
wrapper.vm.$store.state.email,
)

View File

@ -18,7 +18,6 @@ describe('UserCard_Newsletter', () => {
$store: {
state: {
language: 'de',
email: 'peter@lustig.de',
newsletterState: true,
},
commit: storeCommitMock,

View File

@ -43,7 +43,6 @@ const mocks = {
$store: {
dispatch: storeDispatchMock,
state: {
email: 'user@example.org',
publisherId: 123,
firstName: 'User',
lastName: 'Example',
@ -260,34 +259,6 @@ describe('DashboardLayout', () => {
})
})
describe.skip('elopage URI', () => {
describe('user has no publisher ID and no elopage', () => {
beforeEach(() => {
mocks.$store.state.publisherId = null
mocks.$store.state.hasElopage = false
wrapper = Wrapper()
})
it('links to basic-de', () => {
expect(wrapper.vm.elopageUri).toBe(
'https://elopage.com/s/gradido/basic-de/payment?locale=en&prid=111&pid=2896&firstName=User&lastName=Example&email=user@example.org',
)
})
})
describe('user has elopage', () => {
beforeEach(() => {
mocks.$store.state.publisherId = '123'
mocks.$store.state.hasElopage = true
wrapper = Wrapper()
})
it('links to sign in for elopage', () => {
expect(wrapper.vm.elopageUri).toBe('https://elopage.com/s/gradido/sign_in?locale=en')
})
})
})
describe.skip('admin method', () => {
const windowLocationMock = jest.fn()
beforeEach(() => {