Skip to content

Commit 1c28ac5

Browse files
committed
feature: GitHub Actions YAML and readme.md updates
1 parent faf0dbd commit 1c28ac5

File tree

4 files changed

+69
-38
lines changed

4 files changed

+69
-38
lines changed

.github/workflows/cypress.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Cypress Tests
2+
on: [pull_request]
3+
jobs:
4+
cypress-run:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
containers: [1, 2]
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v4
13+
- name: Cypress run
14+
uses: cypress-io/github-action@v6
15+
with:
16+
start: npm run test:ci
17+
wait-on: 'http://localhost:5173'
18+
record: true
19+
parallel: true
20+
env:
21+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,52 @@
1-
# vue-project
1+
# jakekohl.github.io (aka, the Professional Portfolio that is also a sandbox)
22

3-
This template should help get you started developing with Vue 3 in Vite.
3+
Hey there! 👋
44

5-
## Recommended IDE Setup
5+
This project is my personal professional portfolio—a place to highlight my work, skills, and experience in tech. But it’s more than just a digital resume. I built this site as a hands-on sandbox for experimenting with modern web development tools, frameworks, and best practices.
66

7-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
7+
One of my main goals here is to showcase robust test automation, so you’ll find real-world implementations of both **Cypress** and **PlayWright** throughout the codebase. Whether you’re a recruiter, a fellow developer, or just curious, feel free to poke around and see how I approach building, testing, and continuously improving QA Test Automations within modern web applications!
88

9-
## Customize configuration
9+
## Current Technologies Implemented
1010

11-
See [Vite Configuration Reference](https://vite.dev/config/).
11+
This project leverages a modern web stack and several best-in-class tools:
1212

13-
## Project Setup
13+
- **Vue 3**: The core framework for building the user interface.
14+
- **PrimeVue**: A rich UI component library for Vue, used extensively for layout and interactive elements.
15+
- **Cypress**: End-to-end and component testing framework, with custom commands and workflows implemented.
16+
- **Playwright**: Planned for future implementation as an additional E2E testing solution.
17+
- **Vite**: Lightning-fast build tool and development server.
18+
- **Other Node Packages**: For a full list of dependencies and devDependencies, see the [package.json](./package.json).
1419

15-
```sh
16-
npm install
17-
```
18-
19-
### Compile and Hot-Reload for Development
20+
You’ll find these technologies reflected throughout the codebase, with more details and specific versions in the [package.json](./package.json).
2021

21-
```sh
22-
npm run dev
23-
```
2422

25-
### Compile and Minify for Production
23+
## Cypress & Playwright
2624

27-
```sh
28-
npm run build
29-
```
25+
### Current Test Results
26+
Cypress Cloud Results can be found here, where you can see history of runs through local development and from the CI/CD Pipeline
27+
[![jakekohl.github.io](https://img.shields.io/endpoint?url=https://cloud.cypress.io/badge/detailed/kz76nf&style=for-the-badge&logo=cypress)](https://cloud.cypress.io/projects/kz76nf/runs)
3028

31-
### Run Headed Component Tests with [Cypress Component Testing](https://on.cypress.io/component)
3229

33-
```sh
34-
npm run test:unit:dev # or `npm run test:unit` for headless testing
35-
```
30+
### Running Cypress Tests
3631

37-
### Run End-to-End Tests with [Cypress](https://www.cypress.io/)
32+
You can run the Cypress test suite against the deployed site (`https://jakekohl.github.io`) or locally after cloning the repository. Below are step-by-step instructions for both approaches.
3833

39-
```sh
40-
npm run test:e2e:dev
4134
```
35+
# Clone this repo
36+
git clone https://github.com/jakekohl/jakekohl.github.io
4237
43-
This runs the end-to-end tests against the Vite development server.
44-
It is much faster than the production build.
45-
46-
But it's still recommended to test the production build with `test:e2e` before deploying (e.g. in CI environments):
38+
# Install packages
39+
npm i
4740
48-
```sh
49-
npm run build
50-
npm run test:e2e
51-
```
41+
# Run Cypress locally against the deployed site
42+
npx cypress run --config baseUrl=https://jakekohl.github.io
5243
53-
### Lint with [ESLint](https://eslint.org/)
44+
# Or open the Cypress UI with the deployed site as baseUrl
45+
npx cypress open --config baseUrl=https://jakekohl.github.io
5446
55-
```sh
56-
npm run lint
47+
# If you want to run this locally, you can run the source code locally and run Cypress locally
48+
npm run dev && npm run cy:open
5749
```
50+
51+
### Running Playwright Test Automations
52+
`Coming Soon`

cypress/support/commands/home.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,16 @@ Cypress.Commands.add('verifyTopNavMenubar', (brandText, menuItems, socialLinks)
2323
Cypress.Commands.add('verifySectionVisibility', (sectionSelector) => {
2424
cy.getDataTest(sectionSelector).should('exist').should('be.visible');
2525
});
26+
27+
/**
28+
* Verify the professional stats
29+
* @param {Object[]} stats - The stats to verify
30+
* @param {string} stats.dataTest - The data test for the stat
31+
* @param {string} stats.value - The value for the stat
32+
* @param {string} stats.label - The label for the stat
33+
*/
34+
Cypress.Commands.add('verifyProfessionalStats', (stats) => {
35+
stats.forEach((stat) => {
36+
cy.getDataTest(`stat-${stat.dataTest}`).should('be.visible').should('contain', stat.value).should('contain', stat.label);
37+
});
38+
});

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"build": "vite build",
1212
"preview": "vite preview",
1313
"cy:open": "cypress open",
14-
"lint": "eslint . --fix"
14+
"lint": "eslint . --fix",
15+
"test:ci": "npm run dev &&cypress run --record --key ${{ secrets.CYPRESS_RECORD_KEY }}"
1516
},
1617
"dependencies": {
1718
"@primeuix/themes": "^1.2.3",

0 commit comments

Comments
 (0)