Skip to content

Commit 8fe0852

Browse files
tinuolajendiamond
andauthored
feat: APPS 3110 Assemble Blog Listing page (#101)
* wip * wip * wip: update logic for data images; adjust page styling * fix: parse article categories * wip: fix infinite scrolling * task: code cleanup * update: add displaySummary field to article gql * test: add basic cypress test * wip: add pageSummary toggle logic * task: update component library to 3.45.0 * add BlockCard ftva variant * fix: linting, remove v-html directive * update library package to 3.45.1 * update CSS after component pkg update * Add more conditions to cypress test * fix: remove custom rich-text padding-right * remove console statements * fix: ux/css updates * update query to incl. categories for featured artciles * fix: display featured articles' categories * fix: add page SectionHeaders with h3 * fix: remove unneeded css values * update featured blogs section title on mobile * update featuredArticles query with alternativeTitle field * add logic to parse alternate richtext featuredArticle title * update preview watcher to track pageTitle --------- Co-authored-by: tinuola <[email protected]> Co-authored-by: JenDiamond <[email protected]>
1 parent 83f953c commit 8fe0852

File tree

5 files changed

+437
-55
lines changed

5 files changed

+437
-55
lines changed

cypress/e2e/blogListPage.cy.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Cypress.on('uncaught:exception', () => { return false })
2+
3+
describe('Blog Listing page', () => {
4+
beforeEach(() => {
5+
cy.visit('/blog')
6+
})
7+
8+
it('Visits Blog Listing page', () => {
9+
cy.getByData('blog-page-title').should('be.visible')
10+
11+
cy.getByData('featured-blog-0').should('be.visible')
12+
13+
cy.getByData('featured-blog-1').should('be.visible')
14+
15+
cy.getByData('featured-blog-2').should('be.visible')
16+
17+
cy.getByData('latest-blogs').should('be.visible')
18+
19+
cy.percySnapshot('eventslistpage', { widths: [768, 992, 1200] })
20+
})
21+
22+
it('Shows only one featured blog in mobile view', () => {
23+
cy.viewport(750, 720)
24+
25+
cy.getByData('featured-blog-0').should('be.visible')
26+
27+
cy.getByData('featured-blog-1').should('not.be.visible')
28+
29+
cy.getByData('featured-blog-2').should('not.be.visible')
30+
})
31+
})

gql/queries/FTVAArticleList.gql

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,20 @@ query FTVAArticleList($slug: [String!]) {
77
sectionHandle
88
title: titleGeneral
99
summary
10+
displaySummary
1011
ftvaFeaturedArticles {
1112
title
13+
ftvaAlternativeTitle
1214
postDate
15+
articleCategories {
16+
title
17+
}
1318
ftvaHomepageDescription
1419
uri
1520
ftvaImage {
1621
...Image
1722
}
1823
}
1924
}
20-
entries(section: ["ftvaArticle"], orderBy: "postDate DESC") {
21-
typeHandle
22-
id
23-
title
24-
postDate
25-
ftvaHomepageDescription
26-
uri
27-
ftvaImage {
28-
...Image
29-
}
30-
}
3125
}
3226

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"nuxt-graphql-request": "^7.0.5",
4343
"sass": "^1.66.1",
4444
"ucla-library-design-tokens": "^5.28.0",
45-
"ucla-library-website-components": "3.44.0"
45+
"ucla-library-website-components": "3.45.1"
4646
},
4747
"engines": {
4848
"pnpm": "^9.12.1"

0 commit comments

Comments
 (0)