File tree Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Expand file tree Collapse file tree 1 file changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,31 @@ test('E2E Magazine - Post Pages', async t => {
140140 hasPrevLink ,
141141 `${ collectionName } ${ post . permalink } has link to previous post`
142142 )
143+
144+ if ( ! hasPrevLink ) {
145+ console . log ( `
146+
147+ ======
148+
149+ previous post link not found
150+
151+
152+ ---
153+ ` )
154+ console . log ( 'linkTexts' , allLinks . map ( link => $ ( link ) . text ( ) . trim ( ) ) )
155+ console . log ( 'previousPost.title' , post . links . previousPost . title )
156+ console . log ( `
157+ ---
158+ ` )
159+ console . log ( 'linkHrefs' , allLinks . map ( link => $ ( link ) . attr ( 'href' ) ) )
160+ console . log ( 'previousPost.permalink' , post . links . previousPost . permalink )
161+ console . log ( `
162+ ---
163+
164+ ======
165+
166+ ` )
167+ }
143168 }
144169
145170 if ( post . links . nextPost ) {
@@ -155,6 +180,31 @@ test('E2E Magazine - Post Pages', async t => {
155180 hasNextLink ,
156181 `${ collectionName } ${ post . permalink } has link to next post`
157182 )
183+
184+ if ( ! hasNextLink ) {
185+ console . log ( `
186+
187+ ======
188+
189+ next post link not found
190+
191+
192+ ---
193+ ` )
194+ console . log ( 'linkTexts' , allLinks . map ( link => $ ( link ) . text ( ) . trim ( ) ) )
195+ console . log ( 'nextPost.title' , post . links . nextPost . title )
196+ console . log ( `
197+ ---
198+ ` )
199+ console . log ( 'linkHrefs' , allLinks . map ( link => $ ( link ) . attr ( 'href' ) ) )
200+ console . log ( 'nextPost.permalink' , post . links . nextPost . permalink )
201+ console . log ( `
202+ ---
203+
204+ ======
205+
206+ ` )
207+ }
158208 }
159209 } catch ( err ) {
160210 t . fail (
You can’t perform that action at this time.
0 commit comments