@@ -1516,6 +1516,189 @@ export const SUCCESS_SCENARIOS = {
15161516 ] ,
15171517 } ;
15181518 } ,
1519+ 'doc.lists.applyTemplate' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1520+ const stateDir = await harness . createStateDir ( 'doc-lists-apply-template-success' ) ;
1521+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-apply-template' ) ;
1522+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1523+ const template = {
1524+ version : 1 ,
1525+ levels : [ { level : 0 , numFmt : 'decimal' , lvlText : '%1.' } ] ,
1526+ } ;
1527+ return {
1528+ stateDir,
1529+ args : [
1530+ 'lists' ,
1531+ 'apply-template' ,
1532+ docPath ,
1533+ '--input-json' ,
1534+ JSON . stringify ( { target, template } ) ,
1535+ '--out' ,
1536+ harness . createOutputPath ( 'doc-lists-apply-template-output' ) ,
1537+ ] ,
1538+ } ;
1539+ } ,
1540+ 'doc.lists.applyPreset' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1541+ const stateDir = await harness . createStateDir ( 'doc-lists-apply-preset-success' ) ;
1542+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-apply-preset' ) ;
1543+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1544+ return {
1545+ stateDir,
1546+ args : [
1547+ 'lists' ,
1548+ 'apply-preset' ,
1549+ docPath ,
1550+ '--input-json' ,
1551+ JSON . stringify ( { target, preset : 'decimal' } ) ,
1552+ '--out' ,
1553+ harness . createOutputPath ( 'doc-lists-apply-preset-output' ) ,
1554+ ] ,
1555+ } ;
1556+ } ,
1557+ 'doc.lists.captureTemplate' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1558+ const stateDir = await harness . createStateDir ( 'doc-lists-capture-template-success' ) ;
1559+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-capture-template' ) ;
1560+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1561+ return {
1562+ stateDir,
1563+ args : [ 'lists' , 'capture-template' , docPath , '--input-json' , JSON . stringify ( { target } ) ] ,
1564+ } ;
1565+ } ,
1566+ 'doc.lists.setLevelNumbering' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1567+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-numbering-success' ) ;
1568+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-numbering' ) ;
1569+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1570+ return {
1571+ stateDir,
1572+ args : [
1573+ 'lists' ,
1574+ 'set-level-numbering' ,
1575+ docPath ,
1576+ '--input-json' ,
1577+ JSON . stringify ( { target, level : 0 , numFmt : 'decimal' , lvlText : '%1.' } ) ,
1578+ '--out' ,
1579+ harness . createOutputPath ( 'doc-lists-set-level-numbering-output' ) ,
1580+ ] ,
1581+ } ;
1582+ } ,
1583+ 'doc.lists.setLevelBullet' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1584+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-bullet-success' ) ;
1585+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-bullet' ) ;
1586+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1587+ return {
1588+ stateDir,
1589+ args : [
1590+ 'lists' ,
1591+ 'set-level-bullet' ,
1592+ docPath ,
1593+ '--input-json' ,
1594+ JSON . stringify ( { target, level : 0 , markerText : '\u2022' } ) ,
1595+ '--out' ,
1596+ harness . createOutputPath ( 'doc-lists-set-level-bullet-output' ) ,
1597+ ] ,
1598+ } ;
1599+ } ,
1600+ 'doc.lists.setLevelPictureBullet' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1601+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-picture-bullet-success' ) ;
1602+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-picture-bullet' ) ;
1603+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1604+ return {
1605+ stateDir,
1606+ args : [
1607+ 'lists' ,
1608+ 'set-level-picture-bullet' ,
1609+ docPath ,
1610+ '--input-json' ,
1611+ JSON . stringify ( { target, level : 0 , pictureBulletId : 0 } ) ,
1612+ '--out' ,
1613+ harness . createOutputPath ( 'doc-lists-set-level-picture-bullet-output' ) ,
1614+ ] ,
1615+ } ;
1616+ } ,
1617+ 'doc.lists.setLevelAlignment' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1618+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-alignment-success' ) ;
1619+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-alignment' ) ;
1620+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1621+ return {
1622+ stateDir,
1623+ args : [
1624+ 'lists' ,
1625+ 'set-level-alignment' ,
1626+ docPath ,
1627+ '--input-json' ,
1628+ JSON . stringify ( { target, level : 0 , alignment : 'center' } ) ,
1629+ '--out' ,
1630+ harness . createOutputPath ( 'doc-lists-set-level-alignment-output' ) ,
1631+ ] ,
1632+ } ;
1633+ } ,
1634+ 'doc.lists.setLevelIndents' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1635+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-indents-success' ) ;
1636+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-indents' ) ;
1637+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1638+ return {
1639+ stateDir,
1640+ args : [
1641+ 'lists' ,
1642+ 'set-level-indents' ,
1643+ docPath ,
1644+ '--input-json' ,
1645+ JSON . stringify ( { target, level : 0 , left : 1440 , hanging : 720 } ) ,
1646+ '--out' ,
1647+ harness . createOutputPath ( 'doc-lists-set-level-indents-output' ) ,
1648+ ] ,
1649+ } ;
1650+ } ,
1651+ 'doc.lists.setLevelTrailingCharacter' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1652+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-trailing-character-success' ) ;
1653+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-trailing-character' ) ;
1654+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1655+ return {
1656+ stateDir,
1657+ args : [
1658+ 'lists' ,
1659+ 'set-level-trailing-character' ,
1660+ docPath ,
1661+ '--input-json' ,
1662+ JSON . stringify ( { target, level : 0 , trailingCharacter : 'tab' } ) ,
1663+ '--out' ,
1664+ harness . createOutputPath ( 'doc-lists-set-level-trailing-character-output' ) ,
1665+ ] ,
1666+ } ;
1667+ } ,
1668+ 'doc.lists.setLevelMarkerFont' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1669+ const stateDir = await harness . createStateDir ( 'doc-lists-set-level-marker-font-success' ) ;
1670+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-set-level-marker-font' ) ;
1671+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1672+ return {
1673+ stateDir,
1674+ args : [
1675+ 'lists' ,
1676+ 'set-level-marker-font' ,
1677+ docPath ,
1678+ '--input-json' ,
1679+ JSON . stringify ( { target, level : 0 , fontFamily : 'Arial' } ) ,
1680+ '--out' ,
1681+ harness . createOutputPath ( 'doc-lists-set-level-marker-font-output' ) ,
1682+ ] ,
1683+ } ;
1684+ } ,
1685+ 'doc.lists.clearLevelOverrides' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
1686+ const stateDir = await harness . createStateDir ( 'doc-lists-clear-level-overrides-success' ) ;
1687+ const docPath = await harness . copyListFixtureDoc ( 'doc-lists-clear-level-overrides' ) ;
1688+ const target = await harness . firstListItemAddress ( docPath , stateDir ) ;
1689+ return {
1690+ stateDir,
1691+ args : [
1692+ 'lists' ,
1693+ 'clear-level-overrides' ,
1694+ docPath ,
1695+ '--input-json' ,
1696+ JSON . stringify ( { target, level : 0 } ) ,
1697+ '--out' ,
1698+ harness . createOutputPath ( 'doc-lists-clear-level-overrides-output' ) ,
1699+ ] ,
1700+ } ;
1701+ } ,
15191702 'doc.insert' : async ( harness : ConformanceHarness ) : Promise < ScenarioInvocation > => {
15201703 const stateDir = await harness . createStateDir ( 'doc-insert-success' ) ;
15211704 const docPath = await harness . copyFixtureDoc ( 'doc-insert' ) ;
@@ -2327,6 +2510,9 @@ const RUNTIME_CONFORMANCE_SKIP = new Set<CliOperationId>([
23272510 // which the CLI test harness fixture does not populate.
23282511 'doc.tables.setDefaultStyle' ,
23292512 'doc.tables.clearDefaultStyle' ,
2513+ // clearLevelOverrides requires an instance-level override to exist on the fixture list,
2514+ // which the generic list fixture does not have.
2515+ 'doc.lists.clearLevelOverrides' ,
23302516] ) ;
23312517
23322518export const OPERATION_SCENARIOS = ( Object . keys ( SUCCESS_SCENARIOS ) as CliOperationId [ ] ) . map ( ( operationId ) => {
0 commit comments