diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 47a95c1..06833f3 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
@@ -46,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
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",