Skip to content

Commit

Permalink
Use temporary article list from WP1 for e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
audiodude authored and kelson42 committed Dec 4, 2024
1 parent a3169e5 commit 9b7d347
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test/e2e/en10.e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jest.setTimeout(200000)
const parameters = {
mwUrl: 'https://en.wikipedia.org',
adminEmail: '[email protected]',
articleList: 'https://download.openzim.org/wp1/enwiki/tops/10.tsv',
articleList: 'https://api.wp1.openzim.org/v1/builders/28a933d2-1903-417d-939e-3b6e8ee7a126/selection/latest.tsv',
redis: process.env.REDIS,
// format: ['nopic', 'novid', 'nopdf', 'nodet'],
format: ['nopic', 'nopdf'],
Expand All @@ -24,34 +24,34 @@ 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).toBeLessThan(22)
expect(dump.status.files.success).toBeGreaterThan(50)
expect(dump.status.files.success).toBeLessThan(60)
// nopic has enough redirects
expect(dump.status.redirects.written).toBeGreaterThan(480)
expect(dump.status.redirects.written).toBeGreaterThan(500)
// nopic has 10 articles
expect(dump.status.articles.success).toEqual(10)
// No article and files error
expect(dump.status.articles.fail).toEqual(0)
expect(dump.status.files.fail).toEqual(0)
} else if (dump.novid) {
// novid has enough files
expect(dump.status.files.success).toBeGreaterThan(420)
expect(dump.status.files.success).toBeGreaterThan(314)
// novid has enough redirects
expect(dump.status.redirects.written).toBeGreaterThan(480)
expect(dump.status.redirects.written).toBeGreaterThan(314)
// novid has 10 articles
expect(dump.status.articles.success).toEqual(10)
} else if (dump.nopdf) {
// nopdf has enough files
expect(dump.status.files.success).toBeGreaterThan(450)
expect(dump.status.files.success).toBeGreaterThan(340)
// nopdf has enough redirects
expect(dump.status.redirects.written).toBeGreaterThan(480)
expect(dump.status.redirects.written).toBeGreaterThan(314)
// nopdf has 10 articles
expect(dump.status.articles.success).toEqual(10)
} else if (dump.nodet) {
// nodet has enough files
expect(dump.status.files.success).toBeGreaterThan(50)
// nodet has enough redirects
expect(dump.status.redirects.written).toBeGreaterThan(480)
expect(dump.status.redirects.written).toBeGreaterThan(314)
// nodet has 10 articles
expect(dump.status.articles.success).toEqual(10)
}
Expand Down

0 comments on commit 9b7d347

Please sign in to comment.