From 652f6d1edc0e650eaf2c1f42909113f43ba4d47f Mon Sep 17 00:00:00 2001 From: ogerly Date: Fri, 6 Dec 2019 10:53:26 +0100 Subject: [PATCH] fix reviews ContributionForm, ContributionForm.spec --- .../ContributionForm/ContributionForm.spec.js | 10 +------- .../ContributionForm/ContributionForm.vue | 14 +++++------ webapp/pages/post/_id/_slug/index.vue | 25 ++++++------------- 3 files changed, 15 insertions(+), 34 deletions(-) diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index c84700106..588ac0b0b 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -243,15 +243,7 @@ describe('ContributionForm.vue', () => { expect(mocks.$apollo.mutate).toHaveBeenCalledTimes(1) }) - describe('questionable images should be blurred', () => { - it('questionable images unset be blurred', async () => { - expectedParams.variables.imageUpload = imageUpload - wrapper.find(TeaserImage).vm.$emit('addTeaserImage', imageUpload) - expect(wrapper.find('.images-set-blur').exists()).toBe(false) - await wrapper.find('input[type="checkbox"]').trigger('click') - expect(wrapper.find('.images-set-blur').exists()).toBe(true) - }) - }) + it("pushes the user to the post's page", async () => { wrapper.find('form').trigger('submit') diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue index f2ec8327e..f476ef8c9 100644 --- a/webapp/components/ContributionForm/ContributionForm.vue +++ b/webapp/components/ContributionForm/ContributionForm.vue @@ -19,11 +19,11 @@ :src="contribution.image | proxyApiUrl" /> - +
@@ -32,17 +32,17 @@
- + - +
@@ -340,13 +340,13 @@ export default { -o-transition: all ease 0.2s; transition: all ease 0.2s; } -.blurBox { +.blur-box { text-align: right; position: relative; top: -70px; float: right; } -.blurImgPreview { +.blur-img-preview { width: 100px; } diff --git a/webapp/pages/post/_id/_slug/index.vue b/webapp/pages/post/_id/_slug/index.vue index 23dd14d14..5ad5dd793 100644 --- a/webapp/pages/post/_id/_slug/index.vue +++ b/webapp/pages/post/_id/_slug/index.vue @@ -7,14 +7,14 @@ :class="{ 'post-card': true, 'disabled-content': post.disabled, - 'images-set-blur': post.blurImage, + 'images-set-blur': blurred, }" >
@@ -158,6 +158,7 @@ export default { Post(post) { this.post = post[0] || {} this.title = this.post.title + this.blurred = this.post.blurImage }, }, mounted() { @@ -177,18 +178,6 @@ export default { }, }, methods: { - unBlur() { - if (this.post.blurImage) { - this.post.blurImage = false - this.blurred = true - } - }, - setBlur() { - if (!this.post.blurImage) { - this.post.blurImage = true - this.blurred = false - } - }, isAuthor(id) { return this.$store.getters['auth/user'].id === id }, @@ -265,7 +254,7 @@ export default { top: -70px; float: right; } -.blurImgPreview { +.blur-img-preview { width: 100px; }