diff --git a/cypress.config.ts b/cypress.config.ts index 4ca13ab..41dc326 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -4,6 +4,7 @@ export default defineConfig({ projectId: "1nng13", e2e: { baseUrl: 'http://localhost:3000', + viewportWidth: 1400, setupNodeEvents(on, config) { // implement node event listeners here }, diff --git a/cypress/e2e/aboutpage.cy.ts b/cypress/e2e/aboutpage.cy.ts new file mode 100644 index 0000000..9b665dc --- /dev/null +++ b/cypress/e2e/aboutpage.cy.ts @@ -0,0 +1,73 @@ +describe('About page tests', () => { + beforeEach(() => { + cy.visit('/about', { timeout: 30000 }); + }); + + it('About header renders', () => { + cy.get('[data-cy="about-header-header"]') + .should('be.visible') + .and('contain', 'Transnational Job Listing Channel'); + cy.contains('p', 'So many jobs available, all you have to do is keep up with our posts. Check below for recent job openings.') + .should('be.visible'); + }); + + it("About banner renders", () => { + cy.get('[data-cy="about-banner-header"]') + .should('be.visible') + .and('contain', 'Have a question?'); + cy.contains('p', 'If you have any questions, please contact us') + .should('be.visible'); + cy.get('[data-cy="about-banner-button"]') + .within(() => { + cy.validateLink('Contact Us', '/contact'); + }); + cy.contains('p', 'Follow us on Social Media:') + .should('be.visible'); + cy.get('main > div > section').eq(1) + .within(() => { + cy.validateLink('Twitter for Tech Is Hiring', 'https://www.twitter.com/TechIsHiring/') + cy.validateLink('LinkedIn for Tech Is Hiring', 'https://www.linkedin.com/company/TechIsHiring/') + cy.validateLink('YouTube for Tech Is Hiring', 'https://www.youtube.com/@TechIsHiring') + }) + }); + + it("About banner renders on mobile", () => { + cy.viewport('iphone-5') + cy.get('[data-cy="about-banner-header"]') + .should('be.visible') + .and("contain", "Have a question?"); + cy.contains('p', 'If you have any questions, please contact us') + .should('be.visible'); + cy.get('[data-cy="about-banner-button"]') + .within(() => { + cy.validateLink('Contact Us', '/contact'); + }); + cy.contains('p', 'Follow us on Social Media:') + .should('not.be.visible'); + }); + + it('About details renders', () => { + cy.get('article').should('be.visible') + .within(() => { + cy.validateLink('Chad R. Stewart', 'https://www.linkedin.com/in/ChadRStewart/'); + cy.validateLink('#TechIsHiring', 'https://twitter.com/TechIsHiring/'); + cy.validateLink('Hire Chad R. Stewart', '/hire-chad'); + }); + }); + + it('About details renders on mobile', () => { + cy.viewport('iphone-5'); + cy.get('article').should('be.visible') + .within(() => { + cy.validateLink('Chad R. Stewart', 'https://www.linkedin.com/in/ChadRStewart/'); + cy.validateLink('#TechIsHiring', 'https://twitter.com/TechIsHiring/'); + cy.validateLink('Hire Chad R. Stewart', '/hire-chad'); + + cy.contains('p', 'Follow us'); + cy.validateLink('Twitter for Tech Is Hiring', 'https://www.twitter.com/TechIsHiring/'); + cy.validateLink('LinkedIn for Tech Is Hiring', 'https://www.linkedin.com/company/TechIsHiring/'); + cy.validateLink('YouTube for Tech Is Hiring', 'https://www.youtube.com/@TechIsHiring'); + }); + }); +}); + diff --git a/src/components/molecules/about-banner/about-banner.tsx b/src/components/molecules/about-banner/about-banner.tsx index a7c2e44..58b0817 100644 --- a/src/components/molecules/about-banner/about-banner.tsx +++ b/src/components/molecules/about-banner/about-banner.tsx @@ -15,12 +15,13 @@ export default function AboutBanner() {
- So many jobs available, all you have to do is keep up with our posts. Check below for recent job openings. + So many jobs available, all you have to do is keep up with our posts. Check below for recent job openings.