Merge branch 'bug/event-pictures' into 'master'

Bug/event pictures

See merge request framasoft/mobilizon!239
This commit is contained in:
Thomas Citharel 2019-10-10 15:06:35 +02:00
commit 026bbcc804
2 changed files with 12 additions and 4 deletions

View File

@ -3,13 +3,13 @@
<b-loading :active.sync="$apollo.loading"></b-loading> <b-loading :active.sync="$apollo.loading"></b-loading>
<transition appear name="fade" mode="out-in"> <transition appear name="fade" mode="out-in">
<div v-if="event"> <div v-if="event">
<div class="header-picture container"> <div class="header-picture" :style="`background-image: url('${event.picture ? event.picture.url : 'https://picsum.photos/600/200/'}')`">
<figure class="image is-3by1" v-if="event.picture"> <!--<figure class="image is-3by1" v-if="event.picture">
<img :src="event.picture.url"> <img :src="event.picture.url">
</figure> </figure>
<figure class="image is-3by1" v-else> <figure class="image is-3by1" v-else>
<img src="https://picsum.photos/600/200/"> <img src="https://picsum.photos/600/200/">
</figure> </figure>-->
</div> </div>
<section> <section>
<div class="title-and-participate-button"> <div class="title-and-participate-button">
@ -495,6 +495,14 @@ export default class Event extends EventMixin {
opacity: 0; opacity: 0;
} }
.header-picture {
height: 400px;
background-size: cover;
// background-position: center center;
background-attachment: fixed;
background-repeat: no-repeat;
}
div.sidebar { div.sidebar {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;

View File

@ -43,7 +43,7 @@ describe('Registration', () => {
cy.get('form .field').first().contains('label', 'Username').parent().find('input').type('tester'); cy.get('form .field').first().contains('label', 'Username').parent().find('input').type('tester');
cy.get('form .field').eq(2).contains('label', 'Displayed name').parent().find('input').type('tester account'); cy.get('form .field').eq(2).contains('label', 'Displayed name').parent().find('input').type('tester account');
cy.get('form .field').eq(3).contains('label', 'Description').parent().find('textarea').type('This is a test account'); cy.get('form .field').eq(3).contains('label', 'Description').parent().find('textarea').type('This is a test account');
cy.get('form .field').last().contains('button', 'Create my profile').click(); cy.get('.control.has-text-centered').contains('button', 'Create my profile').click();
cy.contains('article.message.is-success', 'Your account is nearly ready, tester').contains('A validation email was sent to user@email.com'); cy.contains('article.message.is-success', 'Your account is nearly ready, tester').contains('A validation email was sent to user@email.com');