diff --git a/__tests__/__snapshots__/blog-page.test.tsx.snap b/__tests__/__snapshots__/blog-page.test.tsx.snap new file mode 100644 index 0000000..59ef779 --- /dev/null +++ b/__tests__/__snapshots__/blog-page.test.tsx.snap @@ -0,0 +1,48 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Blog Page renders blog page unchanged 1`] = ` +
+
+

+ Blog +

+ +
+
+`; diff --git a/__tests__/blog-page.test.tsx b/__tests__/blog-page.test.tsx new file mode 100644 index 0000000..55cd38d --- /dev/null +++ b/__tests__/blog-page.test.tsx @@ -0,0 +1,26 @@ +import { render, screen } from '@testing-library/react'; + +import Page from '@/app/(main)/blog/page'; + +describe('Blog Page', () => { + it('renders blog page unchanged', () => { + const { container } = render(); + expect(container).toMatchSnapshot(); + }); + + it('renders a heading', () => { + render(); + + const heading = screen.getByRole('heading', { level: 1 }); + + expect(heading).toBeInTheDocument(); + }); + + it('renders blog posts', () => { + render(); + + const posts = screen.getAllByRole('heading', { level: 2 }); + + expect(posts.length).toBeGreaterThan(0); + }); +}); diff --git a/app/(main)/blog/posts/[post]/page.tsx b/app/(main)/blog/posts/[post]/page.tsx index f14cc20..0ce94a2 100644 --- a/app/(main)/blog/posts/[post]/page.tsx +++ b/app/(main)/blog/posts/[post]/page.tsx @@ -12,7 +12,7 @@ const PostPage = async (props: PostPageProps) => { if (!post) { return ( -

+

Post not found

); @@ -27,10 +27,10 @@ const PostPage = async (props: PostPageProps) => { height={600} alt='post cover image' /> -

+

{post.title}

{' '} -
+
diff --git a/app/(platform)/(dashboard)/board/[boardId]/_components/board-liveblocks.tsx b/app/(platform)/(dashboard)/board/[boardId]/_components/board-liveblocks.tsx index 9d4f282..aeee29c 100644 --- a/app/(platform)/(dashboard)/board/[boardId]/_components/board-liveblocks.tsx +++ b/app/(platform)/(dashboard)/board/[boardId]/_components/board-liveblocks.tsx @@ -50,14 +50,14 @@ BoardLiveblocks.Skeleton = function SkeletonBoardLiveblocks() {
  1. -
    +
      - - - + + +
  2. diff --git a/app/(platform)/(dashboard)/board/[boardId]/_components/list-form.tsx b/app/(platform)/(dashboard)/board/[boardId]/_components/list-form.tsx index 8db1612..cc0a599 100644 --- a/app/(platform)/(dashboard)/board/[boardId]/_components/list-form.tsx +++ b/app/(platform)/(dashboard)/board/[boardId]/_components/list-form.tsx @@ -76,7 +76,7 @@ export const ListForm = () => { className='h-7 border-transparent px-2 py-1 text-sm font-medium transition hover:border-input focus:border-input' placeholder='Enter list title...' /> - +
    Add list -
    +
    List Actions
    - - + + {
    - - + + Delete this list diff --git a/app/(platform)/layout.tsx b/app/(platform)/layout.tsx index c655a66..2b4236e 100644 --- a/app/(platform)/layout.tsx +++ b/app/(platform)/layout.tsx @@ -9,17 +9,17 @@ import { ModalProvider } from '@/components/providers/modal-provider'; import { QueryProvider } from '@/components/providers/query-provider'; const PlatformLayout = ({ children }: { children: React.ReactNode }) => { - const { theme } = useTheme(); + const { resolvedTheme } = useTheme(); return ( - + {children} diff --git a/components/form/form-textarea.tsx b/components/form/form-textarea.tsx index b7896f0..742d388 100644 --- a/components/form/form-textarea.tsx +++ b/components/form/form-textarea.tsx @@ -48,7 +48,7 @@ export const FormTextarea = forwardRef( {label ? ( diff --git a/docs/mint.json b/docs/mint.json index 2539199..a0185f1 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -2,8 +2,8 @@ "$schema": "https://mintlify.com/schema.json", "name": "Tasko", "logo": { - "dark": "/public/logo-light.svg", - "light": "/public/logo-dark.svg", + "dark": "/public/logo-dark.svg", + "light": "/public/logo-light.svg", "href": "https://tasko.ahmadk953.org/" }, "favicon": "/public/favicon.svg",