Skip to content

Commit

Permalink
Merge pull request #215 from wri/feat/TM-786-unit-test-linting
Browse files Browse the repository at this point in the history
[TM-786] FE Unit Testing
  • Loading branch information
roguenet authored May 28, 2024
2 parents 65a9861 + 82af918 commit 8af11c8
Show file tree
Hide file tree
Showing 31 changed files with 1,020 additions and 161 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: pull-request
on:
pull_request:
branches: [main, staging, release/**]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install modules
run: yarn
- name: Test
run: yarn run jest --ci
2 changes: 1 addition & 1 deletion .jest/setEnvVars.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
process.env.NODE_ENV = "test";
process.env.NEXT_PUBLIC_API_BASE_URL = "https://test.wrirestorationmarketplace.cubeapis.com";
process.env.NEXT_PUBLIC_API_BASE_URL = "https://new-wri-staging.wri-restoration-marketplace-api.com";
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.17.0
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports[`Storyshots Components/Elements/Cards/FundingCard Default 1`] = `
Location:
</p>
<p
className="text-light-caption-200"
className="max-h-10 overflow-hidden text-light-caption-200"
data-testid="txt"
>
London, United Kingdom
Expand All @@ -54,10 +54,10 @@ exports[`Storyshots Components/Elements/Cards/FundingCard Default 1`] = `
The funding application is designed for restoration projects in Africa. This application provides an opportunity for project developers to seek financial support for their restoration initiatives across the African continent.
</p>
<div
className="mt-8 flex gap-3"
className="mt-4 flex flex-col gap-3 sm:flex-row"
>
<a
className="flex-1 bg-white border border-neutral-1000 hover:border-primary-500 disabled:border-neutral-1000 py-1.75 rounded-md px-10 uppercase disabled:bg-neutral-300 disabled:text-neutral-800 transition whitespace-nowrap text-black h-8 flex items-center justify-center gap-1.5 tracking-wide w-fit-content"
className="w-full flex-1 bg-white border border-neutral-1000 hover:border-primary-500 disabled:border-neutral-1000 py-1.75 rounded-md px-10 uppercase disabled:bg-neutral-300 disabled:text-neutral-800 transition whitespace-nowrap text-black h-8 flex items-center justify-center gap-1.5 tracking-wide w-fit-content"
disabled={false}
href="#"
onClick={[Function]}
Expand All @@ -80,7 +80,7 @@ exports[`Storyshots Components/Elements/Cards/FundingCard Default 1`] = `
</span>
</a>
<a
className="flex-1 bg-primary-500 hover:bg-primary-400 py-2 rounded-md px-10 uppercase disabled:bg-neutral-300 disabled:text-neutral-800 transition whitespace-nowrap text-black h-8 flex items-center justify-center gap-1.5 tracking-wide w-fit-content"
className="w-full flex-1 bg-primary-500 hover:bg-primary-400 py-2 rounded-md px-10 uppercase disabled:bg-neutral-300 disabled:text-neutral-800 transition whitespace-nowrap text-black h-8 flex items-center justify-center gap-1.5 tracking-wide w-fit-content"
disabled={false}
href="#"
onClick={[Function]}
Expand Down
Loading

0 comments on commit 8af11c8

Please sign in to comment.