diff --git a/packages/app/cypress/component/footer.cy.tsx b/packages/app/cypress/component/footer.cy.tsx index 15c1baa..5c1dcb3 100644 --- a/packages/app/cypress/component/footer.cy.tsx +++ b/packages/app/cypress/component/footer.cy.tsx @@ -25,48 +25,45 @@ describe('Footer', () => { cy.get('[data-testid="footer-copyright"]').should('contain', year); }); - it('shows the GitHub star CTA linking to GitHub repo', () => { + it('shows the GitHub star CTA', () => { cy.get('[data-testid="footer-star-cta"]').should('be.visible'); - cy.get('[data-testid="footer-star-cta"]') - .should('have.attr', 'href') - .and('include', 'github.com/SemiAnalysisAI/InferenceX'); - }); - - it('footer star CTA opens in new tab', () => { - cy.get('[data-testid="footer-star-cta"]').should('have.attr', 'target', '_blank'); + cy.get('[data-testid="footer-star-cta"]').should('contain', 'Star'); }); it('shows social share buttons', () => { - cy.get('[data-testid="social-share-buttons"]').should('be.visible'); + cy.get('[data-testid="footer-social-buttons"]').should('be.visible'); + cy.get('[data-testid="footer-social-buttons"]') + .find('button') + .should('have.length.greaterThan', 1); }); it('has Privacy Policy link', () => { - cy.get('[data-testid="footer"]') - .contains('Privacy Policy') + cy.get('[data-testid="footer-link-privacy"]') .should('have.attr', 'href') .and('include', 'semianalysis.com/privacy-policy'); }); it('has Cookie Policy link', () => { - cy.get('[data-testid="footer"]') - .contains('Cookie Policy') + cy.get('[data-testid="footer-link-cookies"]') .should('have.attr', 'href') .and('include', 'semianalysis.com/cookie-policy'); }); - it('has Contribute link pointing to GitHub', () => { - cy.get('[data-testid="footer"]') - .contains('Contribute') + it('has Contribute section with GitHub links', () => { + cy.get('[data-testid="footer-link-benchmarks"]') .should('have.attr', 'href') .and('include', 'github.com/SemiAnalysisAI/InferenceX'); + cy.get('[data-testid="footer-link-frontend"]') + .should('have.attr', 'href') + .and('include', 'github.com/SemiAnalysisAI/InferenceX-app'); }); it('shows the SemiAnalysis logo', () => { - cy.get('[data-testid="footer"]').find('img[alt="SemiAnalysis logo"]').should('exist'); + cy.get('[data-testid="footer-brand"]').find('img[alt="SemiAnalysis logo"]').should('exist'); }); it('all external links open in a new tab', () => { - cy.get('[data-testid="footer"]') + cy.get('[data-testid="footer-links"]') .find('a[target="_blank"]') .should('have.length.greaterThan', 0); }); diff --git a/packages/app/cypress/component/social-share.cy.tsx b/packages/app/cypress/component/social-share.cy.tsx index 471eb76..4102410 100644 --- a/packages/app/cypress/component/social-share.cy.tsx +++ b/packages/app/cypress/component/social-share.cy.tsx @@ -1,42 +1,29 @@ -import { SocialShareButtons } from '@/components/social-share-buttons'; +import { ShareTwitterButton, ShareLinkedInButton } from '@/components/share-buttons'; -describe('Social Share Buttons', () => { - beforeEach(() => { - cy.mount(); - }); - - it('social share buttons container is visible', () => { - cy.get('[data-testid="social-share-buttons"]').should('be.visible'); - }); - - it('Twitter share button is present and is a button element', () => { +describe('Share Buttons', () => { + it('Twitter share button renders and is a button element', () => { + cy.mount(); cy.get('[data-testid="share-twitter"]').should('exist'); cy.get('[data-testid="share-twitter"]').should('have.prop', 'tagName', 'BUTTON'); }); - it('LinkedIn share button is present and is a button element', () => { - cy.get('[data-testid="share-linkedin"]').should('exist'); - cy.get('[data-testid="share-linkedin"]').should('have.prop', 'tagName', 'BUTTON'); - }); - it('Twitter share button has a descriptive title referencing Twitter or X', () => { + cy.mount(); cy.get('[data-testid="share-twitter"]') .should('have.attr', 'title') .and('match', /Twitter|X/i); }); + it('LinkedIn share button renders and is a button element', () => { + cy.mount(); + cy.get('[data-testid="share-linkedin"]').should('exist'); + cy.get('[data-testid="share-linkedin"]').should('have.prop', 'tagName', 'BUTTON'); + }); + it('LinkedIn share button has a descriptive title referencing LinkedIn', () => { + cy.mount(); cy.get('[data-testid="share-linkedin"]') .should('have.attr', 'title') .and('include', 'LinkedIn'); }); }); - -describe('Social Share Buttons (compact)', () => { - it('renders in compact mode', () => { - cy.mount(); - cy.get('[data-testid="social-share-buttons"]').should('be.visible'); - cy.get('[data-testid="share-twitter"]').should('exist'); - cy.get('[data-testid="share-linkedin"]').should('exist'); - }); -}); diff --git a/packages/app/public/file.svg b/packages/app/public/file.svg deleted file mode 100644 index 004145c..0000000 --- a/packages/app/public/file.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/public/github.svg b/packages/app/public/github.svg deleted file mode 100644 index a058963..0000000 --- a/packages/app/public/github.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/public/globe.svg b/packages/app/public/globe.svg deleted file mode 100644 index 567f17b..0000000 --- a/packages/app/public/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/public/next.svg b/packages/app/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/packages/app/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/public/vercel.svg b/packages/app/public/vercel.svg deleted file mode 100644 index 7705396..0000000 --- a/packages/app/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/public/window.svg b/packages/app/public/window.svg deleted file mode 100644 index b2b2a44..0000000 --- a/packages/app/public/window.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/packages/app/src/app/error.tsx b/packages/app/src/app/error.tsx index ce22e55..a03d268 100644 --- a/packages/app/src/app/error.tsx +++ b/packages/app/src/app/error.tsx @@ -16,7 +16,7 @@ export default function Error({ }, [error]); return ( -
+

Something went wrong!

An unexpected error has occurred.

{error.message}

diff --git a/packages/app/src/app/layout.tsx b/packages/app/src/app/layout.tsx index 4dbb344..ad753cf 100644 --- a/packages/app/src/app/layout.tsx +++ b/packages/app/src/app/layout.tsx @@ -159,7 +159,7 @@ export default function RootLayout({ - +