mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
Merge branch 'master' into adminPendingCreationQueries
This commit is contained in:
commit
73a49eacff
@ -114,6 +114,11 @@
|
|||||||
"message": "hallo gradido !!",
|
"message": "hallo gradido !!",
|
||||||
"overview": "Übersicht",
|
"overview": "Übersicht",
|
||||||
"privacy_policy": "Datenschutzerklärung",
|
"privacy_policy": "Datenschutzerklärung",
|
||||||
|
"publisher": {
|
||||||
|
"infoNoRegister": "Dies ist für die Registrieung nicht nötig!",
|
||||||
|
"infoText": "Trage hier die ID des Herausgebers ein. Wenn du keine ID hast dann bitte leer lassen.",
|
||||||
|
"publisherId": "PublisherID"
|
||||||
|
},
|
||||||
"send": "Senden",
|
"send": "Senden",
|
||||||
"settings": {
|
"settings": {
|
||||||
"coinanimation": {
|
"coinanimation": {
|
||||||
|
|||||||
@ -114,6 +114,11 @@
|
|||||||
"message": "hello gradido !!",
|
"message": "hello gradido !!",
|
||||||
"overview": "Overview",
|
"overview": "Overview",
|
||||||
"privacy_policy": "Privacy policy",
|
"privacy_policy": "Privacy policy",
|
||||||
|
"publisher": {
|
||||||
|
"infoNoRegister": "This is not necessary for registration!",
|
||||||
|
"infoText": "Enter the ID of the publisher here. If you do not have an ID, please leave it blank.",
|
||||||
|
"publisherId": "PublisherID"
|
||||||
|
},
|
||||||
"send": "Send",
|
"send": "Send",
|
||||||
"settings": {
|
"settings": {
|
||||||
"coinanimation": {
|
"coinanimation": {
|
||||||
|
|||||||
@ -11,6 +11,7 @@ const {
|
|||||||
coinanimation,
|
coinanimation,
|
||||||
newsletterState,
|
newsletterState,
|
||||||
publisherId,
|
publisherId,
|
||||||
|
isAdmin,
|
||||||
community,
|
community,
|
||||||
hasElopage,
|
hasElopage,
|
||||||
} = mutations
|
} = mutations
|
||||||
@ -104,6 +105,14 @@ describe('Vuex store', () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('isAdmin', () => {
|
||||||
|
it('sets the state of isAdmin', () => {
|
||||||
|
const state = { isAdmin: null }
|
||||||
|
isAdmin(state, true)
|
||||||
|
expect(state.isAdmin).toEqual(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('community', () => {
|
describe('community', () => {
|
||||||
it('sets the state of community', () => {
|
it('sets the state of community', () => {
|
||||||
const state = {}
|
const state = {}
|
||||||
|
|||||||
@ -170,6 +170,11 @@ describe('Register', () => {
|
|||||||
expect(wrapper.find('#registerCheckbox').exists()).toBeTruthy()
|
expect(wrapper.find('#registerCheckbox').exists()).toBeTruthy()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('has PublisherId input fields', () => {
|
||||||
|
wrapper.find('.publisherCollaps').trigger('click')
|
||||||
|
expect(wrapper.find('#publisherid').exists()).toBe(true)
|
||||||
|
})
|
||||||
|
|
||||||
it('has disabled submit button when not completely filled', () => {
|
it('has disabled submit button when not completely filled', () => {
|
||||||
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
expect(wrapper.find('button[type="submit"]').attributes('disabled')).toBe('disabled')
|
||||||
})
|
})
|
||||||
@ -221,6 +226,11 @@ describe('Register', () => {
|
|||||||
wrapper.find('input[name="form.password"]').setValue('Aa123456_')
|
wrapper.find('input[name="form.password"]').setValue('Aa123456_')
|
||||||
wrapper.find('input[name="form.passwordRepeat"]').setValue('Aa123456_')
|
wrapper.find('input[name="form.passwordRepeat"]').setValue('Aa123456_')
|
||||||
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
wrapper.find('.language-switch-select').findAll('option').at(1).setSelected()
|
||||||
|
wrapper.find('#publisherid').setValue('12345')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('commits publisherId to store', () => {
|
||||||
|
expect(mockStoreCommit).toBeCalledWith('publisherId', 12345)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('has enabled submit button when completely filled', () => {
|
it('has enabled submit button when completely filled', () => {
|
||||||
|
|||||||
@ -121,8 +121,44 @@
|
|||||||
{{ messageError }}
|
{{ messageError }}
|
||||||
</span>
|
</span>
|
||||||
</b-alert>
|
</b-alert>
|
||||||
|
<b-row v-b-toggle:my-collapse class="text-muted shadow-sm p-3 publisherCollaps">
|
||||||
|
<b-col>
|
||||||
|
{{ $t('publisher.publisherId') }} : {{ $store.state.publisherId }}
|
||||||
|
</b-col>
|
||||||
|
<b-col class="text-right">
|
||||||
|
<b-icon icon="chevron-down" aria-hidden="true"></b-icon>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
<b-row>
|
||||||
|
<b-col>
|
||||||
|
<b-collapse id="my-collapse" class="">
|
||||||
|
<b-input-group class="shadow-sm p-2 bg-white rounded">
|
||||||
|
<b-input-group-prepend is-text>
|
||||||
|
<b-icon icon="person-fill"></b-icon>
|
||||||
|
</b-input-group-prepend>
|
||||||
|
<b-form-input
|
||||||
|
id="publisherid"
|
||||||
|
type="text"
|
||||||
|
placeholder="Publisher ID"
|
||||||
|
v-model="publisherId"
|
||||||
|
@input="commitStore(publisherId)"
|
||||||
|
></b-form-input>
|
||||||
|
</b-input-group>
|
||||||
|
<div
|
||||||
|
v-b-toggle:my-collapse
|
||||||
|
class="text-center mt-1 shadow-lg p-3 mb-5 rounded"
|
||||||
|
>
|
||||||
|
{{ $t('publisher.infoText') }}
|
||||||
|
<span class="text-dark">{{ $t('publisher.infoNoRegister') }}</span>
|
||||||
|
<div class="text-center">
|
||||||
|
<b-icon icon="chevron-up" aria-hidden="true"></b-icon>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</b-collapse>
|
||||||
|
</b-col>
|
||||||
|
</b-row>
|
||||||
|
|
||||||
<div class="text-center">
|
<div class="text-center mt-5">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<router-link class="test-button-back" to="/login">
|
<router-link class="test-button-back" to="/login">
|
||||||
<b-button variant="outline-secondary" class="mr-4">
|
<b-button variant="outline-secondary" class="mr-4">
|
||||||
@ -185,6 +221,7 @@ export default {
|
|||||||
showError: false,
|
showError: false,
|
||||||
messageError: '',
|
messageError: '',
|
||||||
register: true,
|
register: true,
|
||||||
|
publisherId: this.$store.state.publisherId,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -197,6 +234,9 @@ export default {
|
|||||||
getValidationState({ dirty, validated, valid = null }) {
|
getValidationState({ dirty, validated, valid = null }) {
|
||||||
return dirty || validated ? valid : null
|
return dirty || validated ? valid : null
|
||||||
},
|
},
|
||||||
|
commitStore(val) {
|
||||||
|
this.$store.commit('publisherId', val)
|
||||||
|
},
|
||||||
async onSubmit() {
|
async onSubmit() {
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user