Skip to content

Commit

Permalink
Write tests for about page UI
Browse files Browse the repository at this point in the history
  • Loading branch information
rachelsoae committed Jan 11, 2024
1 parent 21af0aa commit 05777a4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions cypress/e2e/about_spec.cy.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
describe('about page', () => {
beforeEach(() => {
cy.visit('http://localhost:3000');
cy.visit('http://localhost:3000/about');
})

it('should show all elements on page load', () => {
cy.visit('https://example.cypress.io')
cy.get('h1').should('have.text', 'About');
cy.get('.about__image').should('be.visible');
cy.get('.about__text').children()
.first().should('have.text', 'Hello! 👋 My name is Rachel Soae Prather. I\'m a Korean-American Software Engineer and Web Developer located outside Portland, Oregon.')
.next().should('have.text', 'My mission is to Build Technology that Builds Community. In service of that mission, I work and volunteer with ethical organizations whose missions I strongly believe in. I am currently associated with Rita XYZ, Lesbians Who Tech & Allies, Out In Tech, Girls Who Code, and PDXWIT.')
.next().should('have.text', 'In my downtime, I can be found eating kimchi, searching for the best honey at the farmer\'s market, and making music with friends.')
.next().should('have.text', 'I would love to connect with you. Let\'s create something meaningful together.');
})

it('should navigate to contact page when link is clicked', () => {
cy.get('#contact-link').click();
cy.url().should('eq', 'http://localhost:3000/contact');
})
})

0 comments on commit 05777a4

Please sign in to comment.