File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ describe("SeriesInfoCard description", () => {
5353 expect ( screen . queryByRole ( "button" , { name : / s e r i e s \. m i s s i n g _ / } ) ) . not . toBeInTheDocument ( ) ;
5454 } ) ;
5555
56- it ( "누락 회차 안내를 클릭하면 아이콘만 남기고 다시 클릭하면 펼친다" , ( ) => {
56+ it ( "누락 회차 안내는 기본으로 접혀 있고 클릭하면 내용을 펼친다" , ( ) => {
5757 render (
5858 < SeriesInfoCard
5959 series = { { ...series , display_unit : "volume" } }
@@ -66,15 +66,16 @@ describe("SeriesInfoCard description", () => {
6666 ) ;
6767
6868 const notice = screen . getByRole ( "button" , { name : "series.missing_volumes:9권, 12권" } ) ;
69- expect ( notice ) . toHaveTextContent ( "series.missing_volumes:9권, 12권" ) ;
70-
71- fireEvent . click ( notice ) ;
72-
7369 expect ( notice ) . toHaveAttribute ( "aria-pressed" , "true" ) ;
7470 expect ( notice ) . not . toHaveTextContent ( "series.missing_volumes:9권, 12권" ) ;
7571
7672 fireEvent . click ( notice ) ;
73+
7774 expect ( notice ) . toHaveAttribute ( "aria-pressed" , "false" ) ;
7875 expect ( notice ) . toHaveTextContent ( "series.missing_volumes:9권, 12권" ) ;
76+
77+ fireEvent . click ( notice ) ;
78+ expect ( notice ) . toHaveAttribute ( "aria-pressed" , "true" ) ;
79+ expect ( notice ) . not . toHaveTextContent ( "series.missing_volumes:9권, 12권" ) ;
7980 } ) ;
8081} ) ;
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export function SeriesInfoCard({
5454 const [ isEditModalOpen , setIsEditModalOpen ] = useState ( false ) ;
5555 const [ isDescriptionExpanded , setIsDescriptionExpanded ] = useState ( false ) ;
5656 const [ isDescriptionTruncated , setIsDescriptionTruncated ] = useState ( false ) ;
57- const [ isMissingNumberNoticeCollapsed , setIsMissingNumberNoticeCollapsed ] = useState ( false ) ;
57+ const [ isMissingNumberNoticeCollapsed , setIsMissingNumberNoticeCollapsed ] = useState ( true ) ;
5858 const descriptionRef = useRef < HTMLParagraphElement | null > ( null ) ;
5959 const [ isProcessing , setIsProcessing ] = useState ( false ) ;
6060 const [ isDropdownOpen , setIsDropdownOpen ] = useState ( false ) ;
@@ -180,7 +180,7 @@ export function SeriesInfoCard({
180180 } , [ displayDescription ] ) ;
181181
182182 useEffect ( ( ) => {
183- setIsMissingNumberNoticeCollapsed ( false ) ;
183+ setIsMissingNumberNoticeCollapsed ( true ) ;
184184 } , [ missingNumberNoticeLabel ] ) ;
185185
186186 useEffect ( ( ) => {
You can’t perform that action at this time.
0 commit comments