Page MenuHomePhabricator

Try to write a browser test for the bracket matching feature
Closed, ResolvedPublic3 Estimated Story Points

Description

This is split from T261857: Implement bracket matching in CodeMirror behind a feature flag. The idea is to at least try to write a browser test. A single "smoke test" for each editor is enough, i.e. a single test that warns us when bracket matching stops working for some reason.

To do:

  • Copy-paste the basic setup for browser tests from an extension that already has browser tests (e.g. from Two-Column-Edit-Conflict-Merge)
  • Make sure the browser tests run on our CI
  • Fake the feature flag when the browser test runs
  • Write a test that starts editing a page, positions the cursor, and check if the relevant DOM nodes for the highlighted brackets appear somewhere on the page
  • Test both the 2010 and 2017 (VE) wikitext source editors.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lena_WMDE set the point value for this task to 5.Dec 16 2020, 9:26 AM
awight updated the task description. (Show Details)

Change 654189 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/CodeMirror@master] [WIP] Browser tests for CodeMirror

https://gerrit.wikimedia.org/r/654189

Change 654262 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/CodeMirror@master] Provide cookie workaround for setting the feature flag

https://gerrit.wikimedia.org/r/654262

Change 654262 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Provide cookie workaround for setting the feature flag

https://gerrit.wikimedia.org/r/654262

Lena_WMDE changed the point value for this task from 5 to 3.Jan 6 2021, 9:40 AM

Change 654189 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Browser tests for CodeMirror (wikitext 2010 editor)

https://gerrit.wikimedia.org/r/654189

Change 655042 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/CodeMirror@master] [WIP] Browser tests for CodeMirror (wikitext 2017 editor)

https://gerrit.wikimedia.org/r/655042

Okay, the 2010 vs. 2017 editor selection is twitchy on my local machine, possibly because of LocalSettings.php customizations. It seems to behave nicely in CI, so my opinion is that we ship it.

Change 655421 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/core@master] Enable VisualEditor newwikitext mode in CI

https://gerrit.wikimedia.org/r/655421

Change 655421 merged by jenkins-bot:
[mediawiki/core@master] Enable VisualEditor newwikitext mode in CI

https://gerrit.wikimedia.org/r/655421

Change 655042 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Browser tests for CodeMirror (wikitext 2017 editor)

https://gerrit.wikimedia.org/r/655042

Change 655618 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/core@master] Ensure that the legacy wikitext editor is preferred by default

https://gerrit.wikimedia.org/r/655618

Change 655618 merged by jenkins-bot:
[mediawiki/core@master] Ensure that the legacy wikitext editor is preferred by default

https://gerrit.wikimedia.org/r/655618

awight added a subscriber: awight.
Tobi_WMDE_SW claimed this task.
Tobi_WMDE_SW moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2021-01-06 board.