diff --git a/cypress/e2e/content-pages.cy.js b/cypress/e2e/content-pages.cy.js index c09e3a4..fcacca8 100644 --- a/cypress/e2e/content-pages.cy.js +++ b/cypress/e2e/content-pages.cy.js @@ -1,5 +1,5 @@ describe('Content pages', () => { - it('show the sidebar, table of contents, and footer meta and pagination sections', () => { + it('show the sidebar, table of contents, and appropriate footer sections', () => { cy.visit('/architecture/jsonmodel') const firstPage = cy.url() cy.get('#starlight__sidebar') @@ -9,6 +9,7 @@ describe('Content pages', () => { cy.get('footer p').contains('Last updated: ') cy.get('footer a').contains('Previous') cy.get('footer a').contains('Next').click() + cy.get('footer').contains('Built with Starlight').should('not.exist') cy.url() !== firstPage cy.get('#starlight__sidebar') @@ -18,5 +19,6 @@ describe('Content pages', () => { cy.get('footer p').contains('Last updated: ') cy.get('footer a').contains('Previous') cy.get('footer a').contains('Next') + cy.get('footer').contains('Built with Starlight').should('not.exist') }) }) diff --git a/cypress/e2e/sitemap.cy.js b/cypress/e2e/sitemap.cy.js index 6ecda8d..55d505e 100644 --- a/cypress/e2e/sitemap.cy.js +++ b/cypress/e2e/sitemap.cy.js @@ -1,24 +1,18 @@ +const indexPath = '/sitemap-index.xml' + describe('Sitemap', () => { if (Cypress.env('MODE') === 'production') { it('assets are present', () => { - cy.request('/sitemap-index.xml') + cy.request(indexPath) cy.request('/sitemap-0.xml') }) } it('is linked from each page', () => { cy.visit('/') - cy.get("link[rel='sitemap']").should( - 'have.attr', - 'href', - '/sitemap-index.xml' - ) + cy.get("link[rel='sitemap']").should('have.attr', 'href', indexPath) cy.visit('/architecture/jsonmodel') - cy.get("link[rel='sitemap']").should( - 'have.attr', - 'href', - '/sitemap-index.xml' - ) + cy.get("link[rel='sitemap']").should('have.attr', 'href', indexPath) }) })