Skip to content

Commit

Permalink
add project tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CassandraGoose committed Jun 18, 2024
1 parent eecba0c commit dbd6b0a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
10 changes: 8 additions & 2 deletions cypress/e2e/portfolio.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ describe('portfolio', () => {
});

it('displays project information in the project card', () => {
cy.get('[data-cy="project-tag"]').should('contain', 'PROJECTS');
cy.get('[data-cy="project-tag"]').should('contain', 'PRODUCTION APPLICATIONS');
cy.get('[data-cy="project-title"]').should(
'contain',
'I have had the opportunity to work on several production applications in'
);
cy.get('[data-cy="project-details-title"]').should('have.length', 5);

cy.get('[data-cy="personal-project-tag').should('contain', 'PERSONAL PROJECTS');
cy.get('[data-cy="personal-project-title"]').should(
'contain',
'I tend to build projects to learn something'
);
cy.get('[data-cy="project-details-title"]').should('have.length', 9);
cy.get('[data-cy="project-details-title"]')
.eq(1)
.should('contain', 'Higher Education');
Expand Down
Binary file removed cypress/videos/portfolio.cy.js.mp4
Binary file not shown.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro"
"astro": "astro",
"test": "npx cypress run"
},
"dependencies": {
"@astrojs/tailwind": "^3.1.2",
Expand Down
9 changes: 4 additions & 5 deletions src/components/PersonalProjectsCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ import ProjectDetails from "../components/ProjectDetails.astro";
<p
slot="navigation"
class="border-r border-solid border-black justify-center px-4 flex items-center"
data-cy="project-tag"
data-cy="personal-project-tag"
>
PERSONAL PROJECTS
</p>
<p slot="card-context" class="m-4" data-cy="project-title">
I have had the opportunity to work on several production applications in my
career. I have worked for product companies and also worked for a
consultancy, where I worked on various teams and with various technologies.
<p slot="card-context" class="m-4" data-cy="personal-project-title">
I tend to build projects to learn something, instead of relying on tutorials
or guides. I think it helps me internalize concepts more quickly.
</p>
<ul slot="card-body" class="m-4">
<ProjectDetails
Expand Down

0 comments on commit dbd6b0a

Please sign in to comment.