From 79d698b15d4423137d7e91b9db4afa8e0fcf0ca2 Mon Sep 17 00:00:00 2001
From: Glen Paul Florendo <9373317+glenflorendo@users.noreply.github.com>
Date: Sat, 6 Apr 2024 11:31:44 -0700
Subject: [PATCH 1/3] test: fix date input test
---
packages/ui/src/components/calendar/calendar.tsx | 1 +
packages/ui/src/components/date-input/date-input.test.tsx | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/ui/src/components/calendar/calendar.tsx b/packages/ui/src/components/calendar/calendar.tsx
index 97175467..c47f0b13 100644
--- a/packages/ui/src/components/calendar/calendar.tsx
+++ b/packages/ui/src/components/calendar/calendar.tsx
@@ -141,6 +141,7 @@ export default function Calendar({ initDate = new Date(), onSelectValueChange }:
return (
handleSelected(ele as CalendarDate)}
className={clsx(
"h-8 w-8 text-center text-xs font-normal leading-[18.8px]",
diff --git a/packages/ui/src/components/date-input/date-input.test.tsx b/packages/ui/src/components/date-input/date-input.test.tsx
index 9a660be8..affd3b7a 100644
--- a/packages/ui/src/components/date-input/date-input.test.tsx
+++ b/packages/ui/src/components/date-input/date-input.test.tsx
@@ -49,7 +49,7 @@ describe("Date Input", () => {
expect(monthOptions).toHaveTextContent(month);
expect(yearOptions).toHaveTextContent(year);
- expect(screen.getByText(day).getAttribute("class")).toContain("rounded-full");
+ expect(screen.getByTestId(`${today.getMonth()}/${day}/${year}`).getAttribute("class")).toContain("rounded-full");
});
test("date input value updates when date is selected in Calendar", async () => {
From 034fdaedb1173dc14b45512f36961d01fbce7c9d Mon Sep 17 00:00:00 2001
From: Glen Paul Florendo <9373317+glenflorendo@users.noreply.github.com>
Date: Sat, 6 Apr 2024 14:58:07 -0700
Subject: [PATCH 2/3] config: set ignore for eslint
---
.eslintignore | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 .eslintignore
diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 00000000..6e76dbec
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1,8 @@
+*-lock.*
+.pnpm-store
+build
+coverage
+data
+dist
+node_modules
+package.*
From 4ae2216494233d5992f5fe3e5e24171bd255e161 Mon Sep 17 00:00:00 2001
From: Glen Paul Florendo <9373317+glenflorendo@users.noreply.github.com>
Date: Sat, 6 Apr 2024 15:00:27 -0700
Subject: [PATCH 3/3] fix: update ci scripts to use package versions for
dependencies
---
package.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index a86fec21..afe1c06f 100644
--- a/package.json
+++ b/package.json
@@ -5,8 +5,8 @@
"main": "index.js",
"scripts": {
"build": "pnpm nx run-many --target=build --output-style=stream --all",
- "ci:format": "pnpm dlx prettier --check --ignore-unknown '**/*.{css,js,json,jsx,md,ts,tsx,yaml}'",
- "ci:lint": "pnpm dlx eslint --fix-dry-run '**/*.{js,jsx,ts,tsx}'",
+ "ci:format": "prettier --check --ignore-unknown '**/*.{css,js,json,jsx,md,ts,tsx,yaml}'",
+ "ci:lint": "eslint --fix-dry-run '**/*.{js,jsx,ts,tsx}'",
"clean": "rm -rf dist node_modules && pnpm --recursive --parallel exec rm -rf dist node_modules",
"dev": "pnpm nx run-many --target=dev --output-style=stream --all",
"graph": "pnpm nx graph",
|