Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test due to upstream data change #2094

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/bm.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ await testAllRenders(parameters, async (outFiles) => {
if (dump.nopic) {
// nopic has enough files (this is just an estimate and can change
// with time, as new Mediwiki versions are released).
expect(dump.status.files.success).toBeGreaterThan(13)
expect(dump.status.files.success).toBeGreaterThan(12)
expect(dump.status.files.success).toBeLessThan(22)
// nopic has enough redirects
expect(dump.status.redirects.written).toBeGreaterThan(170)
Expand Down
5 changes: 3 additions & 2 deletions test/e2e/wikisource.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ await testRenders(

for (const dump of outFiles) {
if (dump.nopic) {
console.log(dump.status.files.fail)
// nopic has enough files
expect(dump.status.files.success).toBeGreaterThanOrEqual(14)
expect(dump.status.files.success).toBeGreaterThanOrEqual(13)
// nopic has enough redirects
expect(dump.status.redirects.written).toBeGreaterThanOrEqual(16)
// nopic has enough articles
Expand All @@ -50,7 +51,7 @@ await testRenders(
for (const dump of outFiles) {
if (dump.nopic) {
// nopic has enough files
expect(dump.status.files.success).toBeGreaterThanOrEqual(14)
expect(dump.status.files.success).toBeGreaterThanOrEqual(13)
// nopic has enough redirects
expect(dump.status.redirects.written).toBeGreaterThanOrEqual(16)
// nopic has enough articles
Expand Down
2 changes: 1 addition & 1 deletion test/unit/saveArticles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('saveArticles', () => {
// Successfully scrapped existent articles
expect(articleDoc.querySelector('meta[name="geo.position"]')).toBeDefined()
// Geo Position data is correct
expect(articleDoc.querySelector('meta[name="geo.position"]')?.getAttribute('content')).toEqual('51.50722222;-0.1275')
expect(articleDoc.querySelector('meta[name="geo.position"]')?.getAttribute('content')).toEqual('51.5;-0.13333333')
// Check if header exists
expect(articleDoc.querySelector('h1.article-header, h1.pcs-edit-section-title')).toBeTruthy()
})
Expand Down
2 changes: 1 addition & 1 deletion test/unit/treatments/article.treatment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('ArticleTreatment', () => {
// Successfully scrapped existent articles
expect(articleDoc.querySelector('meta[name="geo.position"]')).toBeDefined()
// Geo Position data is correct
expect(articleDoc.querySelector('meta[name="geo.position"]')?.getAttribute('content')).toEqual('51.50722222;-0.1275')
expect(articleDoc.querySelector('meta[name="geo.position"]')?.getAttribute('content')).toEqual('51.5;-0.13333333')
})
}
})
Loading