From 284ee7245d18bfd80e7ac787a098b9a753b2895c Mon Sep 17 00:00:00 2001 From: Chris Nowicki <102450568+chris-nowicki@users.noreply.github.com> Date: Wed, 15 May 2024 23:01:51 -0400 Subject: [PATCH 01/11] release 0.2.1-alpha --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8500892..f2c9be8b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.2.0", + "version": "0.2.1", "scripts": { "dev": "next dev", "build": "next build", From d3eaed258e4a17955745be10ece55bc7b4a848db Mon Sep 17 00:00:00 2001 From: Chris Nowicki <102450568+chris-nowicki@users.noreply.github.com> Date: Fri, 17 May 2024 16:40:18 -0400 Subject: [PATCH 02/11] release: v0.2.2-alpha --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8500892..865158f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.2.0", + "version": "0.2.2", "scripts": { "dev": "next dev", "build": "next build", From 10aaccbf36646a9e66fa5b494ecc3c037c4d3b7e Mon Sep 17 00:00:00 2001 From: Chris Nowicki <102450568+chris-nowicki@users.noreply.github.com> Date: Fri, 17 May 2024 16:43:48 -0400 Subject: [PATCH 03/11] v0.2.2 (#253) path for userResults data structure in appwrite DB --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8500892..865158f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.2.0", + "version": "0.2.2", "scripts": { "dev": "next dev", "build": "next build", From cac3e3854cffa4d889d61b4a48d58a226b930a3f Mon Sep 17 00:00:00 2001 From: Shashi Lo <362527+shashilo@users.noreply.github.com> Date: Fri, 17 May 2024 16:12:38 -0500 Subject: [PATCH 04/11] v0.2.2 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f2c9be8b..9e8c5d13 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.2.1", + "version": "0.2.2", "scripts": { "dev": "next dev", "build": "next build", @@ -74,4 +74,4 @@ "ts-node": "^10.9.2", "typescript": "5.1.3" } -} +} \ No newline at end of file From f1283778c38268f4a97807d23ca42f578bf27c5c Mon Sep 17 00:00:00 2001 From: Shashi Lo <362527+shashilo@users.noreply.github.com> Date: Fri, 17 May 2024 16:15:15 -0500 Subject: [PATCH 05/11] Shashi/develop fix (#256) Co-authored-by: Chris Nowicki <102450568+chris-nowicki@users.noreply.github.com> --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 865158f2..9e8c5d13 100644 --- a/package.json +++ b/package.json @@ -74,4 +74,4 @@ "ts-node": "^10.9.2", "typescript": "5.1.3" } -} +} \ No newline at end of file From 68064959849ee2ef894d3bb5bdba336b4a5f7096 Mon Sep 17 00:00:00 2001 From: Shashi Lo <362527+shashilo@users.noreply.github.com> Date: Fri, 17 May 2024 16:19:09 -0500 Subject: [PATCH 06/11] Squashed commit of the following: commit 6f4e6eaadabcc52e7a40ad01682df7aa2a9456fa Merge: f128377 fe3db31 Author: Shashi Lo <362527+shashilo@users.noreply.github.com> Date: Fri May 17 16:17:20 2024 -0500 From d1d71ad3873cdf19772b29a353ef56a62c152034 Mon Sep 17 00:00:00 2001 From: Ryan Furrer Date: Wed, 22 May 2024 15:43:05 -0400 Subject: [PATCH 07/11] Make login page responsive (#229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #94 --- **Updates after submitting PR #229** | 5/9/24 > Please look at adding a simple test to ensure the page has the elements we're looking for. Then, use storybook visual snapshots to ensure mobile and desktop views are correct. - [x] Add unit tests with RTL - [x] Add E2E test with Playwright - [ ] ~~Add Storybook visual testing~~ - Currently blocked by needing to connect Chromatic to GitHub and granting access to the project. Should we all create an account and request access or do we use a team-wide account? --- ## Demo Video 👇🏻 https://github.com/LetsGetTechnical/gridiron-survivor/assets/40150036/205c3942-bbba-4df5-bb6e-492e2dca5602 ## Changes - Changed `img` rule in `globals.css` to `.weeklyPickImage` so it does not affect all images on the app - Fixed some styles on the root `layout.tsx` and the login `layout.tsx` - Our theming was never truly implemented and, as such, more changes are needed. For now, I made it so the layout `body` respects the theming currently in place and applies the class of `dark` when dark mode is on. This, along with using our CSS variables, will help with the light and dark mode theming. - More work needs to be done on this. - Added `layout.tsx` inside login directory - Reworked login `page.tsx` from the ground up to make it fully responsive. - Reworked from the ground up to go from mobile --> desktop - Added tailwind classes for width and height in the `Logo` component to avoid using tailwind arbitrary values - Added `weeklyPickImage` class to the `weeklyPickImage` component image for more specific styling - Add RTL and Jest testing for login page components with Shashi's help - Add Playwright E2E for UX for login page --- .github/workflows/ci.yml | 137 +++++++++++++++++++---------------- app/globals.css | 2 +- app/layout.tsx | 6 +- app/login/page.spec.ts | 30 ++++++++ app/login/page.test.tsx | 76 +++++++++++++++++++ app/login/page.tsx | 93 ++++++++++++------------ components/Logo/Logo.tsx | 25 ++++--- jest.config.ts | 19 +++-- playwright-report/index.html | 68 +++++++++++++++++ playwright.config.ts | 33 +++++++-- 10 files changed, 348 insertions(+), 141 deletions(-) create mode 100644 app/login/page.spec.ts create mode 100644 app/login/page.test.tsx create mode 100644 playwright-report/index.html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 72a1e406..defbe5b6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,74 +1,85 @@ name: LGT Docker Build and Push Image on: - pull_request: - branches: [develop] + pull_request: + types: [opened, synchronize, reopened] jobs: - build-and-push: - permissions: write-all - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v4.1.1 + build-and-push: + permissions: + contents: write + packages: write + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 - - name: Log in to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + - name: Log in to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push Docker image - uses: docker/build-push-action@v5.1.0 - with: - context: . - file: ./Dockerfile.dev - push: true - tags: ghcr.io/letsgettechnical/image:dev - #A workflow is for testing - jest-test: - runs-on: ubuntu-latest + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: + file: ./Dockerfile.dev + push: true + tags: ghcr.io/letsgettechnical/image:dev - strategy: - matrix: - node-version: [20.x] + jest-test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: ['20.x'] - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v2 - with: - version: 8 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'pnpm' - - name: Install dependencies - run: pnpm install - - name: tests - run: pnpm test -#Playwright Testing - playwright-test: - timeout-minutes: 60000 - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - - name: Install dependencies - run: npm install -g pnpm && pnpm install - - name: Install Playwright Browsers - run: pnpm exec playwright install --with-deps - - name: Run Playwright tests - run: pnpm exec playwright test - - uses: actions/upload-artifact@v4 - if: always() - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + steps: + - uses: actions/checkout@v2 + - uses: pnpm/action-setup@v2 + with: + version: 8 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - name: Install dependencies + run: pnpm install + - name: tests + run: pnpm test + test_setup: + name: Test setup + runs-on: ubuntu-latest + outputs: + preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }} + steps: + - name: Wait for Vercel Preview + uses: patrickedqvist/wait-for-vercel-preview@v1.3.1 + id: waitForVercelPreviewDeployment + with: + token: ${{ secrets.GITHUB_TOKEN }} + max_timeout: 600 + test_e2e: + needs: test_setup + name: Playwright Tests + timeout-minutes: 5 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: lts/* + - run: npm install -g pnpm && pnpm install + - run: pnpm exec playwright install --with-deps + - run: pnpm exec playwright test + - name: Upload Artifacts + uses: actions/upload-artifact@v2 + if: always() + with: + name: playwright-report + path: playwright-report/ + retention-days: 30 diff --git a/app/globals.css b/app/globals.css index 6d40a54c..66b78c93 100644 --- a/app/globals.css +++ b/app/globals.css @@ -64,4 +64,4 @@ --input: 217.2 32.6% 17.5%; --ring: 212.7 26.8% 83.9%; } -} \ No newline at end of file +} diff --git a/app/layout.tsx b/app/layout.tsx index 02f6e603..9a39b62b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -20,12 +20,10 @@ export default function RootLayout({ }) { return ( - +