Skip to content

Commit 8d3f42e

Browse files
committed
letsseee
1 parent 0c56362 commit 8d3f42e

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

src/e2e-tests/magazine/post.test.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
 (0)