From 097613de29f93b9dcde24a8f73ec07f244858d8b Mon Sep 17 00:00:00 2001 From: benoit74 Date: Fri, 19 Jul 2024 15:10:12 +0000 Subject: [PATCH 1/2] Add test checking that expected entries are present --- CHANGELOG.md | 1 + tests-integration/integration.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3d8a3..1927f4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Make it clear that `--profile` argument can be an HTTP(S) URL (and not only a path) (#288) - Add `--custom-behaviors` argument to support path/HTTP(S) URL custom behaviors to pass to the crawler (#313) - Fix README imprecisions + add back warc2zim availability in docker image (#314) +- Enhance integration test to assert final content of the ZIM (#287) ## [2.0.6] - 2024-08-02 diff --git a/tests-integration/integration.py b/tests-integration/integration.py index 9550386..c314167 100644 --- a/tests-integration/integration.py +++ b/tests-integration/integration.py @@ -31,6 +31,24 @@ def test_zim_scraper(): assert "Browsertrix crawler " in scraper +def test_files_list(): + """Check that expected files are present in the ZIM at proper path""" + zim_fh = Archive("/output/isago.zim") + for expected_entry in [ + "_zim_static/__wb_module_decl.js", + "_zim_static/wombat.js", + "_zim_static/wombatSetup.js", + "isago.rskg.org/", + "isago.rskg.org/a-propos", + "isago.rskg.org/conseils", + "isago.rskg.org/faq", + "isago.rskg.org/static/favicon256.png", + "isago.rskg.org/static/tarifs-isago.pdf", + "maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css", + ]: + assert zim_fh.get_content(expected_entry) + + def test_user_agent(): """Test that mobile user agent was used From f756c2c652df62f6526e2409a6c66d535da6193e Mon Sep 17 00:00:00 2001 From: benoit74 Date: Wed, 7 Aug 2024 09:38:15 +0000 Subject: [PATCH 2/2] Fix CHANGELOG --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1927f4b..417d2cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- Add `--custom-behaviors` argument to support path/HTTP(S) URL custom behaviors to pass to the crawler (#313) + ### Changed - Make it clear that `--profile` argument can be an HTTP(S) URL (and not only a path) (#288) -- Add `--custom-behaviors` argument to support path/HTTP(S) URL custom behaviors to pass to the crawler (#313) - Fix README imprecisions + add back warc2zim availability in docker image (#314) - Enhance integration test to assert final content of the ZIM (#287)