diff --git a/frontend/src/components/LanguageSwitch.spec.js b/frontend/src/components/LanguageSwitch.spec.js index 72771bd37..afe98b357 100644 --- a/frontend/src/components/LanguageSwitch.spec.js +++ b/frontend/src/components/LanguageSwitch.spec.js @@ -15,7 +15,6 @@ describe('LanguageSwitch', () => { let wrapper const state = { - sessionId: 1234, email: 'he@ho.he', language: null, } @@ -123,7 +122,6 @@ describe('LanguageSwitch', () => { expect(updateUserInfosQueryMock).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1234, email: 'he@ho.he', locale: 'en', }, @@ -136,7 +134,6 @@ describe('LanguageSwitch', () => { expect(updateUserInfosQueryMock).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1234, email: 'he@ho.he', locale: 'de', }, diff --git a/frontend/src/components/LanguageSwitch.vue b/frontend/src/components/LanguageSwitch.vue index 54c3728cc..f0528a935 100644 --- a/frontend/src/components/LanguageSwitch.vue +++ b/frontend/src/components/LanguageSwitch.vue @@ -32,7 +32,7 @@ export default { localeChanged(locale) }, async saveLocale(locale) { - if (this.$i18n.locale === locale) return + // if (this.$i18n.locale === locale) return this.setLocale(locale) if (this.$store.state.email) { this.$apollo diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js index f0f08f6a2..12a788a4b 100644 --- a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js +++ b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js @@ -41,7 +41,6 @@ describe('DashboardLayoutGdd', () => { }, $store: { state: { - sessionId: 1, email: 'user@example.org', }, dispatch: storeDispatchMock, @@ -133,11 +132,7 @@ describe('DashboardLayoutGdd', () => { }) it('calls the API', async () => { - expect(apolloMock).toBeCalledWith( - expect.objectContaining({ - variables: { sessionId: 1 }, - }), - ) + expect(apolloMock).toBeCalled() }) it('dispatches logout to store', () => { @@ -196,7 +191,6 @@ describe('DashboardLayoutGdd', () => { expect(apolloMock).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1, firstPage: 2, items: 5, }, diff --git a/frontend/src/views/Pages/AccountOverview.spec.js b/frontend/src/views/Pages/AccountOverview.spec.js index b890f1471..df964ed2c 100644 --- a/frontend/src/views/Pages/AccountOverview.spec.js +++ b/frontend/src/views/Pages/AccountOverview.spec.js @@ -16,12 +16,12 @@ describe('AccountOverview', () => { const mocks = { $t: jest.fn((t) => t), + $n: jest.fn((n) => String(n)), $store: { state: { - sessionId: 1, + email: 'sender@example.org', }, }, - $n: jest.fn((n) => String(n)), $apollo: { query: sendMock, }, @@ -93,7 +93,6 @@ describe('AccountOverview', () => { expect(sendMock).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', amount: 23.45, memo: 'Make the best of it!', diff --git a/frontend/src/views/Pages/Login.spec.js b/frontend/src/views/Pages/Login.spec.js index 7cbe5f003..20eead7a3 100644 --- a/frontend/src/views/Pages/Login.spec.js +++ b/frontend/src/views/Pages/Login.spec.js @@ -6,12 +6,7 @@ const localVue = global.localVue const loginQueryMock = jest.fn().mockResolvedValue({ data: { - login: { - sessionId: 1, - user: { - name: 'Peter Lustig', - }, - }, + login: 'token', }, }) @@ -159,10 +154,7 @@ describe('Login', () => { describe('login success', () => { it('dispatches server response to store', () => { - expect(mockStoreDispach).toBeCalledWith('login', { - sessionId: 1, - user: { name: 'Peter Lustig' }, - }) + expect(mockStoreDispach).toBeCalledWith('login', 'token') }) it('redirects to overview page', () => { diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js index 847185741..b3e014e57 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserData.spec.js @@ -17,7 +17,6 @@ describe('UserCard_FormUserData', () => { $t: jest.fn((t) => t), $store: { state: { - sessionId: 1, email: 'user@example.org', firstName: 'Peter', lastName: 'Lustig', @@ -118,7 +117,6 @@ describe('UserCard_FormUserData', () => { expect(mockAPIcall).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', firstName: 'Petra', lastName: 'Lustiger', @@ -167,7 +165,6 @@ describe('UserCard_FormUserData', () => { expect(mockAPIcall).toBeCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', firstName: 'Petra', lastName: 'Lustiger', diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js b/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js index 93477bdfa..06f26877a 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserMail.spec.js @@ -14,7 +14,6 @@ describe('UserCard_FormUserMail', () => { $t: jest.fn((t) => t), $store: { state: { - sessionId: 1, email: 'user@example.org', firstName: 'Peter', lastName: 'Lustig', @@ -76,7 +75,6 @@ describe('UserCard_FormUserMail', () => { expect(mockAPIcall).toHaveBeenCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', newEmail: 'test@example.org', }, @@ -106,7 +104,6 @@ describe('UserCard_FormUserMail', () => { expect(mockAPIcall).toHaveBeenCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', newEmail: 'test@example.org', }, diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js index c44f7d300..fa4aceb0c 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.spec.js @@ -17,7 +17,6 @@ describe('UserCard_FormUserPasswort', () => { $t: jest.fn((t) => t), $store: { state: { - sessionId: 1, email: 'user@example.org', }, }, @@ -175,7 +174,6 @@ describe('UserCard_FormUserPasswort', () => { expect(changePasswordProfileMock).toHaveBeenCalledWith( expect.objectContaining({ variables: { - sessionId: 1, email: 'user@example.org', password: '1234', passwordNew: 'Aa123456', diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUsername.spec.js b/frontend/src/views/Pages/UserProfile/UserCard_FormUsername.spec.js index b6ab05902..8a69ee7eb 100644 --- a/frontend/src/views/Pages/UserProfile/UserCard_FormUsername.spec.js +++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUsername.spec.js @@ -25,7 +25,6 @@ describe('UserCard_FormUsername', () => { $t: jest.fn((t) => t), $store: { state: { - sessionId: 1, email: 'user@example.org', username: '', }, @@ -111,7 +110,6 @@ describe('UserCard_FormUsername', () => { expect.objectContaining({ variables: { email: 'user@example.org', - sessionId: 1, username: 'username', }, }), @@ -151,7 +149,6 @@ describe('UserCard_FormUsername', () => { expect.objectContaining({ variables: { email: 'user@example.org', - sessionId: 1, username: 'username', }, }),