=== Overview ===
This task involves the work with answering the following question:
//For context items in mobile VE, are the right **logging events** being fired by the right **user actions/inputs** at the right **times**?//
The above is intended to help us verify the work we recently did to enhance instrumentation for mobile context items and dialogs in mobile VE is working as we expect it to: T221252
=== Open issues ===
- [] Do we need to test on both desktop and mobile? If we need to do desktop, getting a sampled session will be an issue (since only 1 in 16 sessions is logged).
- [] Fill in `feature` values for all actions (some have only the `action` specified)
=== Instructions ===
In the mobile visual editor, perform each of the actions listed below and verify that a [VisualEditorFeatureUse](https://meta.wikimedia.org/wiki/Schema:VisualEditorFeatureUse) event fires with the appropriate `feature` and `action` values (written in the table as `feature:action`). These events should fire in all sessions (not just a sample).
The easiest way to monitor events is by enabling the in-site monitoring UI (see instructions at https://www.mediawiki.org/wiki/Extension:EventLogging/Programming#Monitoring_events).
=== Testing an event ===
Follow these steps to test whether the right event is firing when **tapping an existing link**:
# View the mobile version of the following page on your laptop, in Chrome: https://en.wikipedia.org/wiki/Biological_life_cycle?trackdebug=1&useformat=mobile
# Open the inspector in Chrome
# Make sure you are on the “Console” tab within the inspector (you most likely will have landed in the “Element” tab)
# Tap an edit pencil
# Tap an existing link //internal link//
# Look in the browser's console to confirm the following event was fired: `mf.schemaVisualEditorFeatureUse {feature: "link/internal", action: "context-show", editingSessionId: "88ef878111dc034c9c5c"}`
=== Actions and Events ===
**Opening of windows**
|**Action**|**Event**|**Event fired (Y/N)**
| Tap edit in an existing context item | `window-open-from-context`|
| A keyboard shortcut is used to open a context item | `window-open-from-trigger`|//Not technically desktop only, but requires an external bluetooth keyboard on mobile, so very unlikely// |
|A sequence is used to open a window|`window-open-from-sequence/`| //A sequence is a string of characters which VE notices -- generally wikitext, so e.g. `{{` will make the template dialog appear//
|Tap an edit tool in the editing toolbar|`window-open-from-tool`|
|Tap to add a new citation, tap "Manual" tab, tap "Book" |`window-open-from-command`| |
|Open an existing link, tap edit, tap "X" in the search dialog|`dialog-abort`|
|Insert a new link, in "Link" dialog, enter new text into "Search pages" search field, tap "Done"| `dialog-apply` | |
**Context items**
|**Action**|**Event**|**Event fired (Y/N)**
|Tap an existing link, citation, image, table, etc. [2] | `context-show`| |
|Tap an existing annotation - link, citation, etc., tap "trash" or "unlink" icon|`context-clear`| |
|Delete an existing node - table, etc.|`context-delete`| |
2. Several events at once could be fired
**Links**
|**Action**|**Event**|**Event fired (Y/N)**
|Tap an existing internal link, tap "edit"|`link/internal:context-show` then `link:window-open-from-context`|
|Tap an existing external link, tap "edit"|`link:context-show` then `link:window-open-from-context`|
| With a link dialog open, type text into the "Search pages" search field|`link:search-pages-input`|
| With a link dialog open, type text into the "External link" link field| `link:external-link-input`|
| With the link dialog open, switch between the "Search pages" and "External link" tabs|`link:panel-switch`|
| Tap a link from the "Search pages" article search results list|`link:search-pages-choose`|
| Tap "Done" from either the "Search pages" or "External link" tabs|`link:dialog-apply`|
**Citations**
|**Action**|**Event**|**Event fired (Y/N)**
|Tap citation icon in toolbar, |`citoid:window-open`|
| Tap the "Automatic", "Manual" and "Re-use" tabs| `citoid:panel-switch`|
|Tap the "Manual" tab, tap a template: "Website", "Book" etc.|`citoid:manual-choose`|
| Tap citation icon in toolbar, tap "Automatic" tab (if not already selected), insert URL, tap "Generate"|`citoid:automatic-generate`|
| Tap "insert"|`citoid:automatic-insert`|
| Tap citation icon in toolbar, tap "Re-use" tab, tap an existing citation| `citoid:reuse-choose`|
| Edit an existing citation, make changes in dialog, tap "Apply changes"| `citoid:dialog-apply`|
| Edit an existing citation, tap "X" in the dialog that appears| `citoid:dialog-abort`|
=== "Done" ===
- [ ] We know which of the actions listed in the **"Instrumentation"** section of the **[VE feature instrumentation spec](https://docs.google.com/document/d/1n0MKZWiNm2ZviBHiImnNRnUjSp5e5JqfXorYtIsuP-0/edit?pli=1#) are firing logging events in the way they should be.