Page MenuHomePhabricator

PendingChangesBot: test for broken wikicode
Open, Needs TriagePublic

Description

Add a test for the following scenario: A user performs an action that results in broken wikicode being visible on the rendered HTML page. The easiest way to test for some of these errors is to check if there is anything with the HTML class "error" when the page is rendered and whether the error existed in the previous version.

You can get rendered version of page like this where oldid is the revision id

Example change

Other edit tests are located in autoreview.py.

Event Timeline

@Zache I'll take a swing at this.

Just to be clear, we are checking for the html "error" class tag for changes, between the previous and the new rendered html files, right?

Yes, changes. It is totally possible that the error was already in older version so we are interested only when there is new errors.

Also test doesn't need to be anything fancy, it is enough that just counts number of error css class counts in the rendered html code. However, it would be good idea to store the result to local db so if the test is runned again for some reason it can use the cached result for that revision.

Also test doesn't need to be anything fancy, it is enough that just counts number of error css class counts in the rendered html code. However, it would be good idea to store the result to local db so if the test is runned again for some reason it can use the cached result for that revision.

Ok, gotcha

@Zache It's like the other github issues are taken but can I still work them?

I can write also followup task for broken wikicode test

That will be great.
I also, just found another issue which the assignee asked to e unassigned. I will be working on that at the moment.
But I will pick up the followup tasks after.

@Ezra_yendau

I added new github ticket as followup task. I think that biggest problem would be the false positive handling as some of these indicators are used in normal text also. For example "==" is used in math.

@Ezra_yendau

I added new github ticket as followup task. I think that biggest problem would be the false positive handling as some of these indicators are used in normal text also. For example "==" is used in math.

I was just about raising a PR on this and saw that someone has already have. Can I still work on issues that are been worked on by others or I should wait for new issues to be created?

@Zache I’d like to work on this issue. Could you please assign it to me?