@@ -113,6 +113,8 @@ describe('Rewrite URLs test', () => {
113
113
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx.live/media_1234.png' ) , './media_1234.png' ) ;
114
114
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx.page/media_1234.png' ) , './media_1234.png' ) ;
115
115
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx3.page/media_1234.png' ) , './media_1234.png' ) ;
116
+ assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.aem.page/media_1234.png' ) , './media_1234.png' ) ;
117
+ assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.aem.live/media_1234.png' ) , './media_1234.png' ) ;
116
118
} ) ;
117
119
118
120
it ( 'replaces an helix url' , ( ) => {
@@ -133,15 +135,18 @@ describe('Rewrite URLs test', () => {
133
135
} ) ;
134
136
135
137
it ( 'replaces an helix url with fragments' , ( ) => {
138
+ assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.aem.page/blog/article#heading' ) , '/blog/article#heading' ) ;
136
139
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx.page/blog/article#heading' ) , '/blog/article#heading' ) ;
137
140
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx.live/blog/article#heading' ) , '/blog/article#heading' ) ;
141
+ assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.aem.live/blog/article#heading' ) , '/blog/article#heading' ) ;
138
142
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx3.page/blog/article#heading' ) , '/blog/article#heading' ) ;
139
143
assert . strictEqual ( rewriteUrl ( { } , 'https://main--pages--adobe.hlx3.page/blog/article?a=42#heading' ) , '/blog/article?a=42#heading' ) ;
140
144
assert . strictEqual ( rewriteUrl ( { } , 'https://mwpw-118214--express-website--adobe.hlx.page/express/experiments/ccx0074/test#how-to-make-flyers' ) , '/express/experiments/ccx0074/test#how-to-make-flyers' ) ;
141
145
} ) ;
142
146
143
147
it ( 'keeps helix urls for www and admin in place' , ( ) => {
144
148
assert . strictEqual ( rewriteUrl ( { } , 'https://www.hlx.page/docs' ) , 'https://www.hlx.page/docs' ) ;
149
+ assert . strictEqual ( rewriteUrl ( { } , 'https://www.aem.live/docs' ) , 'https://www.aem.live/docs' ) ;
145
150
assert . strictEqual ( rewriteUrl ( { } , 'https://admin.hlx.live/api' ) , 'https://admin.hlx.live/api' ) ;
146
151
} ) ;
147
152
0 commit comments