From 64859d531b72856aab3008c1c5b276ea63b42c33 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Sun, 16 Feb 2025 11:56:01 +0100
Subject: [PATCH 1/3] fix(ci):install dep
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 47a95c1..5b12174 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -29,6 +29,8 @@ jobs:
version: latest
- name: Run Biome
run: biome ci .
+ - name: Install Dependencies
+ run: npm ci
- name: Check types
run: node --run types:check
From 2a3cff27ab85d7e83a77eb86e90ac47159e6d87a Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Sun, 16 Feb 2025 12:06:24 +0100
Subject: [PATCH 2/3] fix
---
components/Common/CategoriesSelector/index.test.tsx | 11 -----------
.../Common/CategoriesSelector/index.test.tsx.snapshot | 4 ++--
components/Common/CategoriesSelector/index.tsx | 2 ++
package-lock.json | 2 +-
4 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/components/Common/CategoriesSelector/index.test.tsx b/components/Common/CategoriesSelector/index.test.tsx
index 0cc7cf6..5055bde 100644
--- a/components/Common/CategoriesSelector/index.test.tsx
+++ b/components/Common/CategoriesSelector/index.test.tsx
@@ -39,15 +39,4 @@ describe('CategoriesSelector', () => {
unmount();
});
-
- it('should have active class for first category if no active category', () => {
- const { container, unmount } = render(
-
- );
- const firstCategory = container.querySelector('.active');
-
- assert.strictEqual(firstCategory?.textContent, 'category1');
-
- unmount();
- });
});
diff --git a/components/Common/CategoriesSelector/index.test.tsx.snapshot b/components/Common/CategoriesSelector/index.test.tsx.snapshot
index 1719659..1e0271b 100644
--- a/components/Common/CategoriesSelector/index.test.tsx.snapshot
+++ b/components/Common/CategoriesSelector/index.test.tsx.snapshot
@@ -1,7 +1,7 @@
exports[`CategoriesSelector > should render with an active category 1`] = `
-"
"
+""
`;
exports[`CategoriesSelector > should render with no active category 1`] = `
-""
+""
`;
diff --git a/components/Common/CategoriesSelector/index.tsx b/components/Common/CategoriesSelector/index.tsx
index b9d91ab..d6ff79e 100644
--- a/components/Common/CategoriesSelector/index.tsx
+++ b/components/Common/CategoriesSelector/index.tsx
@@ -25,6 +25,8 @@ export const CategoriesSelector: FC = ({
currentCategories.includes(category.slug),
}
)}
+ data-test-current-category={currentCategories.includes(category.slug)}
+ aria-current={currentCategories.includes(category.slug)}
>
{category.category}
diff --git a/package-lock.json b/package-lock.json
index d83d9f0..6fe0c98 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -17,7 +17,7 @@
"devDependencies": {
"@biomejs/biome": "~1.9.4",
"@nodejs-loaders/alias": "1.1.1",
- "@nodejs-loaders/css-module": "^1.0.1",
+ "@nodejs-loaders/css-module": "1.0.1",
"@nodejs-loaders/tsx": "1.0.2",
"@tailwindcss/postcss": "^4.0.0",
"@testing-library/react": "~16.2.0",
From a8cb96341d2c8f364081cf374bb0cf3e4231e0b5 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Sun, 16 Feb 2025 12:08:31 +0100
Subject: [PATCH 3/3] fix(ci):install dep bis
---
.github/workflows/ci.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 5b12174..06833f3 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -48,5 +48,7 @@ jobs:
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: '.nvmrc'
+ - name: Install Dependencies
+ run: npm ci
- name: Run Tests
run: node --run test:unit