@@ -2706,6 +2706,23 @@ const runUpdateLinks = () => {
27062706 fileName : "authoring/links2.xml" ,
27072707 } ;
27082708
2709+ const UPDATE_LINKS_ONE_NESTED_ABS : ContentUpdate = {
2710+ contentChangeType : ContentChangeType . update ,
2711+ id : "43778049" ,
2712+ version : null ,
2713+ title : "Links2" ,
2714+ type : "page" ,
2715+ status : "current" ,
2716+ ancestors : [ { id : "42336414" } ] ,
2717+ body : {
2718+ storage : {
2719+ value : `<a href='/release-planning.qmd'>Release Planning</a>` ,
2720+ representation : "storage" ,
2721+ } ,
2722+ } ,
2723+ fileName : "authoring/links2.xml" ,
2724+ } ;
2725+
27092726 const UPDATE_LINKS_ONE_ANCHOR : ContentUpdate = {
27102727 contentChangeType : ContentChangeType . update ,
27112728 id : "19890228" ,
@@ -2751,7 +2768,7 @@ const runUpdateLinks = () => {
27512768 ) => {
27522769 const result = updateLinks ( fileMetadataTable , changes , server , parent ) ;
27532770 console . log ( "result" , result ) ;
2754- // assertEquals(expected, result);
2771+ assertEquals ( expected , result ) ;
27552772 } ;
27562773
27572774 test ( suiteLabel ( "no_files" ) , async ( ) => {
@@ -2800,7 +2817,7 @@ const runUpdateLinks = () => {
28002817 check ( expected , changes , fileMetadataTable ) ;
28012818 } ) ;
28022819
2803- otest ( suiteLabel ( "one_update_link_nested_relative" ) , async ( ) => {
2820+ test ( suiteLabel ( "one_update_link_nested_relative" ) , async ( ) => {
28042821 const changes : ConfluenceSpaceChange [ ] = [ UPDATE_LINKS_ONE_NESTED ] ;
28052822 const rootURL = "fake-server/wiki/spaces/QUARTOCONF/pages" ;
28062823 const expectedUpdate : ContentUpdate = {
@@ -2816,6 +2833,22 @@ const runUpdateLinks = () => {
28162833 check ( expected , changes , fileMetadataTable ) ;
28172834 } ) ;
28182835
2836+ otest ( suiteLabel ( "one_update_link_nested_absolute" ) , async ( ) => {
2837+ const changes : ConfluenceSpaceChange [ ] = [ UPDATE_LINKS_ONE_NESTED_ABS ] ;
2838+ const rootURL = "fake-server/wiki/spaces/QUARTOCONF/pages" ;
2839+ const expectedUpdate : ContentUpdate = {
2840+ ...UPDATE_LINKS_ONE_NESTED_ABS ,
2841+ body : {
2842+ storage : {
2843+ value : `<a href=\'fake-server/wiki/spaces/QUARTOCONF/pages/19890228/Release%20Planning\'>Release Planning</a>` ,
2844+ representation : "storage" ,
2845+ } ,
2846+ } ,
2847+ } ;
2848+ const expected : ConfluenceSpaceChange [ ] = [ expectedUpdate ] ;
2849+ check ( expected , changes , fileMetadataTable ) ;
2850+ } ) ;
2851+
28192852 test ( suiteLabel ( "one_update_link_anchor" ) , async ( ) => {
28202853 const changes : ConfluenceSpaceChange [ ] = [ UPDATE_LINKS_ONE_ANCHOR ] ;
28212854 const rootURL = "fake-server/wiki/spaces/QUARTOCONF/pages" ;
0 commit comments