From 85f628848bd45f8adb08a7c73339841512e774ed Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Thu, 19 Dec 2019 08:38:04 +0530 Subject: [PATCH] continue to replace ds-button with base-button (wip) --- webapp/components/EnterNonce/EnterNonce.vue | 55 ++++++++++--------- webapp/components/FilterMenu/FilterMenu.vue | 9 +-- .../FilterPosts/CategoriesFilterMenuItems.vue | 10 ++-- .../FilterPosts/FilterPosts.spec.js | 8 +-- webapp/components/FilterPosts/FilterPosts.vue | 4 +- .../FilterPosts/GeneralFilterMenuItems.vue | 22 ++++---- .../FilterPosts/LanguageFilterMenuItems.vue | 12 ++-- webapp/components/FollowButton.vue | 13 ++++- .../features/ReportRow/ReportRow.spec.js | 2 +- .../features/ReportRow/ReportRow.vue | 8 +-- 10 files changed, 80 insertions(+), 63 deletions(-) diff --git a/webapp/components/EnterNonce/EnterNonce.vue b/webapp/components/EnterNonce/EnterNonce.vue index d936544ad..b44201a42 100644 --- a/webapp/components/EnterNonce/EnterNonce.vue +++ b/webapp/components/EnterNonce/EnterNonce.vue @@ -1,30 +1,27 @@ + + diff --git a/webapp/components/FilterMenu/FilterMenu.vue b/webapp/components/FilterMenu/FilterMenu.vue index e4c689263..e56925e56 100644 --- a/webapp/components/FilterMenu/FilterMenu.vue +++ b/webapp/components/FilterMenu/FilterMenu.vue @@ -6,15 +6,16 @@
-
diff --git a/webapp/components/FilterPosts/CategoriesFilterMenuItems.vue b/webapp/components/FilterPosts/CategoriesFilterMenuItems.vue index 72835a660..6d91098ad 100644 --- a/webapp/components/FilterPosts/CategoriesFilterMenuItems.vue +++ b/webapp/components/FilterPosts/CategoriesFilterMenuItems.vue @@ -12,9 +12,10 @@ - @@ -37,10 +38,11 @@ - diff --git a/webapp/components/FilterPosts/FilterPosts.spec.js b/webapp/components/FilterPosts/FilterPosts.spec.js index f27074b7b..b0d4d8f16 100644 --- a/webapp/components/FilterPosts/FilterPosts.spec.js +++ b/webapp/components/FilterPosts/FilterPosts.spec.js @@ -92,7 +92,7 @@ describe('FilterPosts.vue', () => { it('starts with all categories button active', () => { const wrapper = openFilterPosts() allCategoriesButton = wrapper.findAll('button').at(1) - expect(allCategoriesButton.attributes().class).toContain('ds-button-primary') + expect(allCategoriesButton.attributes().class).toContain('.base-button.--primary') }) it('calls TOGGLE_CATEGORY when clicked', () => { @@ -115,7 +115,7 @@ describe('FilterPosts.vue', () => { getters['posts/filteredCategoryIds'] = jest.fn(() => ['cat9']) const wrapper = openFilterPosts() democracyAndPoliticsButton = wrapper.findAll('button').at(4) - expect(democracyAndPoliticsButton.attributes().class).toContain('ds-button-primary') + expect(democracyAndPoliticsButton.attributes().class).toContain('base-button.--primary') }) it('sets language button attribute `primary` when corresponding language is filtered', () => { @@ -124,14 +124,14 @@ describe('FilterPosts.vue', () => { spanishButton = wrapper .findAll('button.language-buttons') .at(languages.findIndex(l => l.code === 'es')) - expect(spanishButton.attributes().class).toContain('ds-button-primary') + expect(spanishButton.attributes().class).toContain('base-button.--primary') }) it('sets "filter-by-followed-authors-only" button attribute `primary`', () => { getters['posts/filteredByUsersFollowed'] = jest.fn(() => true) const wrapper = openFilterPosts() expect( - wrapper.find({ name: 'filter-by-followed-authors-only' }).classes('ds-button-primary'), + wrapper.find({ name: 'filter-by-followed-authors-only' }).classes('base-button.--primary'), ).toBe(true) }) diff --git a/webapp/components/FilterPosts/FilterPosts.vue b/webapp/components/FilterPosts/FilterPosts.vue index b83e99fd8..281b46413 100644 --- a/webapp/components/FilterPosts/FilterPosts.vue +++ b/webapp/components/FilterPosts/FilterPosts.vue @@ -1,6 +1,6 @@