Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhonas committed Feb 2, 2024
1 parent 80f54d4 commit d05fa4c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 40 deletions.
88 changes: 50 additions & 38 deletions v2/cypress/e2e/site.cy.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,53 @@
/// <reference types="cypress" />

context('site', () => {
context("site", () => {
beforeEach(() => {
cy.visit('/')
})

it('should have the correct meta title', () => {
cy.title().should('eq', 'clintp.xyz | my bio in two mouse clicks or less')
})

it('should have the correct meta description', () => {
cy.document().get('head meta[name="description"]')
.should('have.attr', 'content', 'my bio in two mouse clicks or less')
})

it('should have the correct opening page title', () => {
cy.get('h1').contains('clintp.xyz')
})

it('should have my email address somewhere so I can be contacted', () => {
cy.contains('hello@clintp.xyz')
})

it('should have a working link to my resume', () => {
cy.get('a').contains('Resume').should('have.attr', 'href', '/Resume_ClintPlummer_ENMR.pdf').then(($anchor) => {
cy.request($anchor.attr('href')).its('status').should('eq', 200)
})
})

it('should have a working link to my ipynb', () => {
cy.get('a').contains('ipynb').should('have.attr', 'href', 'https://github.com/yuhonas/clintp.xyz/blob/main/docs/public/Resume_ClintPlummer_ENMR.ipynb').then(($anchor) => {
cy.request($anchor.attr('href')).its('status').should('eq', 200)
})
})

it('should have a link to my linkedin', () => {
cy.get('a').contains('Linked-In').should('have.attr', 'href', 'https://www.linkedin.com/in/clint-plummer/')
})

})
cy.visit("/");
});

it("should have the correct meta title", () => {
cy.title().should("eq", "clintp.xyz | my bio in two mouse clicks or less");
});

it("should have the correct meta description", () => {
cy.document()
.get('head meta[name="description"]')
.should("have.attr", "content", "my bio in two mouse clicks or less");
});

it("should have the correct opening page title", () => {
cy.get("h1").contains("clintp.xyz");
});

it("should have my email address somewhere so I can be contacted", () => {
cy.contains("hello@clintp.xyz");
});

it("should have a working link to my resume", () => {
cy.get("a")
.contains("Resume")
.should("have.attr", "href", "/Resume_ClintPlummer_ENMR.pdf")
.then(($anchor) => {
cy.request($anchor.attr("href")).its("status").should("eq", 200);
});
});

it("should have a working link to my ipynb", () => {
cy.get("a")
.contains("ipynb")
.should(
"have.attr",
"href",
"https://github.com/yuhonas/clintp.xyz/blob/main/docs/public/Resume_ClintPlummer_ENMR.ipynb"
)
.then(($anchor) => {
cy.request($anchor.attr("href")).its("status").should("eq", 200);
});
});

it("should have a link to my linkedin", () => {
cy.get("a[href='https://www.linkedin.com/in/clint-plummer/']").should(
"exist"
);
});
});
1 change: 1 addition & 0 deletions v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"start": "next start",
"lint": "next lint",
"ci:e2e": "start-server-and-test 'npm run build && http-server ./docs/.vitepress/dist -c-1 --silent' 8080 'cypress run'",
"cypress:open": "cypress open",
"build:resume": "cd resume && node parser.js resume-template.docx resume.clintp.json ../public/resume.docx"
},
"dependencies": {
Expand Down
8 changes: 6 additions & 2 deletions v2/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const Header = () => {
<div className="mx-auto justify-between p-3 sm:flex sm:max-w-4xl sm:p-4">
<Link href="/" className="hidden items-center gap-1 sm:flex">
<Image className="inline-block w-8 object-cover rounded mr-2" src={resume.basics.image} width={32} height={32} alt="Picture of me" />
<span className="text-lg font-bold text-white">$ ./clintp.xyz</span>
<h1 className="text-lg font-bold text-white">$ ./clintp.xyz</h1>
</Link>
<div className="flex gap-3">
{resume.basics.profiles.map(({ network, url }: { network: string, url: string }, index: Key) => (
Expand Down Expand Up @@ -80,7 +80,8 @@ export default function Home() {
return (
<div>
<Head>
<title>clintp.xyz - my bio in two mouse clicks or less</title>
<title>clintp.xyz | my bio in two mouse clicks or less</title>
<meta content="my bio in two mouse clicks or less" name="description" />
</Head>
<main className={`min-h-screen dark:bg-neutral-900 ${font.className}`}>
<Header />
Expand All @@ -95,7 +96,10 @@ export default function Home() {
/>
<p className="text-lg dark:text-neutral-200">{resume.basics.summary}</p>
<AboutSection />
<h3 className="text-3xl font-bold mt-12 mb-8">Would Like to get in Contact?</h3>
<p>I can be reached at <a href={ `mailto:` + resume.basics.email } className="hover:underline" >{ resume.basics.email }</a></p>
<ProjectsSection />

</article>
</main>
</div>
Expand Down

0 comments on commit d05fa4c

Please sign in to comment.