Merge branch '5059-epic-groups' of github.com:Ocelot-Social-Community/Ocelot-Social into search-groups

This commit is contained in:
Wolfgang Huß 2022-10-22 18:07:35 +02:00
commit f90d671245
15 changed files with 342 additions and 85 deletions

View File

@ -1,7 +1,7 @@
import { When } from "cypress-cucumber-preprocessor/steps"; import { When } from "cypress-cucumber-preprocessor/steps";
When('I click on the author', () => { When('I click on the author', () => {
cy.get('.user-teaser') cy.get('[data-test="avatarUserLink"]')
.click() .click()
.url().should('include', '/profile/') .url().should('include', '/profile/')
}) })

View File

@ -112,16 +112,6 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
.notifications-menu {
flex-shrink: 0;
display: flex;
align-items: center;
.base-button {
overflow: visible;
}
}
.notifications-menu-popover { .notifications-menu-popover {
max-width: 500px; max-width: 500px;
margin-bottom: $size-height-base; margin-bottom: $size-height-base;

View File

@ -50,4 +50,9 @@ export default {
margin-left: 0.2rem; margin-left: 0.2rem;
margin-right: 0.2rem; margin-right: 0.2rem;
} }
@media only screen and (max-width: 810px) {
.ds-footer {
display: none;
}
}
</style> </style>

View File

@ -15,7 +15,7 @@
<img :src="post.image | proxyApiUrl" class="image" /> <img :src="post.image | proxyApiUrl" class="image" />
</template> </template>
<client-only> <client-only>
<user-teaser :user="post.author" :date-time="post.createdAt" /> <user-teaser :user="post.author" :group="post.group" :date-time="post.createdAt" />
</client-only> </client-only>
<h2 class="title hyphenate-text">{{ post.title }}</h2> <h2 class="title hyphenate-text">{{ post.title }}</h2>
<!-- TODO: replace editor content with tiptap render view --> <!-- TODO: replace editor content with tiptap render view -->

View File

@ -56,6 +56,41 @@ export const user = {
followedBy: [], followedBy: [],
socialMedia: [], socialMedia: [],
} }
export const group = {
id: 'g2',
name: 'Yoga Practice',
slug: 'yoga-practice',
about: null,
description: `<h3>What Is yoga?</h3><p>Yoga is not just about practicing asanas. It's about how we do it.</p><p class="">And practicing asanas doesn't have to be yoga, it can be more athletic than yogic.</p><h3>What makes practicing asanas yogic?</h3><p class="">The important thing is:</p><ul><li><p>Use the exercises (consciously) for your personal development.</p></li></ul>`,
descriptionExcerpt: `<h3>What Is yoga?</h3><p>Yoga is not just about practicing asanas. It's about how we do it.</p><p>And practicing asanas doesn't have to be yoga, it can be more athletic than yogic.</p><h3>What makes practicing asanas yogic?</h3><p>The important thing is:</p><ul><li><p>Use the exercises …</p></li></ul>`,
groupType: 'public',
actionRadius: 'interplanetary',
categories: [
{
id: 'cat4',
icon: 'psyche',
name: 'psyche',
slug: 'psyche',
description: 'Seele, Gefühle, Glück',
},
{
id: 'cat5',
icon: 'movement',
name: 'body-and-excercise',
slug: 'body-and-excercise',
description: 'Sport, Yoga, Massage, Tanzen, Entspannung',
},
{
id: 'cat17',
icon: 'spirituality',
name: 'spirituality',
slug: 'spirituality',
description: 'Religion, Werte, Ethik',
},
],
locationName: null,
location: null,
}
storiesOf('UserTeaser', module) storiesOf('UserTeaser', module)
.addDecorator(withA11y) .addDecorator(withA11y)
@ -68,7 +103,7 @@ storiesOf('UserTeaser', module)
}), }),
template: '<user-teaser :user="user" />', template: '<user-teaser :user="user" />',
})) }))
.add('with Date', () => ({ .add('with date', () => ({
components: { UserTeaser }, components: { UserTeaser },
store: helpers.store, store: helpers.store,
data: () => ({ data: () => ({
@ -98,3 +133,21 @@ storiesOf('UserTeaser', module)
}), }),
template: '<user-teaser :user="user" :date-time="new Date()" />', template: '<user-teaser :user="user" :date-time="new Date()" />',
})) }))
.add('with group and date', () => ({
components: { UserTeaser },
store: helpers.store,
data: () => ({
user,
group,
}),
template: '<user-teaser :user="user" :group="group" :date-time="new Date()" />',
}))
.add('with group and date wide', () => ({
components: { UserTeaser },
store: helpers.store,
data: () => ({
user,
group,
}),
template: '<user-teaser :user="user" :group="group" wide :date-time="new Date()" />',
}))

View File

@ -4,38 +4,58 @@
<span class="info anonymous">{{ $t('profile.userAnonym') }}</span> <span class="info anonymous">{{ $t('profile.userAnonym') }}</span>
</div> </div>
<div v-else :class="[{ 'disabled-content': user.disabled }]" placement="top-start"> <div v-else :class="[{ 'disabled-content': user.disabled }]" placement="top-start">
<nuxt-link :to="userLink" :class="['user-teaser']"> <div :class="['user-teaser']">
<profile-avatar v-if="showAvatar" :profile="user" size="small" /> <nuxt-link :to="userLink" data-test="avatarUserLink">
<div class="info"> <profile-avatar v-if="showAvatar" :profile="user" size="small" />
<span class="text"> </nuxt-link>
<span class="slug">{{ userSlug }}</span> <div class="info flex-direction-column">
<span v-if="dateTime">{{ userName }}</span> <div :class="wide ? 'flex-direction-row' : 'flex-direction-column'">
</span> <nuxt-link :to="userLink">
<span v-if="dateTime" class="text"> <span class="text">
<span class="slug">{{ userSlug }}</span>
<span v-if="!userOnly" class="name">{{ userName }}</span>
</span>
</nuxt-link>
<span v-if="wide">&nbsp;</span>
<span v-if="group">
<span class="text">
{{ $t('group.in') }}
</span>
<nuxt-link :to="groupLink">
<span class="text">
<span class="slug">{{ groupSlug }}</span>
<span v-if="!userOnly" class="name">{{ groupName }}</span>
</span>
</nuxt-link>
</span>
</div>
<span v-if="!userOnly" class="text">
<base-icon name="clock" /> <base-icon name="clock" />
<hc-relative-date-time :date-time="dateTime" /> <relative-date-time :date-time="dateTime" />
<slot name="dateTime"></slot> <slot name="dateTime"></slot>
</span> </span>
<span v-else class="text">{{ userName }}</span> <span v-else class="text">{{ userName }}</span>
</div> </div>
</nuxt-link> </div>
</div> </div>
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import HcRelativeDateTime from '~/components/RelativeDateTime' import RelativeDateTime from '~/components/RelativeDateTime'
import ProfileAvatar from '~/components/_new/generic/ProfileAvatar/ProfileAvatar' import ProfileAvatar from '~/components/_new/generic/ProfileAvatar/ProfileAvatar'
export default { export default {
name: 'UserTeaser', name: 'UserTeaser',
components: { components: {
HcRelativeDateTime, RelativeDateTime,
ProfileAvatar, ProfileAvatar,
}, },
props: { props: {
user: { type: Object, default: null }, user: { type: Object, default: null },
group: { type: Object, default: null },
wide: { type: Boolean, default: false },
showAvatar: { type: Boolean, default: true }, showAvatar: { type: Boolean, default: true },
dateTime: { type: [Date, String], default: null }, dateTime: { type: [Date, String], default: null },
showPopover: { type: Boolean, default: true }, showPopover: { type: Boolean, default: true },
@ -64,6 +84,22 @@ export default {
const { name } = this.user || {} const { name } = this.user || {}
return name || this.$t('profile.userAnonym') return name || this.$t('profile.userAnonym')
}, },
userOnly() {
return !this.dateTime && !this.group
},
groupLink() {
const { id, slug } = this.group
if (!(id && slug)) return ''
return { name: 'group-id-slug', params: { slug, id } }
},
groupSlug() {
const { slug } = this.group || {}
return slug && `&${slug}`
},
groupName() {
const { name } = this.group || {}
return name || this.$t('profile.userAnonym')
},
}, },
methods: { methods: {
optimisticFollow({ followedByCurrentUser }) { optimisticFollow({ followedByCurrentUser }) {
@ -93,17 +129,11 @@ export default {
} }
> .info { > .info {
display: flex;
flex-direction: column;
justify-content: center;
padding-left: $space-xx-small; padding-left: $space-xx-small;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
color: $text-color-soft;
font-size: $font-size-small;
&.anonymous { &.anonymous {
font-size: $font-size-base; font-size: $font-size-base;
} }
@ -112,6 +142,23 @@ export default {
color: $color-primary; color: $color-primary;
font-size: $font-size-base; font-size: $font-size-base;
} }
.name {
color: $text-color-soft;
font-size: $font-size-small;
}
}
.flex-direction-column {
display: flex;
flex-direction: column;
justify-content: center;
}
.flex-direction-row {
display: flex;
flex-direction: row;
justify-content: center;
} }
.text { .text {

View File

@ -1,12 +1,12 @@
export default { export default {
MENU: [ MENU: [
// { // {
// nameIdent: 'ocelotRebranding.newsFeed', // nameIdent: 'nameIdent',
// path: '/', // path: '/',
// }, // },
// { // {
// nameIdent: 'ocelotRebranding.about', // nameIdent: 'nameIdent',
// url: 'https://ocelot.org', // url: 'https://ocelot.social',
// }, // },
], ],
} }

View File

@ -69,6 +69,11 @@ export const filterPosts = (i18n) => {
...userCounts ...userCounts
...locationAndBadges ...locationAndBadges
} }
group {
id
name
slug
}
} }
} }
` `
@ -99,6 +104,11 @@ export const profilePagePosts = (i18n) => {
...userCounts ...userCounts
...locationAndBadges ...locationAndBadges
} }
group {
id
name
slug
}
} }
} }
` `

View File

@ -3,7 +3,9 @@
<div class="main-navigation"> <div class="main-navigation">
<ds-container class="main-navigation-container" style="padding: 10px 10px"> <ds-container class="main-navigation-container" style="padding: 10px 10px">
<div> <div>
<ds-flex class="main-navigation-flex"> <!-- header menu -->
<ds-flex v-if="!showMobileMenu" class="main-navigation-flex">
<!-- logo -->
<ds-flex-item :width="{ base: LOGOS.LOGO_HEADER_WIDTH }" style="margin-right: 20px"> <ds-flex-item :width="{ base: LOGOS.LOGO_HEADER_WIDTH }" style="margin-right: 20px">
<a <a
v-if="LOGOS.LOGO_HEADER_CLICK.externalLink" v-if="LOGOS.LOGO_HEADER_CLICK.externalLink"
@ -19,11 +21,12 @@
<logo logoType="header" /> <logo logoType="header" />
</nuxt-link> </nuxt-link>
</ds-flex-item> </ds-flex-item>
<!-- dynamic-brand-menu -->
<ds-flex-item <ds-flex-item
v-for="item in menu" v-for="item in menu"
:key="item.name" :key="item.name"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }" :class="{ 'hide-mobile-menu': !toggleMobileMenu }"
class="branding-menu"
:width="{ base: 'auto' }" :width="{ base: 'auto' }"
style="margin-right: 20px" style="margin-right: 20px"
> >
@ -38,26 +41,26 @@
</ds-text> </ds-text>
</nuxt-link> </nuxt-link>
</ds-flex-item> </ds-flex-item>
<!-- search-field -->
<ds-flex-item <ds-flex-item
:width="{ base: '40%', sm: '40%', md: '40%', lg: '0%' }" v-if="isLoggedIn"
class="mobile-hamburger-menu" id="nav-search-box"
> :class="{ 'hide-mobile-menu': !toggleMobileMenu }"
<base-button icon="bars" @click="toggleMobileMenuView" circle /> class="header-search"
</ds-flex-item>
<ds-flex-item
:width="{ :width="{
base: '45%', base: '45%',
sm: '45%', sm: '40%',
md: isHeaderMenu ? 'auto' : '45%', md: isHeaderMenu ? 'auto' : '40%',
lg: isHeaderMenu ? 'auto' : '50%', lg: isHeaderMenu ? 'auto' : '50%',
}" }"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="flex-shrink: 0; flex-grow: 1" style="flex-shrink: 0; flex-grow: 1"
id="nav-search-box"
v-if="isLoggedIn"
> >
<search-field /> <search-field />
</ds-flex-item> </ds-flex-item>
<!-- filter-menu
TODO: Filter is only visible on index
-->
<ds-flex-item <ds-flex-item
v-if="isLoggedIn" v-if="isLoggedIn"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }" :class="{ 'hide-mobile-menu': !toggleMobileMenu }"
@ -67,6 +70,7 @@
<filter-menu v-show="showFilterMenuDropdown" /> <filter-menu v-show="showFilterMenuDropdown" />
</client-only> </client-only>
</ds-flex-item> </ds-flex-item>
<!-- locale-switch -->
<ds-flex-item <ds-flex-item
style="flex-basis: auto" style="flex-basis: auto"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }" :class="{ 'hide-mobile-menu': !toggleMobileMenu }"
@ -82,23 +86,134 @@
<locale-switch class="topbar-locale-switch" placement="top" offset="8" /> <locale-switch class="topbar-locale-switch" placement="top" offset="8" />
<template v-if="isLoggedIn"> <template v-if="isLoggedIn">
<client-only> <client-only>
<!-- notification-menu -->
<notification-menu placement="top" /> <notification-menu placement="top" />
</client-only> </client-only>
<div v-if="inviteRegistration"> <div v-if="inviteRegistration">
<client-only> <client-only>
<!-- invite-button -->
<invite-button placement="top" /> <invite-button placement="top" />
</client-only> </client-only>
</div> </div>
<!-- group button -->
<client-only v-if="SHOW_GROUP_BUTTON_IN_HEADER"> <client-only v-if="SHOW_GROUP_BUTTON_IN_HEADER">
<group-button /> <group-button />
</client-only> </client-only>
<client-only> <client-only>
<!-- avatar-menu -->
<avatar-menu placement="top" /> <avatar-menu placement="top" />
</client-only> </client-only>
</template> </template>
</div> </div>
</ds-flex-item> </ds-flex-item>
</ds-flex> </ds-flex>
<!-- mobile header menu -->
<div v-else>
<!-- logo, hamburger-->
<ds-flex>
<ds-flex-item :width="{ base: LOGOS.LOGO_HEADER_WIDTH }" style="margin-right: 20px">
<nuxt-link :to="{ name: 'index' }" v-scroll-to="'.main-navigation'">
<logo logoType="header" />
</nuxt-link>
</ds-flex-item>
<!-- hamburger button -->
<ds-flex-item class="mobile-hamburger-menu">
<client-only>
<div style="display: inline-flex; padding-right: 20px">
<notification-menu />
</div>
</client-only>
<base-button icon="bars" @click="toggleMobileMenuView" circle />
</ds-flex-item>
</ds-flex>
<!-- search, filter-->
<ds-flex class="mobile-menu">
<!-- search-field mobile-->
<ds-flex-item
v-if="isLoggedIn"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="padding: 20px"
>
<search-field />
</ds-flex-item>
<!-- filter menu mobile-->
<ds-flex-item
v-if="isLoggedIn"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="flex-grow: 0; flex-basis: auto; padding: 20px 0"
>
<client-only>
<filter-menu v-show="showFilterMenuDropdown" />
</client-only>
</ds-flex-item>
</ds-flex>
<!-- switch language, notification, invite, profil -->
<ds-flex style="margin: 0 20px">
<!-- locale-switch mobile-->
<ds-flex-item :class="{ 'hide-mobile-menu': !toggleMobileMenu }">
<locale-switch class="topbar-locale-switch" placement="top" offset="8" />
</ds-flex-item>
<!-- invite-button mobile-->
<ds-flex-item
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="text-align: center"
>
<client-only>
<invite-button placement="top" />
</client-only>
</ds-flex-item>
<!-- group button mobile -->
<ds-flex-item
v-if="SHOW_GROUP_BUTTON_IN_HEADER"
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="text-align: center"
>
<client-only>
<group-button />
</client-only>
</ds-flex-item>
<ds-flex-item
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
style="text-align: end"
>
<client-only>
<!-- avatar-menu mobile-->
<avatar-menu placement="top" />
</client-only>
</ds-flex-item>
</ds-flex>
<div
:class="{ 'hide-mobile-menu': !toggleMobileMenu }"
class="mobile-menu footer-mobile"
>
<!-- dynamic branding menu -->
<ul v-if="isHeaderMenu" class="dynamic-branding-mobil">
<li v-for="item in menu" :key="item.name">
<a v-if="item.url" :href="item.url" target="_blank">
<ds-text size="large" bold>
{{ $t(item.nameIdent) }}
</ds-text>
</a>
<nuxt-link v-else :to="item.path">
<ds-text size="large" bold>
{{ $t(item.nameIdent) }}
</ds-text>
</nuxt-link>
</li>
</ul>
<hr />
<!-- dynamic footer menu in header -->
<ul class="dynamic-footer-mobil">
<li v-for="pageParams in links.FOOTER_LINK_LIST" :key="pageParams.name">
<page-params-link :pageParams="pageParams">
{{ $t(pageParams.internalPage.footerIdent) }}
</page-params-link>
</li>
</ul>
</div>
</div>
</div> </div>
</ds-container> </ds-container>
</div> </div>
@ -118,44 +233,49 @@
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { SHOW_GROUP_BUTTON_IN_HEADER } from '~/constants/groups.js' import { SHOW_GROUP_BUTTON_IN_HEADER } from '~/constants/groups.js'
import links from '~/constants/links.js'
import LOGOS from '../constants/logos.js' import LOGOS from '../constants/logos.js'
import headerMenu from '../constants/headerMenu.js' import headerMenu from '../constants/headerMenu.js'
import seo from '~/mixins/seo' import seo from '~/mixins/seo'
import AvatarMenu from '~/components/AvatarMenu/AvatarMenu' import AvatarMenu from '~/components/AvatarMenu/AvatarMenu'
import FilterMenu from '~/components/FilterMenu/FilterMenu.vue' import FilterMenu from '~/components/FilterMenu/FilterMenu.vue'
import GroupButton from '~/components/Group/GroupButton'
import InviteButton from '~/components/InviteButton/InviteButton' import InviteButton from '~/components/InviteButton/InviteButton'
import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch' import LocaleSwitch from '~/components/LocaleSwitch/LocaleSwitch'
import Logo from '~/components/Logo/Logo' import Logo from '~/components/Logo/Logo'
import SearchField from '~/components/features/SearchField/SearchField.vue' import SearchField from '~/components/features/SearchField/SearchField.vue'
import Modal from '~/components/Modal' import Modal from '~/components/Modal'
import GroupButton from '~/components/Group/GroupButton'
import NotificationMenu from '~/components/NotificationMenu/NotificationMenu' import NotificationMenu from '~/components/NotificationMenu/NotificationMenu'
import PageFooter from '~/components/PageFooter/PageFooter' import PageFooter from '~/components/PageFooter/PageFooter'
import PageParamsLink from '~/components/_new/features/PageParamsLink/PageParamsLink.vue'
export default { export default {
components: { components: {
AvatarMenu, AvatarMenu,
FilterMenu, FilterMenu,
GroupButton,
InviteButton, InviteButton,
LocaleSwitch, LocaleSwitch,
Logo, Logo,
Modal, Modal,
NotificationMenu, NotificationMenu,
PageFooter, PageFooter,
GroupButton, PageParamsLink,
SearchField, SearchField,
}, },
mixins: [seo], mixins: [seo],
data() { data() {
return { return {
inviteRegistration: this.$env.INVITE_REGISTRATION === true, // for 'false' in .env INVITE_REGISTRATION is of type undefined and not(!) boolean false, because of internal handling,
categoriesActive: this.$env.CATEGORIES_ACTIVE,
links,
LOGOS, LOGOS,
SHOW_GROUP_BUTTON_IN_HEADER, SHOW_GROUP_BUTTON_IN_HEADER,
isHeaderMenu: headerMenu.MENU.length > 0, isHeaderMenu: headerMenu.MENU.length > 0,
menu: headerMenu.MENU, menu: headerMenu.MENU,
mobileSearchVisible: false, mobileSearchVisible: false,
windowWidth: null,
toggleMobileMenu: false, toggleMobileMenu: false,
inviteRegistration: this.$env.INVITE_REGISTRATION === true, // for 'false' in .env INVITE_REGISTRATION is of type undefined and not(!) boolean false, because of internal handling,
categoriesActive: this.$env.CATEGORIES_ACTIVE,
} }
}, },
computed: { computed: {
@ -166,12 +286,22 @@ export default {
const [firstRoute] = this.$route.matched const [firstRoute] = this.$route.matched
return firstRoute && firstRoute.name === 'index' return firstRoute && firstRoute.name === 'index'
}, },
showMobileMenu() {
if (!this.windowWidth) return false
return this.windowWidth < 810
},
}, },
methods: { methods: {
toggleMobileMenuView() { toggleMobileMenuView() {
this.toggleMobileMenu = !this.toggleMobileMenu this.toggleMobileMenu = !this.toggleMobileMenu
}, },
}, },
mounted() {
this.windowWidth = window.innerWidth
window.addEventListener('resize', () => {
this.windowWidth = window.innerWidth
})
},
} }
</script> </script>
@ -213,18 +343,38 @@ export default {
margin-left: auto; margin-left: auto;
text-align: right; text-align: right;
} }
@media only screen and (min-width: 730px) {
.mobile-hamburger-menu { .mobile-menu {
display: none; margin: 0 20px;
}
} }
@media only screen and (max-width: 730px) { .mobile-search {
margin-top: 20px;
}
.dynamic-branding-mobil,
.dynamic-footer-mobil {
line-height: 30px;
font-size: large;
}
.dynamic-branding-mobil li {
margin: 17px 0;
}
@media only screen and (max-width: 810px) {
#nav-search-box, #nav-search-box,
.main-navigation-right { .main-navigation-right {
margin: 10px 0px; margin: 10px 0px;
} }
.main-navigation-right {
width: 100%;
}
.hide-mobile-menu { .hide-mobile-menu {
display: none; display: none;
} }
} }
@media only screen and (min-width: 810px) {
.main-navigation-right {
width: 100%;
}
}
</style> </style>

View File

@ -426,6 +426,7 @@
"general": "Allgemein", "general": "Allgemein",
"goal": "Ziel der Gruppe", "goal": "Ziel der Gruppe",
"groupCreated": "Die Gruppe wurde angelegt!", "groupCreated": "Die Gruppe wurde angelegt!",
"in": "in",
"joinLeaveButton": { "joinLeaveButton": {
"iAmMember": "Bin Mitglied", "iAmMember": "Bin Mitglied",
"join": "Beitreten" "join": "Beitreten"

View File

@ -426,6 +426,7 @@
"general": "General", "general": "General",
"goal": "Goal of group", "goal": "Goal of group",
"groupCreated": "The group was created!", "groupCreated": "The group was created!",
"in": "in",
"joinLeaveButton": { "joinLeaveButton": {
"iAmMember": "I'm a member", "iAmMember": "I'm a member",
"join": "Join" "join": "Join"

View File

@ -244,8 +244,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('yoga-practice') expect(wrapper.text()).toContain('&yoga-practice')
}) })
describe('displays no(!) group location because is "null"', () => { describe('displays no(!) group location because is "null"', () => {
@ -397,8 +397,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('yoga-practice') expect(wrapper.text()).toContain('&yoga-practice')
}) })
describe('displays no(!) group location because is "null"', () => { describe('displays no(!) group location because is "null"', () => {
@ -510,8 +510,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('yoga-practice') expect(wrapper.text()).toContain('&yoga-practice')
}) })
describe('displays no(!) group location because is "null"', () => { describe('displays no(!) group location because is "null"', () => {
@ -623,8 +623,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('yoga-practice') expect(wrapper.text()).toContain('&yoga-practice')
}) })
describe('displays no(!) group location because is "null"', () => { describe('displays no(!) group location because is "null"', () => {
@ -740,8 +740,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('school-for-citizens') expect(wrapper.text()).toContain('&school-for-citizens')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -857,8 +857,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('school-for-citizens') expect(wrapper.text()).toContain('&school-for-citizens')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -974,8 +974,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('school-for-citizens') expect(wrapper.text()).toContain('&school-for-citizens')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -1091,8 +1091,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('school-for-citizens') expect(wrapper.text()).toContain('&school-for-citizens')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -1212,8 +1212,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('investigative-journalism') expect(wrapper.text()).toContain('&investigative-journalism')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -1332,8 +1332,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has group slug', () => { it('has group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(true) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(true)
expect(wrapper.text()).toContain('investigative-journalism') expect(wrapper.text()).toContain('&investigative-journalism')
}) })
describe('displays group location', () => { describe('displays group location', () => {
@ -1452,8 +1452,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has no(!) group slug', () => { it('has no(!) group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(false) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(false)
expect(wrapper.text()).not.toContain('investigative-journalism') expect(wrapper.text()).not.toContain('&investigative-journalism')
}) })
describe('displays not(!) group location', () => { describe('displays not(!) group location', () => {
@ -1560,8 +1560,8 @@ describe('GroupProfileSlug', () => {
}) })
it('has no(!) group slug', () => { it('has no(!) group slug', () => {
expect(wrapper.find('[data-test="at"]').exists()).toBe(false) // expect(wrapper.find('[data-test="ampersand"]').exists()).toBe(false)
expect(wrapper.text()).not.toContain('investigative-journalism') expect(wrapper.text()).not.toContain('&investigative-journalism')
}) })
describe('displays not(!) group location', () => { describe('displays not(!) group location', () => {

View File

@ -38,8 +38,8 @@
</ds-heading> </ds-heading>
<!-- group slug --> <!-- group slug -->
<ds-text align="center" color="soft"> <ds-text align="center" color="soft">
<base-icon name="at" data-test="at" /> <!-- <base-icon name="at" data-test="ampersand" /> -->
{{ groupSlug }} {{ `&${groupSlug}` }}
</ds-text> </ds-text>
<!-- group location --> <!-- group location -->
<ds-text v-if="group && group.location" align="center" color="soft" size="small"> <ds-text v-if="group && group.location" align="center" color="soft" size="small">

View File

@ -33,7 +33,7 @@
</aside> </aside>
</template> </template>
<section class="menu"> <section class="menu">
<user-teaser :user="post.author" :date-time="post.createdAt"> <user-teaser :user="post.author" :group="post.group" wide :date-time="post.createdAt">
<template #dateTime> <template #dateTime>
<ds-text v-if="post.createdAt !== post.updatedAt"> <ds-text v-if="post.createdAt !== post.updatedAt">
({{ $t('post.edited') }}) ({{ $t('post.edited') }})

View File

@ -31,8 +31,8 @@
{{ userName }} {{ userName }}
</ds-heading> </ds-heading>
<ds-text align="center" color="soft"> <ds-text align="center" color="soft">
<base-icon name="at" /> <!-- <base-icon name="at" data-test="at" /> -->
{{ userSlug }} {{ `@${userSlug}` }}
</ds-text> </ds-text>
<ds-text v-if="user.location" align="center" color="soft" size="small"> <ds-text v-if="user.location" align="center" color="soft" size="small">
<base-icon name="map-marker" /> <base-icon name="map-marker" />