Skip to content

Commit

Permalink
[SDPA-3652] Fixed issue by adding missing dependency (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-yao authored Jan 10, 2020
1 parent 4fa7e76 commit cf78034
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
Feature: Publication

As a citizen I can view information for all available content on an publication page

Scenario: Publication page
Given I visit the page "/demo-publication"
Then there should be a description list with the following items:
| term | value |
| Author | Demo Department |
| Date | July 2019 |

@focus
Scenario: Print all publication pages
Given the "/demo-publication" route exists
Expand All @@ -18,7 +27,7 @@ Feature: Publication
And there should be a description list with the following items:
| term | value |
| Author | Lorem ipsum dolor sit amet, Nulla ultricies dignissim, Integer interdum nisl |
| Date | July 2019 |
| Date | July 2019 |
And the anchor links component should exist
And the anchor link title should be "On this page:"
And there should be the following anchor links:
Expand All @@ -30,5 +39,5 @@ Feature: Publication
| Demo Publication - Chapter 2 - Page 1 | demo-publication-chapter-2-page-1 |
| Demo Publication - Chapter 2 - Page 2 | demo-publication-chapter-2-page-2 |
| Demo Publication - Chapter 2 - Page 3 | demo-publication-chapter-2-page-3 |
| Demo Publication - Chapter 3 | demo-publication-chapter-3 | |
| Demo Publication - Chapter 3 | demo-publication-chapter-3 |
And the contact component should exist
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<script>
import formatdate from '@dpc-sdp/ripple-global/mixins/formatdate'
import RplDescriptionList from '@dpc-sdp/ripple-description-list'
import pluralize from 'pluralize'
export default {
name: 'RplAuthorInformation',
Expand All @@ -21,7 +22,6 @@ export default {
computed: {
informationListing () {
const terms = []
const pluralize = require('pluralize')
if (this.author && this.author.length > 0) {
terms.push({ term: pluralize('Author', this.author.length), description: this.author.join(', ') })
}
Expand Down
3 changes: 2 additions & 1 deletion packages/components/Organisms/Publication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@dpc-sdp/ripple-icon": "1.5.4",
"@dpc-sdp/ripple-image-gallery": "1.5.4",
"@dpc-sdp/ripple-link": "1.5.4",
"@dpc-sdp/ripple-markup": "1.5.4"
"@dpc-sdp/ripple-markup": "1.5.4",
"pluralize": "^8.0.0"
}
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14906,6 +14906,11 @@ pluralize@^7.0.0:
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
integrity sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==

pluralize@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-8.0.0.tgz#1a6fa16a38d12a1901e0320fa017051c539ce3b1"
integrity sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==

pn@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
Expand Down

0 comments on commit cf78034

Please sign in to comment.