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

Temporary disable VisualEditor capability check #1941

Merged
merged 1 commit into from
Nov 5, 2023
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
Temporary disable VisualEditor capability check
  • Loading branch information
VadimKovalenkoSNF committed Nov 5, 2023
commit 4fed30a7bbba994d73feb7b2fbe7968003c7b2a3
3 changes: 2 additions & 1 deletion src/mwoffliner.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ async function execute(argv: any) {
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
const hasWikimediaMobileApi = await MediaWiki.hasWikimediaMobileApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()
await downloader.setBaseUrls(forceRender)

RedisStore.setOptions(argv.redis || config.defaults.redisPath)
Expand Down
3 changes: 2 additions & 1 deletion src/util/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export const RULE_TO_REDIRECT = /window\.top !== window\.self/
export const WEBP_HANDLER_URL = 'https://gist.githubusercontent.com/rgaudin/60bb9cc6f187add506584258028b8ee1/raw/9d575b8e25d67eed2a9c9a91d3e053a0062d2fc7/web-handler.js'
export const MAX_FILE_DOWNLOAD_RETRIES = 5
export const BLACKLISTED_NS = ['Story'] // 'Story' Wikipedia namespace is content, but not indgestable by Parsoid https://github.com/openzim/mwoffliner/issues/1853
export const RENDERERS_LIST = ['WikimediaDesktop', 'VisualEditor', 'WikimediaMobile']
// TODO: Enable back once regression Phabricator:T350117 fixed
export const RENDERERS_LIST = ['WikimediaDesktop', /* 'VisualEditor',*/ 'WikimediaMobile']
3 changes: 2 additions & 1 deletion test/unit/downloader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ describe('Downloader class', () => {
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
await MediaWiki.hasWikimediaMobileApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()
await downloader.setBaseUrls()
})

Expand Down
3 changes: 2 additions & 1 deletion test/unit/mwApi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const initMW = async (downloader: Downloader) => {
await MediaWiki.getMwMetaData(downloader)
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()

await MediaWiki.getNamespaces([], downloader)
}
Expand Down
3 changes: 2 additions & 1 deletion test/unit/renderers/renderer.builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ describe('RendererBuilder', () => {
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
await MediaWiki.hasWikimediaMobileApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()
await downloader.setBaseUrls()

const rendererBuilderOptions = {
Expand Down
3 changes: 2 additions & 1 deletion test/unit/saveArticles.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('saveArticles', () => {
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
await MediaWiki.hasWikimediaMobileApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()
await downloader.setBaseUrls(renderer)
const _articlesDetail = await downloader.getArticleDetailsIds(['London'])
const articlesDetail = mwRetToArticleDetail(_articlesDetail)
Expand Down
3 changes: 2 additions & 1 deletion test/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ export async function setupScrapeClasses({ mwUrl = 'https://en.wikipedia.org', f
await MediaWiki.hasCoordinates(downloader)
await MediaWiki.hasWikimediaDesktopApi()
await MediaWiki.hasWikimediaMobileApi()
await MediaWiki.hasVisualEditorApi()
// TODO: Enable back once regression Phabricator:T350117 fixed
// await MediaWiki.hasVisualEditorApi()

const dump = new Dump(format, {} as any, MediaWiki.metaData)

Expand Down
Loading