Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R20-1553] Change page link props at mapping #874

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ Feature: Publication page page
Example: On load
When I visit the page "/demo-publication/demo-publication-chapter-1"
Then the title should be "Demo Publication - Chapter 1"
And there should be a page link with a title of "Previous" and description text of "Demo Publication"
And there should be a page link with a title of "Next" and description text of "Demo Publication - Chapter 1 - Page 1"
Original file line number Diff line number Diff line change
Expand Up @@ -190,14 +190,14 @@
],
"pagination": {
"prev": {
"text": "Demo Publication",
"text": "Previous",
"url": "/demo-publication",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus."
"description": "Demo Publication"
},
"next": {
"text": "Demo Publication - Chapter 1 - Page 1",
"text": "Next",
"url": "/demo-publication/demo-publication-chapter-1/demo-publication-chapter-1-page-1",
"description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tincidunt sit amet ligula sit amet lacinia. In a leo nec tortor aliquet faucibus."
"description": "Demo Publication - Chapter 1 - Page 1"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Then } from '@badeball/cypress-cucumber-preprocessor'

Then(
'there should be a page link with a title of {string} and description text of {string}',
(title: string, desc: string) => {
cy.get('.rpl-page-links__link-label').contains(title).should('exist')
cy.get('.rpl-page-links__link-text').contains(desc).should('exist')
}
)
10 changes: 4 additions & 6 deletions packages/ripple-tide-publication/mapping/publication-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,14 @@ const tidePublicationPageModule: IRplTideModuleMapping = {
})),
pagination: {
prev: {
label: 'publication_navigation_prev.meta.title',
label: () => 'Previous',
url: 'publication_navigation_prev.meta.url',
description:
'publication_navigation_prev.meta.field_landing_page_summary'
description: 'publication_navigation_prev.meta.title'
},
next: {
label: 'publication_navigation_next.meta.title',
label: () => 'Next',
url: 'publication_navigation_next.meta.url',
description:
'publication_navigation_next.meta.field_landing_page_summary'
description: 'publication_navigation_next.meta.title'
}
}
},
Expand Down