Page MenuHomePhabricator

VisualEditor/Cite tests failing on REL1_33
Closed, ResolvedPublic

Description

VisualEditor/Cite tests are failing on REL1_33.

Failure log from https://integration.wikimedia.org/ci/job/release-quibble-composer-mysql-hhvm-docker/5/console:

FAILED TESTS:
  ve.dm.Converter (Cite)
    ✖ getModelFromDom
      HeadlessChrome 73.0.3683 (Linux 0.0.0)
    mw:Reference: real data
    Expected: [
      {
        "type": "paragraph"
      },
      "F",
      "o",
      "o",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "B",
      "a",
      "z",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 1,
          "listKey": "literal/:0",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": ":0"
            },
            "body": {
              "html": "Quux"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Quux\"},\"attrs\":{\"group\":\"g1\",\"name\":\":0\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "W",
      "h",
      "e",
      "e",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "body": {
              "html": "<a rel=\"mw:WikiLink\" href=\"./Bar\">Bar</a>"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"<a rel=\\\"mw:WikiLink\\\" href=\\\"./Bar\\\">Bar</a>\"},\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "Y",
      "a",
      "y",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 2,
          "listKey": "auto/0",
          "mw": {
            "attrs": {
              "group": "g1"
            },
            "body": {
              "id": "mw-cite-3"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"id\":\"mw-cite-3\"},\"attrs\":{\"group\":\"g1\"}}",
          "refGroup": "g1",
          "refListItemId": "mw-cite-3"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "Q",
      "u",
      "u",
      "x",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "body": {
              "html": "Different content"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Different content\"},\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "F",
      "o",
      "o",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/g1",
          "listIndex": 3,
          "listKey": "literal/foo",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": "foo"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"attrs\":{\"group\":\"g1\",\"name\":\"foo\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      {
        "type": "/paragraph"
      },
      {
        "attributes": {
          "isResponsive": true,
          "listGroup": "mwReference/g1",
          "mw": {
            "attrs": {
              "group": "g1"
            },
            "body": {
              "html": "<sup about=\"#mwt8\" class=\"reference\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Ref in refs&quot;},&quot;attrs&quot;:{&quot;group&quot;:&quot;g1&quot;,&quot;name&quot;:&quot;foo&quot;}}\" rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-foo-3\">[3]</a></sup>"
            },
            "name": "references"
          },
          "originalMw": "{\"name\":\"references\",\"body\":{\"html\":\"<sup about=\\\"#mwt8\\\" class=\\\"reference\\\" data-mw=\\\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Ref in refs&quot;},&quot;attrs&quot;:{&quot;group&quot;:&quot;g1&quot;,&quot;name&quot;:&quot;foo&quot;}}\\\" rel=\\\"dc:references\\\" typeof=\\\"mw:Extension/ref\\\"><a href=\\\"#cite_note-foo-3\\\">[3]</a></sup>\"},\"attrs\":{\"group\":\"g1\"}}",
          "refGroup": "g1",
          "templateGenerated": false
        },
        "type": "mwReferencesList"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 3,
          "listKey": "literal/foo",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": "foo"
            },
            "body": {
              "html": "Ref in refs"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Ref in refs\"},\"attrs\":{\"group\":\"g1\",\"name\":\"foo\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      {
        "type": "/paragraph"
      },
      {
        "type": "/mwReferencesList"
      },
      {
        "type": "internalList"
      },
      {
        "attributes": {
          "originalHtml": "<a rel=\"mw:WikiLink\" href=\"./Bar\">Bar</a>"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      [
        "B",
        [
          {
            "attributes": {
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      [
        "a",
        [
          {
            "attributes": {
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      [
        "r",
        [
          {
            "attributes": {
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "Quux"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "Q",
      "u",
      "u",
      "x",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "No name"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "N",
      "o",
      " ",
      "n",
      "a",
      "m",
      "e",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "Ref in refs"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "R",
      "e",
      "f",
      " ",
      "i",
      "n",
      " ",
      "r",
      "e",
      "f",
      "s",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "type": "/internalList"
      }
    ]
    Actual: [
      {
        "type": "paragraph"
      },
      "F",
      "o",
      "o",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "B",
      "a",
      "z",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 1,
          "listKey": "literal/:0",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": ":0"
            },
            "body": {
              "html": "Quux"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Quux\"},\"attrs\":{\"group\":\"g1\",\"name\":\":0\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "W",
      "h",
      "e",
      "e",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "body": {
              "html": "<a rel=\"mw:WikiLink\" href=\"./Bar\">Bar</a>"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"<a rel=\\\"mw:WikiLink\\\" href=\\\"./Bar\\\">Bar</a>\"},\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "Y",
      "a",
      "y",
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 2,
          "listKey": "auto/0",
          "mw": {
            "attrs": {
              "group": "g1"
            },
            "body": {
              "id": "mw-cite-3"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"id\":\"mw-cite-3\"},\"attrs\":{\"group\":\"g1\"}}",
          "refGroup": "g1",
          "refListItemId": "mw-cite-3"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "Q",
      "u",
      "u",
      "x",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/",
          "listIndex": 0,
          "listKey": "literal/bar",
          "mw": {
            "attrs": {
              "name": "bar"
            },
            "body": {
              "html": "Different content"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Different content\"},\"attrs\":{\"name\":\"bar\"}}",
          "refGroup": ""
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      " ",
      "F",
      "o",
      "o",
      {
        "attributes": {
          "contentsUsed": false,
          "listGroup": "mwReference/g1",
          "listIndex": 3,
          "listKey": "literal/foo",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": "foo"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"attrs\":{\"group\":\"g1\",\"name\":\"foo\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      {
        "type": "/paragraph"
      },
      {
        "attributes": {
          "isResponsive": true,
          "listGroup": "mwReference/g1",
          "mw": {
            "attrs": {
              "group": "g1"
            },
            "body": {
              "html": "<sup about=\"#mwt8\" class=\"reference\" data-mw=\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Ref in refs&quot;},&quot;attrs&quot;:{&quot;group&quot;:&quot;g1&quot;,&quot;name&quot;:&quot;foo&quot;}}\" rel=\"dc:references\" typeof=\"mw:Extension/ref\"><a href=\"#cite_note-foo-3\">[3]</a></sup>"
            },
            "name": "references"
          },
          "originalMw": "{\"name\":\"references\",\"body\":{\"html\":\"<sup about=\\\"#mwt8\\\" class=\\\"reference\\\" data-mw=\\\"{&quot;name&quot;:&quot;ref&quot;,&quot;body&quot;:{&quot;html&quot;:&quot;Ref in refs&quot;},&quot;attrs&quot;:{&quot;group&quot;:&quot;g1&quot;,&quot;name&quot;:&quot;foo&quot;}}\\\" rel=\\\"dc:references\\\" typeof=\\\"mw:Extension/ref\\\"><a href=\\\"#cite_note-foo-3\\\">[3]</a></sup>\"},\"attrs\":{\"group\":\"g1\"}}",
          "refGroup": "g1",
          "templateGenerated": false
        },
        "type": "mwReferencesList"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      {
        "attributes": {
          "contentsUsed": true,
          "listGroup": "mwReference/g1",
          "listIndex": 3,
          "listKey": "literal/foo",
          "mw": {
            "attrs": {
              "group": "g1",
              "name": "foo"
            },
            "body": {
              "html": "Ref in refs"
            },
            "name": "ref"
          },
          "originalMw": "{\"name\":\"ref\",\"body\":{\"html\":\"Ref in refs\"},\"attrs\":{\"group\":\"g1\",\"name\":\"foo\"}}",
          "refGroup": "g1"
        },
        "type": "mwReference"
      },
      {
        "type": "/mwReference"
      },
      {
        "type": "/paragraph"
      },
      {
        "type": "/mwReferencesList"
      },
      {
        "type": "internalList"
      },
      {
        "attributes": {
          "originalHtml": "<a rel=\"mw:WikiLink\" href=\"./Bar\">Bar</a>"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      [
        "B",
        [
          {
            "attributes": {
              "hrefPrefix": "./",
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      [
        "a",
        [
          {
            "attributes": {
              "hrefPrefix": "./",
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      [
        "r",
        [
          {
            "attributes": {
              "hrefPrefix": "./",
              "lookupTitle": "Bar",
              "normalizedTitle": "Bar",
              "origTitle": "Bar",
              "title": "Bar"
            },
            "type": "link/mwInternal"
          }
        ]
      ],
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "Quux"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "Q",
      "u",
      "u",
      "x",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "No name"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "N",
      "o",
      " ",
      "n",
      "a",
      "m",
      "e",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "attributes": {
          "originalHtml": "Ref in refs"
        },
        "type": "internalItem"
      },
      {
        "internal": {
          "generated": "wrapper"
        },
        "type": "paragraph"
      },
      "R",
      "e",
      "f",
      " ",
      "i",
      "n",
      " ",
      "r",
      "e",
      "f",
      "s",
      {
        "type": "/paragraph"
      },
      {
        "type": "/internalItem"
      },
      {
        "type": "/internalList"
      }
    ]

The difference is in properties like "hrefPrefix": "./" being present in actual output but missing from expected output.

This is because we removed those properties from our data model per T206357, but change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/501040 was not included in REL1_33 while change https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cite/+/501041 was inclided.

Event Timeline

Change 517907 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@REL1_33] Remove support for page title "hrefPrefix" other than './'

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

Change 517907 merged by Krinkle:
[mediawiki/extensions/VisualEditor@REL1_33] Remove support for page title "hrefPrefix" other than './'

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

matmarex claimed this task.