From 068e2b4417d89a9597b23694cb44130ece4ab054 Mon Sep 17 00:00:00 2001 From: mattwr18 Date: Wed, 8 Jan 2020 11:56:32 +0100 Subject: [PATCH] Fix styling, renaming classes --- cypress/integration/common/post.js | 2 +- .../components/AvatarMenu/AvatarMenu.spec.js | 4 +- webapp/components/UserAvatar/UserAvatar.vue | 41 +++++++++++++++++-- webapp/pages/profile/_id/_slug.vue | 3 +- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/cypress/integration/common/post.js b/cypress/integration/common/post.js index a680986f4..833a70f85 100644 --- a/cypress/integration/common/post.js +++ b/cypress/integration/common/post.js @@ -24,7 +24,7 @@ Then("my comment should be successfully created", () => { Then("I should see my comment", () => { cy.get("div.comment p") .should("contain", "Human Connection rocks") - .get(".ds-avatar img") + .get(".user-avatar img") .should("have.attr", "src") .and("contain", narratorAvatar) .get("div p.ds-text span") diff --git a/webapp/components/AvatarMenu/AvatarMenu.spec.js b/webapp/components/AvatarMenu/AvatarMenu.spec.js index 519b61d00..c432a5ad8 100644 --- a/webapp/components/AvatarMenu/AvatarMenu.spec.js +++ b/webapp/components/AvatarMenu/AvatarMenu.spec.js @@ -42,9 +42,9 @@ describe('AvatarMenu.vue', () => { wrapper = Wrapper() }) - it('renders the HcAvatar component', () => { + it('renders the UserAvatar component', () => { wrapper.find('.avatar-menu-trigger').trigger('click') - expect(wrapper.find('.ds-avatar').exists()).toBe(true) + expect(wrapper.find('.user-avatar').exists()).toBe(true) }) describe('given a userName', () => { diff --git a/webapp/components/UserAvatar/UserAvatar.vue b/webapp/components/UserAvatar/UserAvatar.vue index 874ace71c..2e25c76e5 100644 --- a/webapp/components/UserAvatar/UserAvatar.vue +++ b/webapp/components/UserAvatar/UserAvatar.vue @@ -1,16 +1,16 @@ @@ -31,7 +31,6 @@ export default { }, }, image: { type: String, default: null }, - online: { type: Boolean, default: false }, }, data() { return { @@ -53,3 +52,37 @@ export default { }, } + diff --git a/webapp/pages/profile/_id/_slug.vue b/webapp/pages/profile/_id/_slug.vue index 82fee4ecd..ee6d5d3f2 100644 --- a/webapp/pages/profile/_id/_slug.vue +++ b/webapp/pages/profile/_id/_slug.vue @@ -519,11 +519,10 @@ export default { } } } -.profile-avatar.ds-avatar { +.profile-avatar.user-avatar { display: block; margin: auto; margin-top: -60px; - border: #fff 5px solid; } .page-name-profile-id-slug { .ds-flex-item:first-child .content-menu {