diff --git a/cypress/e2e/collectionDetailPage.cy.js b/cypress/e2e/collectionDetailPage.cy.js new file mode 100644 index 0000000..39e3c65 --- /dev/null +++ b/cypress/e2e/collectionDetailPage.cy.js @@ -0,0 +1,11 @@ +describe('Collection Detail Page', () => { + it('Visits a Collection Detail Page', () => { + cy.visit('/collections/test-get-used-to-it') + cy.getByData('breadcrumb').should('be.visible') + // sharebutton should exist + cy.getByData('share-button').should('exist') + // cta should be in sidebar w specific data + cy.getByData('sidebar-cta').should('exist') + cy.percySnapshot('collectiondetailpage', { widths: [768, 992, 1200] }) + }) +}) diff --git a/package.json b/package.json index 25197ec..71e3adf 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "lodash": "^4.17.21", "nuxt-graphql-request": "^7.0.5", "sass": "^1.66.1", - "ucla-library-design-tokens": "^5.22.0", - "ucla-library-website-components": "3.28.0" + "ucla-library-design-tokens": "^5.27.0", + "ucla-library-website-components": "3.29.1" } } \ No newline at end of file diff --git a/pages/blog/[slug].vue b/pages/blog/[slug].vue index 7b60d08..c888091 100644 --- a/pages/blog/[slug].vue +++ b/pages/blog/[slug].vue @@ -140,6 +140,7 @@ useHead({ diff --git a/pages/series/[slug].vue b/pages/series/[slug].vue index cc71d39..cccbc04 100644 --- a/pages/series/[slug].vue +++ b/pages/series/[slug].vue @@ -140,7 +140,6 @@ const parsedOtherSeries = computed(() => { }) return otherSeries }) - useHead({ title: page.value ? page.value.title : '... loading', meta: [ @@ -151,32 +150,6 @@ useHead({ } ] }) - -// MOBILE LOGIC -const globalStore = useGlobalStore() -const isMobile = ref(false) -watch(globalStore, (newVal, oldVal) => { - isMobile.value = globalStore.winWidth <= 750 -}) - -// LAYOUT & STYLES -// TO DO THIS SECTION MAY BE WORTH ADDING TO 2 COL SIDE BAR LAYOUT -// Track height of sidebar and ensure main content as at least as tall -const sidebar = ref(null) -const primaryCol = ref(null) - -watch([isMobile, sidebar], ([newValIsMobile, newValSidebar], [oldValGlobalStore, oldValSidebar]) => { - if (newValIsMobile === true) { - primaryCol.value.style.minHeight = 'auto' // on mobile, reset height - } else { - primaryCol.value.style.minHeight = `${newValSidebar.clientHeight + 125}px` - } -}, { deep: true }) - -// globalstore state is lost when error page is generated , this is hack to repopulate state on client side -onMounted(() => { - isMobile.value = globalStore.winWidth <= 750 // 750px is the breakpoint for mobile -})