Skip to content

learn-academy-2023-foxtrot/apartment-app-frontend-housing-hackers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Front End

$ yarn create react-app apartment-app-frontend
$ cd apartment-app-frontend
$ yarn add react-router-dom
$ yarn add bootstrap
$ yarn add reactstrap

Add to src/index.js: import 'bootstrap/dist/css/bootstrap.min.css'

$ yarn start

Add the remote from your GitHub classroom repository Create a default branch (main) Make an initial commit to the repository Ask your instructors for branch protection

We added components to src. The components, pages, assets folder. Then we added the basic structure to each file inside of the components.

Then we worked on the header. Made it beautiful and then did the testing for it.

import { render, screen } from "@testing-library/react"
import { BrowserRouter } from "react-router-dom"
import Header from  "../components/Header"

describe("<Header />", () => {
    beforeEach(() => {
        render(
            <BrowserRouter> 
                <Header />
            </BrowserRouter>
        )
        screen.debug()
        screen.logTestingPlaygroundURL()
    })
    it("has a navigation link to index page", () => {
        const indexLink = screen.getByRole('link', { name: /view apartments/i })
        expect(indexLink).toHaveAttribute("href", "/aptindex")
    })

    
    it("has a navigation link to new page", () => {
        const indexLink = screen.getByRole('link', { name: /Add Apartments/i })
        expect(indexLink).toHaveAttribute("href", "/aptnew")
    })
})

We then added the footer with our names and team name.

Afterwards, we started working on the home page and the not found page along with the testing for them.

About

apartment-app-frontend-housing-hackers created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •