diff --git a/README.md b/README.md index 7d5857a..d599478 100644 --- a/README.md +++ b/README.md @@ -236,11 +236,18 @@ Don't forget to give the project a star! Thanks again!
-### Top contributors: +## Core Contributors: + + +**Chirchirillo, Joe** + - [Github](https://github.com/jchirch) + - [LinkedIn](https://www.linkedin.com/in/joechirchirillo/) - - - @@ -258,7 +265,7 @@ Distributed under the MIT License. See `LICENSE.txt` for more information. Your Name - [@twitter_handle](https://twitter.com/twitter_handle) - email@email_client.com -Project Link: [https://github.com/github_username/repo_name](https://github.com/github_username/repo_name) +Project Link: [Tracker](https://github.com/turingschool/tracker-crm-fe) diff --git a/cypress/e2e/landingSpec.cy.js b/cypress/e2e/landingSpec.cy.js index af9e140..6b7fdcc 100644 --- a/cypress/e2e/landingSpec.cy.js +++ b/cypress/e2e/landingSpec.cy.js @@ -22,7 +22,7 @@ describe('Landing page after logging in spec', () => { cy.get('[href="https://www.google.com/search?q=papers"] >.m-auto').should('have.attr', 'src').should('include', 'VORK5CYII') - cy.get('[href="https://www.google.com/search?q=plus"] > .m-auto').should('have.attr', 'src').should('include', 'SuQmCC') + cy.get('button.m-auto > .m-auto').should('have.attr', 'src').should('include', 'SuQmCC') cy.get('[href="https://www.google.com/search?q=account"] > .m-auto').should('have.attr', 'src').should('include', '/static/media/person-icon.7a1fafe972143cff67a1.png') @@ -49,15 +49,38 @@ describe('Landing page after logging in spec', () => { cy.url('match', 'https://www.google.com/search?q=papers'); cy.visit('http://localhost:3000/') - cy.get('[href="https://www.google.com/search?q=plus"]').click() - cy.url('match', 'https://www.google.com/search?q=plus'); - cy.visit('http://localhost:3000/') - cy.get('[href="https://www.google.com/search?q=account"]').click() cy.url('match', 'https://www.google.com/search?q=account'); cy.visit('http://localhost:3000/') }) - + describe('DropDown Menu', () => { + it('has container for dropdown elements', () => { + cy.visit('http://localhost:3000/') + cy.get('button.m-auto > .m-auto').click() + cy.get('.dropDownPlus').should('exist'); + }) + it('should render dropdown menu with link to create new contact', () => { + cy.visit('http://localhost:3000/') + cy.get('button.m-auto > .m-auto').click() + cy.contains('Create New Contact').should('exist'); + cy.get('.bg-cyan-600 > :nth-child(1) > a').click() + cy.url('match', 'http://localhost:3000/contacts/new'); + }) + it('should render dropdown menu with link to create new company', () => { + cy.visit('http://localhost:3000/') + cy.get('button.m-auto > .m-auto').click() + cy.contains('Create New Company').should('exist'); + cy.get('.bg-cyan-600 > :nth-child(2) > a').click() + cy.url('match', 'http://localhost:3000/companies/new'); + }) + it('should render dropdown menu with link to create job application', () => { + cy.visit('http://localhost:3000/') + cy.get('button.m-auto > .m-auto').click() + cy.contains('Create New Job Application').should('exist'); + cy.get('.bg-cyan-600 > :nth-child(3) > a').click() + cy.url('match', 'http://localhost:3000/jobapplications/new'); + }) + }) }) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 4543039..593d4f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4157,7 +4157,6 @@ "version": "10.4.0", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz", "integrity": "sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ==", - "license": "MIT", "peer": true, "dependencies": { diff --git a/src/components/icons/plus-open.png b/src/components/icons/plus-open.png new file mode 100644 index 0000000..4ef45a2 Binary files /dev/null and b/src/components/icons/plus-open.png differ diff --git a/src/components/layout/MenuBar.tsx b/src/components/layout/MenuBar.tsx index 9499d3d..d040181 100644 --- a/src/components/layout/MenuBar.tsx +++ b/src/components/layout/MenuBar.tsx @@ -7,9 +7,19 @@ import PersonIcon from '@mui/icons-material/Person'; import ApartmentIcon from '@mui/icons-material/Apartment'; import PersonAddAlt1Icon from '@mui/icons-material/PersonAddAlt1'; import DescriptionIcon from '@mui/icons-material/Description'; +import AddCircleIcon from '@mui/icons-material/AddCircle'; +// import plusOpen from '../../components/icons/plus-open.png'; +// import plus from '../../components/icons/plus-small_4338829.png'; + import PersonOutlineOutlinedIcon from '@mui/icons-material/PersonOutlineOutlined'; +import { useState } from 'react'; + function MenuBar() { + const [isDropDownOpen, setIsDropDownOpen] = useState(false) + const toggleDropDown = () => { + setIsDropDownOpen((previousState) => !previousState) + } const { userID } = useParams(); console.log(userID); @@ -51,6 +61,31 @@ function MenuBar() {