diff --git a/frontend/src/views/Pages/RegisterCommunity.spec.js b/frontend/src/views/Pages/RegisterCommunity.spec.js index 18f4d5587..177689ba1 100644 --- a/frontend/src/views/Pages/RegisterCommunity.spec.js +++ b/frontend/src/views/Pages/RegisterCommunity.spec.js @@ -1,5 +1,4 @@ -import { mount, RouterLinkStub } from '@vue/test-utils' -import flushPromises from 'flush-promises' +import { mount } from '@vue/test-utils' import RegisterCommunity from './RegisterCommunity' const localVue = global.localVue @@ -21,7 +20,7 @@ describe('RegisterCommunity', () => { description: 'Die lokale Entwicklungsumgebung von Gradido.', }, }, - } + }, } const Wrapper = () => { @@ -43,49 +42,39 @@ describe('RegisterCommunity', () => { }) it('has a current community description', () => { - expect(wrapper.find('.header p').text()).toBe('Die lokale Entwicklungsumgebung von Gradido.') + expect(wrapper.find('.header p').text()).toBe( + 'Die lokale Entwicklungsumgebung von Gradido.', + ) }) it('has a current community location', () => { - expect(wrapper.find('.header p.community-location').text()).toBe('Location: http://localhost:3000/vue/') + expect(wrapper.find('.header p.community-location').text()).toBe( + 'Location: http://localhost:3000/vue/', + ) }) - }) - describe('buttons and links', () => { it('has a button "Continue to registration?"', () => { - expect(wrapper.findAll('a').at(0).text()).toEqual( - 'community.continue-to-registration', - ) + expect(wrapper.findAll('a').at(0).text()).toEqual('community.continue-to-registration') }) it('button links to /register when clicking "Continue to registration"', () => { expect(wrapper.findAll('a').at(0).props().to).toBe('/register') }) it('has a button "Choose another community?"', () => { - expect(wrapper.findAll('a').at(1).text()).toEqual( - 'community.choose-another-community', - ) + expect(wrapper.findAll('a').at(1).text()).toEqual('community.choose-another-community') }) it('button links to /select-community when clicking "Choose another community"', () => { expect(wrapper.findAll('a').at(1).props().to).toBe('/select-community') }) it('has a button "Back to Login?"', () => { - expect(wrapper.findAll('a').at(2).text()).toEqual( - 'back', - ) + expect(wrapper.findAll('a').at(2).text()).toEqual('back') }) it('button links to /login when clicking "Back to Login"', () => { expect(wrapper.findAll('a').at(2).props().to).toBe('/login') }) - }) - - - - }) - -}) \ No newline at end of file +}) diff --git a/frontend/src/views/Pages/RegisterCommunity.vue b/frontend/src/views/Pages/RegisterCommunity.vue index 1878f8829..8c1c3ddf2 100644 --- a/frontend/src/views/Pages/RegisterCommunity.vue +++ b/frontend/src/views/Pages/RegisterCommunity.vue @@ -10,9 +10,7 @@

{{ $store.state.community.description }}

-

- Location: {{ $store.state.community.url }} -

+

Location: {{ $store.state.community.url }}

diff --git a/frontend/src/views/Pages/RegisterSelectCommunity.spec.js b/frontend/src/views/Pages/RegisterSelectCommunity.spec.js index 31ae0be3b..986caf368 100644 --- a/frontend/src/views/Pages/RegisterSelectCommunity.spec.js +++ b/frontend/src/views/Pages/RegisterSelectCommunity.spec.js @@ -1,42 +1,39 @@ -import { mount, RouterLinkStub } from '@vue/test-utils' -import flushPromises from 'flush-promises' +import { mount } from '@vue/test-utils' import RegisterSelectCommunity from './RegisterSelectCommunity' const localVue = global.localVue describe('RegisterSelectCommunity', () => { - let wrapper + let wrapper - const mocks = { - $i18n: { - locale: 'en', - }, - $t: jest.fn((t) => t), - $store: { - state: { - community: { - name: 'Gradido Entwicklung', - url: 'http://localhost:3000/vue/', - registerUrl: 'http://localhost:3000/vue/register', - description: 'Die lokale Entwicklungsumgebung von Gradido.', - }, - }, - } - } + const mocks = { + $i18n: { + locale: 'en', + }, + $t: jest.fn((t) => t), + $store: { + state: { + community: { + name: 'Gradido Entwicklung', + url: 'http://localhost:3000/vue/', + registerUrl: 'http://localhost:3000/vue/register', + description: 'Die lokale Entwicklungsumgebung von Gradido.', + }, + }, + }, + } - const Wrapper = () => { - return mount(RegisterSelectCommunity, { localVue, mocks }) - } + const Wrapper = () => { + return mount(RegisterSelectCommunity, { localVue, mocks }) + } - describe('mount', () => { - beforeEach(() => { - wrapper = Wrapper() - }) - - it('renders the Div Element "#register-select-community"', () => { - expect(wrapper.find('div#register-select-community').exists()).toBeTruthy() - }) - + describe('mount', () => { + beforeEach(() => { + wrapper = Wrapper() }) - - }) \ No newline at end of file + + it('renders the Div Element "#register-select-community"', () => { + expect(wrapper.find('div#register-select-community').exists()).toBeTruthy() + }) + }) +})