@@ -63,7 +63,11 @@ describe.concurrent("Concept", () => {
6363 expect (
6464 screen . getByRole ( "heading" , { name : "Definition" } )
6565 ) . toBeInTheDocument ( )
66- expect ( screen . getByText ( "Meine Definition" ) ) . toBeInTheDocument ( )
66+ const definition = screen . getByText ( "Meine Definition" )
67+ expect ( definition ) . toBeInTheDocument ( )
68+
69+ const linkElement = within ( definition ) . getByRole ( "link" , { name : / l i n k / i } )
70+ expect ( linkElement ) . toBeInTheDocument ( )
6771 } )
6872
6973 it ( "renders no definition if not provided in language" , ( ) => {
@@ -120,15 +124,25 @@ describe.concurrent("Concept", () => {
120124
121125 it ( "renders examples" , ( ) => {
122126 render ( < Concept pageContext = { ConceptPC } /> )
123- expect (
124- screen . getByRole ( "heading" , { name : / ^ e x a m p l e $ / i } )
125- ) . toBeInTheDocument ( )
127+
128+ const exampleHeading = screen . getByRole ( "heading" , { name : / ^ e x a m p l e $ / i } )
129+ expect ( exampleHeading ) . toBeInTheDocument ( )
130+
131+ const example = screen . getByText ( / E i n B e i s p i e l / i)
132+ expect ( example ) . toBeInTheDocument ( )
133+
134+ const linkElement = within ( example ) . getByRole ( "link" , { name : / l i n k / i } )
135+ expect ( linkElement ) . toBeInTheDocument ( )
126136 } )
127137
128138 it ( "renders notes" , ( ) => {
129139 render ( < Concept pageContext = { ConceptPC } /> )
130140
131- expect ( screen . getByText ( / M e i n e A n m e r k u n g / i) ) . toBeInTheDocument ( )
141+ const note = screen . getByText ( / M e i n e A n m e r k u n g / i)
142+ expect ( note ) . toBeInTheDocument ( )
143+
144+ const linkElement = within ( note ) . getByRole ( "link" , { name : / l i n k / i } )
145+ expect ( linkElement ) . toBeInTheDocument ( )
132146
133147 const list = screen . getByRole ( "list" , {
134148 name : "Note" ,
@@ -141,7 +155,11 @@ describe.concurrent("Concept", () => {
141155 it ( "renders changeNotes" , ( ) => {
142156 render ( < Concept pageContext = { ConceptPC } /> )
143157
144- expect ( screen . getByText ( / M e i n e C h a n g e N o t e / i) ) . toBeInTheDocument ( )
158+ const changeNote = screen . getByText ( / M e i n e C h a n g e N o t e / i)
159+ expect ( changeNote ) . toBeInTheDocument ( )
160+
161+ const linkElement = within ( changeNote ) . getByRole ( "link" , { name : / l i n k / i } )
162+ expect ( linkElement ) . toBeInTheDocument ( )
145163
146164 const list = screen . getByRole ( "list" , {
147165 name : / c h a n g e n o t e / i,
@@ -154,7 +172,13 @@ describe.concurrent("Concept", () => {
154172 it ( "renders editorialNotes" , ( ) => {
155173 render ( < Concept pageContext = { ConceptPC } /> )
156174
157- expect ( screen . getByText ( / M e i n e E d i t o r i a l N o t e / i) ) . toBeInTheDocument ( )
175+ const editorialNote = screen . getByText ( / M e i n e E d i t o r i a l N o t e / i)
176+ expect ( editorialNote ) . toBeInTheDocument ( )
177+
178+ const linkElement = within ( editorialNote ) . getByRole ( "link" , {
179+ name : / l i n k / i,
180+ } )
181+ expect ( linkElement ) . toBeInTheDocument ( )
158182
159183 const list = screen . getByRole ( "list" , {
160184 name : / e d i t o r i a l n o t e / i,
@@ -167,7 +191,11 @@ describe.concurrent("Concept", () => {
167191 it ( "renders historyNotes" , ( ) => {
168192 render ( < Concept pageContext = { ConceptPC } /> )
169193
170- expect ( screen . getByText ( / M e i n e H i s t o r y N o t e / i) ) . toBeInTheDocument ( )
194+ const historyNote = screen . getByText ( / M e i n e H i s t o r y N o t e / i)
195+ expect ( historyNote ) . toBeInTheDocument ( )
196+
197+ const linkElement = within ( historyNote ) . getByRole ( "link" , { name : / l i n k / i } )
198+ expect ( linkElement ) . toBeInTheDocument ( )
171199
172200 const list = screen . getByRole ( "list" , {
173201 name : / h i s t o r y n o t e / i,
@@ -180,7 +208,11 @@ describe.concurrent("Concept", () => {
180208 it ( "renders scopeNotes" , ( ) => {
181209 render ( < Concept pageContext = { ConceptPC } /> )
182210
183- expect ( screen . getByText ( / M e i n e S c o p e N o t e / i) ) . toBeInTheDocument ( )
211+ const scopeNote = screen . getByText ( / M e i n e S c o p e N o t e / i)
212+ expect ( scopeNote ) . toBeInTheDocument ( )
213+
214+ const linkElement = within ( scopeNote ) . getByRole ( "link" , { name : / l i n k / i } )
215+ expect ( linkElement ) . toBeInTheDocument ( )
184216
185217 const list = screen . getByRole ( "list" , {
186218 name : / s c o p e n o t e / i,
0 commit comments