@designcrowd/library.brand-page 5.14.8-flacky-nav-21 → 5.14.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/lib/src/{CreatedOnBrandCrowd-de-de-C7UP0wnU.js → CreatedOnBrandCrowd-de-de-CiXGpUsj.js} +1 -1
  2. package/lib/src/{CreatedOnBrandCrowd-en-us-Dn7kLByA.js → CreatedOnBrandCrowd-en-us-BjBeAHIJ.js} +1 -1
  3. package/lib/src/{CreatedOnBrandCrowd-es-es-BniaWIta.js → CreatedOnBrandCrowd-es-es-COz-dVj5.js} +1 -1
  4. package/lib/src/{CreatedOnBrandCrowd-fr-fr-L19SCOKe.js → CreatedOnBrandCrowd-fr-fr-DdRo8IoH.js} +1 -1
  5. package/lib/src/{CreatedOnBrandCrowd-pt-pt-yF1hS_QN.js → CreatedOnBrandCrowd-pt-pt-YPxQ1gbj.js} +1 -1
  6. package/lib/src/{CreatedOnDcom-de-de-COoIYzR_.js → CreatedOnDcom-de-de-DeUP5Ur5.js} +1 -1
  7. package/lib/src/{CreatedOnDcom-en-us-DPxw4zug.js → CreatedOnDcom-en-us-BjaQwhMw.js} +1 -1
  8. package/lib/src/{CreatedOnDcom-es-es-B6sdWmmP.js → CreatedOnDcom-es-es-CYexVJc5.js} +1 -1
  9. package/lib/src/{CreatedOnDcom-fr-fr-C_P7GYue.js → CreatedOnDcom-fr-fr-BktbLTrT.js} +1 -1
  10. package/lib/src/{CreatedOnDcom-pt-pt-QAdIC2fu.js → CreatedOnDcom-pt-pt-HnEwifku.js} +1 -1
  11. package/lib/src/brand-page/constants/logo.constants.d.ts +0 -1
  12. package/lib/src/brand-page/constants/logo.constants.js +0 -2
  13. package/lib/src/brand-page/constants/styles.constants.d.ts +2 -2
  14. package/lib/src/brand-page/constants/styles.constants.js +2 -2
  15. package/lib/src/brand-page/utils/migration/migration-01.d.ts +2 -3
  16. package/lib/src/brand-page/utils/migration/migration-01.js +2 -3
  17. package/lib/src/brand-page/utils/migration/migration-01_1.d.ts +3 -4
  18. package/lib/src/brand-page/utils/migration/migration-01_1.js +2 -3
  19. package/lib/src/brand-page/utils/migration/migration-02.d.ts +3 -4
  20. package/lib/src/brand-page/utils/migration/migration-02.js +2 -3
  21. package/lib/src/brand-page/utils/migration/migration-03.d.ts +3 -4
  22. package/lib/src/brand-page/utils/migration/migration-03.js +2 -3
  23. package/lib/src/brand-page/utils/migration/migration-04.d.ts +3 -4
  24. package/lib/src/brand-page/utils/migration/migration-04.js +2 -3
  25. package/lib/src/brand-page/utils/migration/migration-05.d.ts +2 -6
  26. package/lib/src/brand-page/utils/migration/migration-05.js +2 -3
  27. package/lib/src/brand-page/utils/migration/migration-05_1.d.ts +3 -3
  28. package/lib/src/brand-page/utils/migration/migration-05_1.js +3 -3
  29. package/lib/src/brand-page/utils/migration/migration-05_2.d.ts +3 -3
  30. package/lib/src/brand-page/utils/migration/migration-05_2.js +2 -3
  31. package/lib/src/brand-page/utils/migration.util.d.ts +1 -6
  32. package/lib/src/brand-page/utils/migration.util.js +6 -16
  33. package/lib/src/brand-page/utils/view-model.util.d.ts +4 -6
  34. package/lib/src/brand-page/utils/view-model.util.js +13 -14
  35. package/lib/src/brand-page/view-models.d.ts +0 -1
  36. package/lib/src/brand-page-maker/components/action-bar/ActionBar.mixin.d.ts +1 -1
  37. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.mixin.d.ts +1 -1
  38. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.d.ts +0 -1
  39. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.js +2 -48
  40. package/lib/src/brand-page-maker/components/brand-page-maker/BrandPageMakerTemplateSettings.mixin.d.ts +1 -1
  41. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.d.ts +0 -1122
  42. package/lib/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.js +0 -1058
  43. package/lib/src/brand-page-maker/components/brandpage-maker-page/BrandPageMakerPage.mixin.d.ts +1 -1
  44. package/lib/src/brand-page-maker/components/brandpage-settings/ReplaceImageSettingsForBrandPageSettings.mixin.d.ts +1 -1
  45. package/lib/src/brand-page-maker/components/google-analytics/GoogleAnalytics.mixin.d.ts +1 -1
  46. package/lib/src/brand-page-maker/components/seo-settings/SeoPageSettings.mixin.d.ts +1 -1
  47. package/lib/src/brand-page-maker/components/seo-settings/UrlSettings.mixin.d.ts +1 -1
  48. package/lib/src/brand-page-maker/components/social-share/SocialShare.mixin.d.ts +1 -1
  49. package/lib/src/brand-page-maker/components/template-preview/TemplatePreview.mixin.d.ts +1 -1
  50. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.d.ts +1 -2
  51. package/lib/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.js +2 -3
  52. package/lib/src/css/library.brand-page-brandCrowd.min.css +6 -3
  53. package/lib/src/css/library.brand-page-brandPage.min.css +6 -3
  54. package/lib/src/css/library.brand-page-designCom.min.css +6 -3
  55. package/lib/src/css/library.brand-page-preview.min.css +6 -3
  56. package/lib/src/index.mjs +1 -1
  57. package/lib/src/{lib-BX6A4JdA.js → lib-BXmT_3as.js} +8015 -8149
  58. package/lib/src/shared/content-settings/components/content-settings/ContentSettings.mixin.d.ts +1 -1
  59. package/lib/src/shared/content-settings/components/content-settings/ReplaceImageSettingsForContent.mixin.d.ts +1 -1
  60. package/lib/src/shared/content-settings/components/content-settings-item/ContentSettingsItemField.mixin.d.ts +1 -1
  61. package/lib/src/shared/logo-settings/components/LogoSettings.mixin.d.ts +1 -1
  62. package/lib/src/shared/page-settings/components/page-settings/PageSettings.mixin.d.ts +1 -1
  63. package/lib/src/shared/page-settings/components/page-settings-section-styles/PageSettingsSectionStyles.mixin.d.ts +1 -1
  64. package/lib/src/shared/page-settings/store/page-settings-store.js +1 -1
  65. package/lib/src/shared/publish-brand-page-with-state/PublishBrandPageModalWithState.mixin.d.ts +1 -1
  66. package/lib/src/shared/style-settings/components/StyleSettings.mixin.d.ts +1 -1
  67. package/lib/src/shared/template-settings/store/template-settings-store.js +1 -2
  68. package/package.json +1 -1
  69. package/src/brand-page/components/logo/Logo.vue +1 -24
  70. package/src/brand-page/components/logo/LogoRender.vue +20 -56
  71. package/src/brand-page/constants/logo.constants.ts +0 -3
  72. package/src/brand-page/constants/styles.constants.ts +2 -2
  73. package/src/brand-page/utils/__snapshots__/migration.util.test.ts.snap +1112 -1121
  74. package/src/brand-page/utils/__snapshots__/migration2.util.test.ts.snap +413 -416
  75. package/src/brand-page/utils/migration/logo/migration.util.logo.test.ts +3 -3
  76. package/src/brand-page/utils/migration/migration-01.ts +4 -7
  77. package/src/brand-page/utils/migration/migration-01_1.ts +3 -6
  78. package/src/brand-page/utils/migration/migration-02.ts +4 -7
  79. package/src/brand-page/utils/migration/migration-03.ts +4 -7
  80. package/src/brand-page/utils/migration/migration-04.ts +4 -7
  81. package/src/brand-page/utils/migration/migration-05.ts +3 -16
  82. package/src/brand-page/utils/migration/migration-05_1.ts +4 -6
  83. package/src/brand-page/utils/migration/migration-05_2.ts +3 -6
  84. package/src/brand-page/utils/migration.util.test.ts +157 -274
  85. package/src/brand-page/utils/migration.util.ts +9 -26
  86. package/src/brand-page/utils/migration2.util.test.ts +2 -7
  87. package/src/brand-page/utils/view-model.util.ts +7 -26
  88. package/src/brand-page/view-models.ts +0 -1
  89. package/src/brand-page-maker/components/brand-page-maker/BrandPageMaker.stories.ts +1 -52
  90. package/src/brand-page-maker/components/brand-page-maker/__fixtures__/brand-page-examples.ts +0 -1090
  91. package/src/brand-page-maker/stores/brandpage-maker/brandpage-maker-store.ts +1 -4
  92. package/src/shared/page-settings/store/page-settings-store.ts +0 -1
  93. package/src/shared/template-settings/store/template-settings-store.ts +1 -2
  94. package/lib/src/brand-page/utils/migration/migration-06.d.ts +0 -4
  95. package/lib/src/brand-page/utils/migration/migration-06.js +0 -60
  96. package/src/brand-page/utils/migration/migration-06.test.ts +0 -384
  97. package/src/brand-page/utils/migration/migration-06.ts +0 -108
@@ -879,7 +879,7 @@ describe('migration.util', () => {
879
879
  } as any;
880
880
  };
881
881
 
882
- test('migrateBrandPageModel should return brand page model with migrated textItems if missing for brand site', async () => {
882
+ test('migrateBrandPageModel should return brand page model with migrated textItems if missing for brand site', () => {
883
883
  // Arrange
884
884
  const oldTemplate: BrandPageData = {
885
885
  pages: [
@@ -916,22 +916,20 @@ describe('migration.util', () => {
916
916
  } as any;
917
917
 
918
918
  // Act
919
- const model = await migrateBrandPageModel(new BrandPageModel(oldTemplate), {
919
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
920
920
  isUserDraft: false,
921
- isServerRender: false,
922
921
  });
923
922
 
924
923
  // Assert
925
924
  expect(model).toMatchSnapshot();
926
925
 
927
- const textItems = (model.brandPageModel.pages[0].contents[0] as TextContent)
928
- .textItems;
926
+ const textItems = (model.pages[0].contents[0] as TextContent).textItems;
929
927
 
930
928
  expect(textItems).not.toBeNull();
931
929
  expect(textItems![0].textStyle).not.toBeNull();
932
930
  });
933
931
 
934
- test('migrateBrandPageModel should return brand page model with default textstyle object if textItem has missing textStyle object for brand site', async () => {
932
+ test('migrateBrandPageModel should return brand page model with default textstyle object if textItem has missing textStyle object for brand site', () => {
935
933
  // Arrange
936
934
  const oldTemplate: BrandPageModel = {
937
935
  pages: [
@@ -973,16 +971,14 @@ describe('migration.util', () => {
973
971
  } as any;
974
972
 
975
973
  // Act
976
- const model = await migrateBrandPageModel(new BrandPageModel(oldTemplate), {
974
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
977
975
  isUserDraft: false,
978
- isServerRender: false,
979
976
  });
980
977
 
981
978
  // Assert
982
979
  expect(model).toMatchSnapshot();
983
980
 
984
- const textItems = (model.brandPageModel.pages[0].contents[0] as TextContent)
985
- .textItems;
981
+ const textItems = (model.pages[0].contents[0] as TextContent).textItems;
986
982
 
987
983
  expect(textItems).not.toBeNull();
988
984
  expect(textItems![0].textStyle).not.toBeNull();
@@ -990,30 +986,26 @@ describe('migration.util', () => {
990
986
 
991
987
  describe('Brandpage Models', () => {
992
988
  describe('Button Contents', () => {
993
- test('migrateBrandPageModel should return missing text styles', async () => {
989
+ test('migrateBrandPageModel should return missing text styles', () => {
994
990
  // Act
995
- const model = await migrateBrandPageModel(getBrandPageTypeModel(), {
991
+ const model = migrateBrandPageModel(getBrandPageTypeModel(), {
996
992
  isUserDraft: false,
997
- isServerRender: false,
998
993
  });
999
994
 
1000
- const content = model.brandPageModel.pages[0]
1001
- .contents[1] as ButtonWithModalContent;
995
+ const content = model.pages[0].contents[1] as ButtonWithModalContent;
1002
996
 
1003
997
  expect(content.titleStyle.fontFamily).toBe('Lato');
1004
998
  expect(content.titleStyle.lineHeight).toBe('1.5');
1005
999
  });
1006
1000
  });
1007
1001
  describe('Profile Contents', () => {
1008
- test('migrateBrandPageModel should return missing text styles', async () => {
1002
+ test('migrateBrandPageModel should return missing text styles', () => {
1009
1003
  // Act
1010
- const model = await migrateBrandPageModel(getBrandPageTypeModel(), {
1004
+ const model = migrateBrandPageModel(getBrandPageTypeModel(), {
1011
1005
  isUserDraft: false,
1012
- isServerRender: false,
1013
1006
  });
1014
1007
 
1015
- const content = model.brandPageModel.pages[0]
1016
- .contents[1] as ProfileContent;
1008
+ const content = model.pages[0].contents[1] as ProfileContent;
1017
1009
 
1018
1010
  expect(content.titleStyle.fontFamily).toBe('Lato');
1019
1011
  expect(content.titleStyle.lineHeight).toBe('1.5');
@@ -1022,15 +1014,13 @@ describe('migration.util', () => {
1022
1014
  });
1023
1015
 
1024
1016
  describe('Banner Contents - text Align and Font Family should not be empty', () => {
1025
- test('migrateBrandPageModel should return banner contents with text style to have textAlign and FontFamily if its missing', async () => {
1017
+ test('migrateBrandPageModel should return banner contents with text style to have textAlign and FontFamily if its missing', () => {
1026
1018
  // Act
1027
- const model = await migrateBrandPageModel(getBsModel(), {
1019
+ const model = migrateBrandPageModel(getBsModel(), {
1028
1020
  isUserDraft: false,
1029
- isServerRender: false,
1030
1021
  });
1031
1022
 
1032
- const bannerContent = model.brandPageModel.pages[0]
1033
- .contents[0] as BannerSectionContent;
1023
+ const bannerContent = model.pages[0].contents[0] as BannerSectionContent;
1034
1024
 
1035
1025
  expect(bannerContent.titleStyle.textAlign).toBe('center');
1036
1026
  expect(bannerContent.descriptionStyle.textAlign).toBe('center');
@@ -1043,7 +1033,7 @@ describe('migration.util', () => {
1043
1033
  expect(bannerContent.buttonTextStyle.lineHeight).toBe(LINE_HEIGHT_BODY);
1044
1034
  });
1045
1035
 
1046
- test('migrateBannerContentToRawImageUrl should return banner images url without q and w parameter when given a model with unsplash image url', async () => {
1036
+ test('migrateBannerContentToRawImageUrl should return banner images url without q and w parameter when given a model with unsplash image url', () => {
1047
1037
  // Arrange
1048
1038
  const oldTemplate: BrandPageModel = {
1049
1039
  pages: [
@@ -1098,19 +1088,14 @@ describe('migration.util', () => {
1098
1088
  } as any;
1099
1089
 
1100
1090
  // Act
1101
- const model = await migrateBrandPageModel(
1102
- new BrandPageModel(oldTemplate),
1103
- {
1104
- isUserDraft: false,
1105
- isServerRender: false,
1106
- },
1107
- );
1091
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1092
+ isUserDraft: false,
1093
+ });
1108
1094
 
1109
1095
  // Assert
1110
1096
  expect(model).toMatchSnapshot();
1111
1097
 
1112
- const bannerContent = model.brandPageModel.pages[0]
1113
- .contents[0] as BannerSectionContent;
1098
+ const bannerContent = model.pages[0].contents[0] as BannerSectionContent;
1114
1099
 
1115
1100
  const url = new URL(bannerContent.imageUrl);
1116
1101
 
@@ -1118,29 +1103,25 @@ describe('migration.util', () => {
1118
1103
  expect(url.searchParams.has('w')).toBe(false);
1119
1104
  });
1120
1105
 
1121
- test('migrateBrandPageModel should return banner contents with text style to have textAlign based on display style', async () => {
1122
- const model = await migrateBrandPageModel(getBsModel(), {
1106
+ test('migrateBrandPageModel should return banner contents with text style to have textAlign based on display style', () => {
1107
+ const model = migrateBrandPageModel(getBsModel(), {
1123
1108
  isUserDraft: false,
1124
- isServerRender: false,
1125
1109
  });
1126
1110
 
1127
- const bannerContent = model.brandPageModel.pages[0]
1128
- .contents[3] as BannerSectionContent;
1111
+ const bannerContent = model.pages[0].contents[3] as BannerSectionContent;
1129
1112
 
1130
1113
  expect(bannerContent.titleStyle.textAlign).toBe('left');
1131
1114
  expect(bannerContent.descriptionStyle.textAlign).toBe('left');
1132
1115
  expect(bannerContent.buttonTextStyle.textAlign).toBe('left');
1133
1116
  });
1134
1117
 
1135
- test('migrateBrandPageModel should return text style with textAlign and FontFamily for newly added Banner Content', async () => {
1118
+ test('migrateBrandPageModel should return text style with textAlign and FontFamily for newly added Banner Content', () => {
1136
1119
  // Act
1137
- const model = await migrateBrandPageModel(getBsModel(), {
1120
+ const model = migrateBrandPageModel(getBsModel(), {
1138
1121
  isUserDraft: false,
1139
- isServerRender: false,
1140
1122
  });
1141
1123
 
1142
- const bannerContent = model.brandPageModel.pages[1]
1143
- .contents[0] as BannerSectionContent;
1124
+ const bannerContent = model.pages[1].contents[0] as BannerSectionContent;
1144
1125
 
1145
1126
  expect(bannerContent.titleStyle.textAlign).toBe('center');
1146
1127
  expect(bannerContent.descriptionStyle.textAlign).toBe('center');
@@ -1150,15 +1131,13 @@ describe('migration.util', () => {
1150
1131
  expect(bannerContent.buttonTextStyle.fontFamily).toBe('Lato');
1151
1132
  });
1152
1133
 
1153
- test('migrateBrandPageModel should not change existing alignments for existing contents for banner contents', async () => {
1134
+ test('migrateBrandPageModel should not change existing alignments for existing contents for banner contents', () => {
1154
1135
  // Act
1155
- const model = await migrateBrandPageModel(getBsModel(), {
1136
+ const model = migrateBrandPageModel(getBsModel(), {
1156
1137
  isUserDraft: false,
1157
- isServerRender: false,
1158
1138
  });
1159
1139
 
1160
- const bannerContent = model.brandPageModel.pages[1]
1161
- .contents[1] as BannerSectionContent;
1140
+ const bannerContent = model.pages[1].contents[1] as BannerSectionContent;
1162
1141
 
1163
1142
  expect(bannerContent.titleStyle.textAlign).toBe('right');
1164
1143
  expect(bannerContent.descriptionStyle.textAlign).toBe('left');
@@ -1168,29 +1147,21 @@ describe('migration.util', () => {
1168
1147
  expect(bannerContent.buttonTextStyle.fontFamily).toBe('Lato');
1169
1148
  });
1170
1149
 
1171
- test('migrateBrandPageModel should convert lineheight rem to unitless', async () => {
1150
+ test('migrateBrandPageModel should convert lineheight rem to unitless', () => {
1172
1151
  // Act
1173
- const model = await migrateBrandPageModel(getBsModel(), {
1174
- isUserDraft: false,
1175
- isServerRender: false,
1176
- });
1152
+ const model = migrateBrandPageModel(getBsModel(), { isUserDraft: false });
1177
1153
 
1178
- const bannerContent = model.brandPageModel.pages[0]
1179
- .contents[0] as BannerSectionContent;
1154
+ const bannerContent = model.pages[0].contents[0] as BannerSectionContent;
1180
1155
 
1181
1156
  expect(bannerContent.titleStyle.lineHeight).toBe(LINE_HEIGHT_TITLE);
1182
1157
  expect(bannerContent.descriptionStyle.lineHeight).toBe(LINE_HEIGHT_BODY);
1183
1158
  expect(bannerContent.buttonTextStyle.lineHeight).toBe(LINE_HEIGHT_BODY);
1184
1159
  });
1185
- test('migrateBrandPageModel should not replace lineheight if theres existing', async () => {
1160
+ test('migrateBrandPageModel should not replace lineheight if theres existing', () => {
1186
1161
  // Act
1187
- const model = await migrateBrandPageModel(getBsModel(), {
1188
- isUserDraft: false,
1189
- isServerRender: false,
1190
- });
1162
+ const model = migrateBrandPageModel(getBsModel(), { isUserDraft: false });
1191
1163
 
1192
- const bannerContent = model.brandPageModel.pages[1]
1193
- .contents[1] as BannerSectionContent;
1164
+ const bannerContent = model.pages[1].contents[1] as BannerSectionContent;
1194
1165
 
1195
1166
  expect(bannerContent.titleStyle.lineHeight).toBe('1.6');
1196
1167
  expect(bannerContent.descriptionStyle.lineHeight).toBe('1.2');
@@ -1199,14 +1170,13 @@ describe('migration.util', () => {
1199
1170
  });
1200
1171
 
1201
1172
  describe('Testimonial Contents - text Align and Font Family should not be empty', () => {
1202
- test('migrateBrandPageModel should return testimonial contents with text style that are not assigned to have textAlign and FontFamily', async () => {
1173
+ test('migrateBrandPageModel should return testimonial contents with text style that are not assigned to have textAlign and FontFamily', () => {
1203
1174
  // Act
1204
- const model = await migrateBrandPageModel(getBsModel(), {
1175
+ const model = migrateBrandPageModel(getBsModel(), {
1205
1176
  isUserDraft: false,
1206
- isServerRender: false,
1207
1177
  });
1208
1178
 
1209
- const testimonialContent = model.brandPageModel.pages[0]
1179
+ const testimonialContent = model.pages[0]
1210
1180
  .contents[1] as TestimonialSectionContent;
1211
1181
 
1212
1182
  expect(testimonialContent.titleStyle.textAlign).toBe('center');
@@ -1218,15 +1188,14 @@ describe('migration.util', () => {
1218
1188
  expect(testimonialContent.nameStyle.fontFamily).toBe('Lato');
1219
1189
  expect(testimonialContent.positionStyle.fontFamily).toBe('Lato');
1220
1190
  });
1221
- test('migrateBrandPageModel should return testimonial contents with text style to have textAlign and FontFamily - column displayStyle', async () => {
1191
+ test('migrateBrandPageModel should return testimonial contents with text style to have textAlign and FontFamily - column displayStyle', () => {
1222
1192
  // Act
1223
1193
 
1224
- const model = await migrateBrandPageModel(getBsModel(), {
1194
+ const model = migrateBrandPageModel(getBsModel(), {
1225
1195
  isUserDraft: false,
1226
- isServerRender: false,
1227
1196
  });
1228
1197
 
1229
- const testimonialContent = model.brandPageModel.pages[1]
1198
+ const testimonialContent = model.pages[1]
1230
1199
  .contents[3] as TestimonialSectionContent;
1231
1200
 
1232
1201
  expect(testimonialContent.titleStyle.textAlign).toBe('center');
@@ -1238,14 +1207,13 @@ describe('migration.util', () => {
1238
1207
  expect(testimonialContent.nameStyle.fontFamily).toBe('Lato');
1239
1208
  expect(testimonialContent.positionStyle.fontFamily).toBe('Lato');
1240
1209
  });
1241
- test('migrateBrandPageModel should not change existing alignments for existing contents for testimonial contents', async () => {
1210
+ test('migrateBrandPageModel should not change existing alignments for existing contents for testimonial contents', () => {
1242
1211
  // Act
1243
- const model = await migrateBrandPageModel(getBsModel(), {
1212
+ const model = migrateBrandPageModel(getBsModel(), {
1244
1213
  isUserDraft: false,
1245
- isServerRender: false,
1246
1214
  });
1247
1215
 
1248
- const testimonialContent = model.brandPageModel.pages[1]
1216
+ const testimonialContent = model.pages[1]
1249
1217
  .contents[4] as TestimonialSectionContent;
1250
1218
 
1251
1219
  expect(testimonialContent.titleStyle.textAlign).toBe('right');
@@ -1259,60 +1227,52 @@ describe('migration.util', () => {
1259
1227
  });
1260
1228
  });
1261
1229
  describe('About Contents - text Align and Font Family should not be empty', () => {
1262
- test('migrateBrandPageModel should return About contents with text style to have textAlign and FontFamily', async () => {
1230
+ test('migrateBrandPageModel should return About contents with text style to have textAlign and FontFamily', () => {
1263
1231
  // Act
1264
- const model = await migrateBrandPageModel(getBsModel(), {
1232
+ const model = migrateBrandPageModel(getBsModel(), {
1265
1233
  isUserDraft: false,
1266
- isServerRender: false,
1267
1234
  });
1268
1235
 
1269
- const aboutContents = model.brandPageModel.pages[0]
1270
- .contents[2] as AboutSectionContent;
1236
+ const aboutContents = model.pages[0].contents[2] as AboutSectionContent;
1271
1237
 
1272
1238
  expect(aboutContents.titleStyle.textAlign).toBe('center');
1273
1239
  expect(aboutContents.paragraphStyle.textAlign).toBe('center');
1274
1240
  expect(aboutContents.titleStyle.fontFamily).toBe('Lato');
1275
1241
  expect(aboutContents.paragraphStyle.fontFamily).toBe('Lato');
1276
1242
  });
1277
- test('migrateBrandPageModel should return Newly Added About contents with text style to have textAlign and FontFamily', async () => {
1243
+ test('migrateBrandPageModel should return Newly Added About contents with text style to have textAlign and FontFamily', () => {
1278
1244
  // Act
1279
- const model = await migrateBrandPageModel(getBsModel(), {
1245
+ const model = migrateBrandPageModel(getBsModel(), {
1280
1246
  isUserDraft: false,
1281
- isServerRender: false,
1282
1247
  });
1283
1248
 
1284
- const aboutContents = model.brandPageModel.pages[2]
1285
- .contents[0] as AboutSectionContent;
1249
+ const aboutContents = model.pages[2].contents[0] as AboutSectionContent;
1286
1250
 
1287
1251
  expect(aboutContents.titleStyle.textAlign).toBe('center');
1288
1252
  expect(aboutContents.paragraphStyle.textAlign).toBe('center');
1289
1253
  expect(aboutContents.titleStyle.fontFamily).toBe('Lato');
1290
1254
  expect(aboutContents.paragraphStyle.fontFamily).toBe('Lato');
1291
1255
  });
1292
- test('migrateBrandPageModel should return text Align and Font family with the correct alignment based on display style', async () => {
1256
+ test('migrateBrandPageModel should return text Align and Font family with the correct alignment based on display style', () => {
1293
1257
  // Act
1294
- const model = await migrateBrandPageModel(getBsModel(), {
1258
+ const model = migrateBrandPageModel(getBsModel(), {
1295
1259
  isUserDraft: false,
1296
- isServerRender: false,
1297
1260
  });
1298
1261
 
1299
- const aboutContents = model.brandPageModel.pages[2]
1300
- .contents[1] as AboutSectionContent;
1262
+ const aboutContents = model.pages[2].contents[1] as AboutSectionContent;
1301
1263
 
1302
1264
  expect(aboutContents.titleStyle.textAlign).toBe('left');
1303
1265
  expect(aboutContents.paragraphStyle.textAlign).toBe('left');
1304
1266
  expect(aboutContents.titleStyle.fontFamily).toBe('Lato');
1305
1267
  expect(aboutContents.paragraphStyle.fontFamily).toBe('Lato');
1306
1268
  });
1307
- test('migrateBrandPageModel should not change text alignment of existing contents', async () => {
1269
+ test('migrateBrandPageModel should not change text alignment of existing contents', () => {
1308
1270
  // Act
1309
- const model = await migrateBrandPageModel(getBsModel(), {
1271
+ const model = migrateBrandPageModel(getBsModel(), {
1310
1272
  isUserDraft: false,
1311
- isServerRender: false,
1312
1273
  });
1313
1274
 
1314
- const aboutContents = model.brandPageModel.pages[2]
1315
- .contents[2] as AboutSectionContent;
1275
+ const aboutContents = model.pages[2].contents[2] as AboutSectionContent;
1316
1276
 
1317
1277
  expect(aboutContents.titleStyle.textAlign).toBe('left');
1318
1278
  expect(aboutContents.paragraphStyle.textAlign).toBe('right');
@@ -1321,14 +1281,13 @@ describe('migration.util', () => {
1321
1281
  });
1322
1282
  });
1323
1283
 
1324
- test('migrateBrandPageModel should return profile contents with text style to have textAlign and FontFamily', async () => {
1284
+ test('migrateBrandPageModel should return profile contents with text style to have textAlign and FontFamily', () => {
1325
1285
  // Act
1326
- const model = await migrateBrandPageModel(getBsModel(), {
1286
+ const model = migrateBrandPageModel(getBsModel(), {
1327
1287
  isUserDraft: false,
1328
- isServerRender: false,
1329
1288
  });
1330
1289
 
1331
- const content = model.brandPageModel.pages[0].contents[4] as ProfileContent;
1290
+ const content = model.pages[0].contents[4] as ProfileContent;
1332
1291
 
1333
1292
  expect(content.titleStyle.textAlign).toBe('center');
1334
1293
  expect(content.nameStyle.textAlign).toBe('center');
@@ -1338,15 +1297,13 @@ describe('migration.util', () => {
1338
1297
  expect(content.descriptionStyle.fontFamily).toBe('Lato');
1339
1298
  });
1340
1299
 
1341
- test('migrateBrandPageModel should return mailing list contents with text style to have textAlign and FontFamily', async () => {
1300
+ test('migrateBrandPageModel should return mailing list contents with text style to have textAlign and FontFamily', () => {
1342
1301
  // Act
1343
- const model = await migrateBrandPageModel(getBsModel(), {
1302
+ const model = migrateBrandPageModel(getBsModel(), {
1344
1303
  isUserDraft: false,
1345
- isServerRender: false,
1346
1304
  });
1347
1305
 
1348
- const content = model.brandPageModel.pages[0]
1349
- .contents[5] as MailingListContent;
1306
+ const content = model.pages[0].contents[5] as MailingListContent;
1350
1307
 
1351
1308
  expect(content.titleStyle.textAlign).toBe('center');
1352
1309
  expect(content.buttonTextStyle.textAlign).toBe('center');
@@ -1354,15 +1311,13 @@ describe('migration.util', () => {
1354
1311
  expect(content.buttonTextStyle.fontFamily).toBe('Lato');
1355
1312
  });
1356
1313
 
1357
- test('migrateBrandPageModel should return support me contents with text style to have textAlign and FontFamily', async () => {
1314
+ test('migrateBrandPageModel should return support me contents with text style to have textAlign and FontFamily', () => {
1358
1315
  // Act
1359
- const model = await migrateBrandPageModel(getBsModel(), {
1316
+ const model = migrateBrandPageModel(getBsModel(), {
1360
1317
  isUserDraft: false,
1361
- isServerRender: false,
1362
1318
  });
1363
1319
 
1364
- const content = model.brandPageModel.pages[0]
1365
- .contents[6] as SupportMeContent;
1320
+ const content = model.pages[0].contents[6] as SupportMeContent;
1366
1321
 
1367
1322
  expect(content.titleStyle.textAlign).toBe('center');
1368
1323
  expect(content.headingStyle.textAlign).toBe('center');
@@ -1376,15 +1331,13 @@ describe('migration.util', () => {
1376
1331
  expect(content.itemTextStyle.fontFamily).toBe('Lato');
1377
1332
  });
1378
1333
 
1379
- test('migrateBrandPageModel should return images contents with text style to have textAlign and FontFamily', async () => {
1334
+ test('migrateBrandPageModel should return images contents with text style to have textAlign and FontFamily', () => {
1380
1335
  // Act
1381
- const model = await migrateBrandPageModel(getBsModel(), {
1336
+ const model = migrateBrandPageModel(getBsModel(), {
1382
1337
  isUserDraft: false,
1383
- isServerRender: false,
1384
1338
  });
1385
1339
 
1386
- const content = model.brandPageModel.pages[0]
1387
- .contents[7] as ImagesSectionContent;
1340
+ const content = model.pages[0].contents[7] as ImagesSectionContent;
1388
1341
 
1389
1342
  expect(content.titleStyle.textAlign).toBe('center');
1390
1343
  expect(content.headingStyle.textAlign).toBe('center');
@@ -1394,72 +1347,62 @@ describe('migration.util', () => {
1394
1347
  expect(content.paragraphStyle.fontFamily).toBe('Lato');
1395
1348
  });
1396
1349
 
1397
- test('migrateBrandPageModel should return payment contents with text style to have textAlign and FontFamily', async () => {
1350
+ test('migrateBrandPageModel should return payment contents with text style to have textAlign and FontFamily', () => {
1398
1351
  // Act
1399
- const model = await migrateBrandPageModel(getBsModel(), {
1352
+ const model = migrateBrandPageModel(getBsModel(), {
1400
1353
  isUserDraft: false,
1401
- isServerRender: false,
1402
1354
  });
1403
1355
 
1404
- const content = model.brandPageModel.pages[0]
1405
- .contents[8] as RequestPaymentContent;
1356
+ const content = model.pages[0].contents[8] as RequestPaymentContent;
1406
1357
 
1407
1358
  expect(content.itemTextStyle.textAlign).toBe('left');
1408
1359
  expect(content.itemTextStyle.fontFamily).toBe('Lato');
1409
1360
  });
1410
1361
 
1411
- test('migrateBrandPageModel should return social links contents with text style to have textAlign and FontFamily', async () => {
1362
+ test('migrateBrandPageModel should return social links contents with text style to have textAlign and FontFamily', () => {
1412
1363
  // Act
1413
- const model = await migrateBrandPageModel(getBsModel(), {
1364
+ const model = migrateBrandPageModel(getBsModel(), {
1414
1365
  isUserDraft: false,
1415
- isServerRender: false,
1416
1366
  });
1417
1367
 
1418
- const content = model.brandPageModel.pages[0]
1419
- .contents[9] as SocialLinksContent;
1368
+ const content = model.pages[0].contents[9] as SocialLinksContent;
1420
1369
 
1421
1370
  expect(content.titleStyle.textAlign).toBe('center');
1422
1371
  expect(content.titleStyle.fontFamily).toBe('Lato');
1423
1372
  });
1424
1373
 
1425
1374
  describe('Contact Form Content - Layout style testing', () => {
1426
- test('migrateBrandPageModel should return empty layoutStyle for existing contact forms that dont have layoutStyle', async () => {
1375
+ test('migrateBrandPageModel should return empty layoutStyle for existing contact forms that dont have layoutStyle', () => {
1427
1376
  // Act
1428
- const model = await migrateBrandPageModel(getBsModel(), {
1377
+ const model = migrateBrandPageModel(getBsModel(), {
1429
1378
  isUserDraft: false,
1430
- isServerRender: false,
1431
1379
  });
1432
1380
 
1433
- const content = model.brandPageModel.pages[3]
1434
- .contents[0] as ContactFormContent;
1381
+ const content = model.pages[3].contents[0] as ContactFormContent;
1435
1382
 
1436
1383
  expect(content.layoutStyle).toBe('');
1437
1384
  });
1438
- test('migrateBrandPageModel should return empty layoutStyle for Brandpage only', async () => {
1385
+ test('migrateBrandPageModel should return empty layoutStyle for Brandpage only', () => {
1439
1386
  // Arrange
1440
1387
  const brandPageModel: BrandPageModel = {
1441
1388
  ...getBsModel(),
1442
1389
  brandPageType: BRAND_PAGE_TYPES.default,
1443
1390
  } as any;
1444
- const model = await migrateBrandPageModel(brandPageModel, {
1391
+ const model = migrateBrandPageModel(brandPageModel, {
1445
1392
  isUserDraft: false,
1446
- isServerRender: false,
1447
1393
  });
1448
1394
 
1449
- const content = model.brandPageModel.pages[3]
1450
- .contents[1] as ContactFormContent;
1395
+ const content = model.pages[3].contents[1] as ContactFormContent;
1451
1396
 
1452
1397
  expect(content.layoutStyle).toBe('');
1453
1398
  });
1454
1399
 
1455
- test('migrateBrandPageModel should not affect existing content blocks with layout style', async () => {
1456
- const model = await migrateBrandPageModel(getBsModel(), {
1400
+ test('migrateBrandPageModel should not affect existing content blocks with layout style', () => {
1401
+ const model = migrateBrandPageModel(getBsModel(), {
1457
1402
  isUserDraft: false,
1458
- isServerRender: false,
1459
1403
  });
1460
1404
 
1461
- const content = model.brandPageModel.pages[3]
1462
- .contents[1] as ContactFormContent;
1405
+ const content = model.pages[3].contents[1] as ContactFormContent;
1463
1406
 
1464
1407
  expect(content.layoutStyle).toBe(TEXT_ONLY);
1465
1408
  });
@@ -1533,14 +1476,11 @@ describe('migration.util', () => {
1533
1476
  });
1534
1477
  });
1535
1478
  describe('Global Styles - check text Styles', () => {
1536
- test('migrateBrandPageModel should set text styles to be defined', async () => {
1479
+ test('migrateBrandPageModel should set text styles to be defined', () => {
1537
1480
  // Act
1538
- const model = await migrateBrandPageModel(getBsModel(), {
1539
- isUserDraft: false,
1540
- isServerRender: false,
1541
- });
1481
+ const model = migrateBrandPageModel(getBsModel(), { isUserDraft: false });
1542
1482
 
1543
- const content = model.brandPageModel.styles.textStyles;
1483
+ const content = model.styles.textStyles;
1544
1484
 
1545
1485
  expect(content.textStyleOptions['titles'].style.lineHeight).toBe(
1546
1486
  LINE_HEIGHT_TITLE,
@@ -1603,14 +1543,11 @@ describe('migration.util', () => {
1603
1543
  undefined,
1604
1544
  );
1605
1545
  });
1606
- test('migrateBrandPageModel should convert rem lineheight to unitless', async () => {
1546
+ test('migrateBrandPageModel should convert rem lineheight to unitless', () => {
1607
1547
  // Act
1608
- const model = await migrateBrandPageModel(getBsModel(), {
1609
- isUserDraft: false,
1610
- isServerRender: false,
1611
- });
1548
+ const model = migrateBrandPageModel(getBsModel(), { isUserDraft: false });
1612
1549
 
1613
- const content = model.brandPageModel.styles.textStyles;
1550
+ const content = model.styles.textStyles;
1614
1551
 
1615
1552
  expect(content.textStyleOptions['buttons'].style.lineHeight).toBe(
1616
1553
  LINE_HEIGHT_BODY,
@@ -1627,7 +1564,7 @@ describe('migration.util', () => {
1627
1564
  const nonUserUrl =
1628
1565
  'https://images.unsplash.com/photo-1657664072470-99b02c2143f2.jpg';
1629
1566
 
1630
- test('should remove extension from faviconUrl and ogImageUrl', async () => {
1567
+ test('should remove extension from faviconUrl and ogImageUrl', () => {
1631
1568
  const oldTemplate: BrandPageModel = {
1632
1569
  faviconUrl: userUploadedUrl,
1633
1570
  ogImageUrl: userUploadedUrl,
@@ -1635,19 +1572,15 @@ describe('migration.util', () => {
1635
1572
  brandPageType: 'brandSite',
1636
1573
  } as any;
1637
1574
 
1638
- const model = await migrateBrandPageModel(
1639
- new BrandPageModel(oldTemplate),
1640
- {
1641
- isUserDraft: false,
1642
- isServerRender: false,
1643
- },
1644
- );
1575
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1576
+ isUserDraft: false,
1577
+ });
1645
1578
 
1646
- expect(model.brandPageModel.faviconUrl).toBe(expectedUrl);
1647
- expect(model.brandPageModel.ogImageUrl).toBe(expectedUrl);
1579
+ expect(model.faviconUrl).toBe(expectedUrl);
1580
+ expect(model.ogImageUrl).toBe(expectedUrl);
1648
1581
  });
1649
1582
 
1650
- test('should remove extension from content imageUrl for type "image"', async () => {
1583
+ test('should remove extension from content imageUrl for type "image"', () => {
1651
1584
  const oldTemplate: BrandPageModel = {
1652
1585
  pages: [
1653
1586
  {
@@ -1665,19 +1598,15 @@ describe('migration.util', () => {
1665
1598
  brandPageType: 'brandSite',
1666
1599
  } as any;
1667
1600
 
1668
- const model = await migrateBrandPageModel(
1669
- new BrandPageModel(oldTemplate),
1670
- {
1671
- isUserDraft: false,
1672
- isServerRender: false,
1673
- },
1674
- );
1675
- const pageContent = model.brandPageModel.pages[0].contents[0] as any;
1601
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1602
+ isUserDraft: false,
1603
+ });
1604
+ const pageContent = model.pages[0].contents[0] as any;
1676
1605
 
1677
1606
  expect(pageContent.imageUrl).toBe(expectedUrl);
1678
1607
  });
1679
1608
 
1680
- test('should remove extension from content imageUrl inside "images-section"', async () => {
1609
+ test('should remove extension from content imageUrl inside "images-section"', () => {
1681
1610
  const oldTemplate: BrandPageModel = {
1682
1611
  pages: [
1683
1612
  {
@@ -1704,21 +1633,17 @@ describe('migration.util', () => {
1704
1633
  brandPageType: 'brandSite',
1705
1634
  } as any;
1706
1635
 
1707
- const model = await migrateBrandPageModel(
1708
- new BrandPageModel(oldTemplate),
1709
- {
1710
- isUserDraft: false,
1711
- isServerRender: false,
1712
- },
1713
- );
1714
- const section = model.brandPageModel.pages[0].contents[0] as any;
1636
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1637
+ isUserDraft: false,
1638
+ });
1639
+ const section = model.pages[0].contents[0] as any;
1715
1640
 
1716
1641
  section.items.forEach((item: any) => {
1717
1642
  expect(item.imageUrl).toBe(expectedUrl);
1718
1643
  });
1719
1644
  });
1720
1645
 
1721
- test('should remove extension from content imageUrl inside "image-gallery"', async () => {
1646
+ test('should remove extension from content imageUrl inside "image-gallery"', () => {
1722
1647
  const oldTemplate: BrandPageModel = {
1723
1648
  pages: [
1724
1649
  {
@@ -1745,21 +1670,17 @@ describe('migration.util', () => {
1745
1670
  brandPageType: 'brandSite',
1746
1671
  } as any;
1747
1672
 
1748
- const model = await migrateBrandPageModel(
1749
- new BrandPageModel(oldTemplate),
1750
- {
1751
- isUserDraft: false,
1752
- isServerRender: false,
1753
- },
1754
- );
1755
- const gallery = model.brandPageModel.pages[0].contents[0] as any;
1673
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1674
+ isUserDraft: false,
1675
+ });
1676
+ const gallery = model.pages[0].contents[0] as any;
1756
1677
 
1757
1678
  gallery.images.forEach((img: any) => {
1758
1679
  expect(img.imageUrl).toBe(expectedUrl);
1759
1680
  });
1760
1681
  });
1761
1682
 
1762
- test('should remove extension from content modalImageUrl inside "general-link"', async () => {
1683
+ test('should remove extension from content modalImageUrl inside "general-link"', () => {
1763
1684
  const oldTemplate: BrandPageModel = {
1764
1685
  pages: [
1765
1686
  {
@@ -1777,19 +1698,15 @@ describe('migration.util', () => {
1777
1698
  brandPageType: 'brandSite',
1778
1699
  } as any;
1779
1700
 
1780
- const model = await migrateBrandPageModel(
1781
- new BrandPageModel(oldTemplate),
1782
- {
1783
- isUserDraft: false,
1784
- isServerRender: false,
1785
- },
1786
- );
1787
- const generalLink = model.brandPageModel.pages[0].contents[0] as any;
1701
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1702
+ isUserDraft: false,
1703
+ });
1704
+ const generalLink = model.pages[0].contents[0] as any;
1788
1705
 
1789
1706
  expect(generalLink.iconUrl).toBe(expectedUrl);
1790
1707
  });
1791
1708
 
1792
- test('should remove extension from content imageUrl inside "about-section"', async () => {
1709
+ test('should remove extension from content imageUrl inside "about-section"', () => {
1793
1710
  const oldTemplate: BrandPageModel = {
1794
1711
  pages: [
1795
1712
  {
@@ -1807,19 +1724,15 @@ describe('migration.util', () => {
1807
1724
  brandPageType: 'brandSite',
1808
1725
  } as any;
1809
1726
 
1810
- const model = await migrateBrandPageModel(
1811
- new BrandPageModel(oldTemplate),
1812
- {
1813
- isUserDraft: false,
1814
- isServerRender: false,
1815
- },
1816
- );
1817
- const aboutSection = model.brandPageModel.pages[0].contents[0] as any;
1727
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1728
+ isUserDraft: false,
1729
+ });
1730
+ const aboutSection = model.pages[0].contents[0] as any;
1818
1731
 
1819
1732
  expect(aboutSection.imageUrl).toBe(expectedUrl);
1820
1733
  });
1821
1734
 
1822
- test('should remove extension from content imageUrl inside "social-links"', async () => {
1735
+ test('should remove extension from content imageUrl inside "social-links"', () => {
1823
1736
  const oldTemplate: BrandPageModel = {
1824
1737
  pages: [
1825
1738
  {
@@ -1846,21 +1759,17 @@ describe('migration.util', () => {
1846
1759
  brandPageType: 'brandSite',
1847
1760
  } as any;
1848
1761
 
1849
- const model = await migrateBrandPageModel(
1850
- new BrandPageModel(oldTemplate),
1851
- {
1852
- isUserDraft: false,
1853
- isServerRender: false,
1854
- },
1855
- );
1856
- const socialLinks = model.brandPageModel.pages[0].contents[0] as any;
1762
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1763
+ isUserDraft: false,
1764
+ });
1765
+ const socialLinks = model.pages[0].contents[0] as any;
1857
1766
 
1858
1767
  socialLinks.links.forEach((link: any) => {
1859
1768
  expect(link.imageUrl).toBe(expectedUrl);
1860
1769
  });
1861
1770
  });
1862
1771
 
1863
- test('should remove extension from social links in pageFooterDesktop and pageFooterMobile', async () => {
1772
+ test('should remove extension from social links in pageFooterDesktop and pageFooterMobile', () => {
1864
1773
  const oldTemplate: BrandPageModel = {
1865
1774
  pageFooterDesktop: {
1866
1775
  socialLinks: [
@@ -1890,17 +1799,11 @@ describe('migration.util', () => {
1890
1799
  brandPageType: 'brandSite',
1891
1800
  } as any;
1892
1801
 
1893
- const model = await migrateBrandPageModel(
1894
- new BrandPageModel(oldTemplate),
1895
- {
1896
- isUserDraft: false,
1897
- isServerRender: false,
1898
- },
1899
- );
1900
- const desktopLinks =
1901
- model.brandPageModel.pageFooterDesktop?.socialLinks || [];
1902
- const mobileLinks =
1903
- model.brandPageModel.pageFooterMobile?.socialLinks || [];
1802
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1803
+ isUserDraft: false,
1804
+ });
1805
+ const desktopLinks = model.pageFooterDesktop?.socialLinks || [];
1806
+ const mobileLinks = model.pageFooterMobile?.socialLinks || [];
1904
1807
 
1905
1808
  desktopLinks.forEach((link: any) => {
1906
1809
  expect(link.imageUrl).toBe(expectedUrl);
@@ -1910,7 +1813,7 @@ describe('migration.util', () => {
1910
1813
  });
1911
1814
  });
1912
1815
 
1913
- test('should leave social link URL unchanged if file extension is not present', async () => {
1816
+ test('should leave social link URL unchanged if file extension is not present', () => {
1914
1817
  const noExtensionUrl = expectedUrl;
1915
1818
  const oldTemplate: BrandPageModel = {
1916
1819
  pageFooterDesktop: {
@@ -1933,17 +1836,11 @@ describe('migration.util', () => {
1933
1836
  brandPageType: 'brandSite',
1934
1837
  } as any;
1935
1838
 
1936
- const model = await migrateBrandPageModel(
1937
- new BrandPageModel(oldTemplate),
1938
- {
1939
- isUserDraft: false,
1940
- isServerRender: false,
1941
- },
1942
- );
1943
- const desktopLinks =
1944
- model.brandPageModel.pageFooterDesktop?.socialLinks || [];
1945
- const mobileLinks =
1946
- model.brandPageModel.pageFooterMobile?.socialLinks || [];
1839
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1840
+ isUserDraft: false,
1841
+ });
1842
+ const desktopLinks = model.pageFooterDesktop?.socialLinks || [];
1843
+ const mobileLinks = model.pageFooterMobile?.socialLinks || [];
1947
1844
 
1948
1845
  desktopLinks.forEach((link: any) => {
1949
1846
  expect(link.imageUrl).toBe(noExtensionUrl);
@@ -1953,7 +1850,7 @@ describe('migration.util', () => {
1953
1850
  });
1954
1851
  });
1955
1852
 
1956
- test('should leave social link URL unchanged if the domain is different', async () => {
1853
+ test('should leave social link URL unchanged if the domain is different', () => {
1957
1854
  const oldTemplate: BrandPageModel = {
1958
1855
  pageFooterDesktop: {
1959
1856
  socialLinks: [
@@ -1975,17 +1872,11 @@ describe('migration.util', () => {
1975
1872
  brandPageType: 'brandSite',
1976
1873
  } as any;
1977
1874
 
1978
- const model = await migrateBrandPageModel(
1979
- new BrandPageModel(oldTemplate),
1980
- {
1981
- isUserDraft: false,
1982
- isServerRender: false,
1983
- },
1984
- );
1985
- const desktopLinks =
1986
- model.brandPageModel.pageFooterDesktop?.socialLinks || [];
1987
- const mobileLinks =
1988
- model.brandPageModel.pageFooterMobile?.socialLinks || [];
1875
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1876
+ isUserDraft: false,
1877
+ });
1878
+ const desktopLinks = model.pageFooterDesktop?.socialLinks || [];
1879
+ const mobileLinks = model.pageFooterMobile?.socialLinks || [];
1989
1880
 
1990
1881
  desktopLinks.forEach((link: any) => {
1991
1882
  expect(link.imageUrl).toBe(nonUserUrl);
@@ -1995,7 +1886,7 @@ describe('migration.util', () => {
1995
1886
  });
1996
1887
  });
1997
1888
 
1998
- test('should leave URL unchanged if file extension is not present', async () => {
1889
+ test('should leave URL unchanged if file extension is not present', () => {
1999
1890
  const urlWithoutExtension = expectedUrl;
2000
1891
  const oldTemplate: BrandPageModel = {
2001
1892
  faviconUrl: urlWithoutExtension,
@@ -2016,23 +1907,19 @@ describe('migration.util', () => {
2016
1907
  brandPageType: 'brandSite',
2017
1908
  } as any;
2018
1909
 
2019
- const model = await migrateBrandPageModel(
2020
- new BrandPageModel(oldTemplate),
2021
- {
2022
- isUserDraft: false,
2023
- isServerRender: false,
2024
- },
2025
- );
1910
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1911
+ isUserDraft: false,
1912
+ });
2026
1913
 
2027
- expect(model.brandPageModel.faviconUrl).toBe(urlWithoutExtension);
2028
- expect(model.brandPageModel.ogImageUrl).toBe(urlWithoutExtension);
1914
+ expect(model.faviconUrl).toBe(urlWithoutExtension);
1915
+ expect(model.ogImageUrl).toBe(urlWithoutExtension);
2029
1916
 
2030
- const pageContent = model.brandPageModel.pages[0].contents[0] as any;
1917
+ const pageContent = model.pages[0].contents[0] as any;
2031
1918
 
2032
1919
  expect(pageContent.imageUrl).toBe(urlWithoutExtension);
2033
1920
  });
2034
1921
 
2035
- test('should leave URL unchanged if the domain is different', async () => {
1922
+ test('should leave URL unchanged if the domain is different', () => {
2036
1923
  const oldTemplate: BrandPageModel = {
2037
1924
  faviconUrl: nonUserUrl,
2038
1925
  ogImageUrl: nonUserUrl,
@@ -2052,17 +1939,13 @@ describe('migration.util', () => {
2052
1939
  brandPageType: 'brandSite',
2053
1940
  } as any;
2054
1941
 
2055
- const model = await migrateBrandPageModel(
2056
- new BrandPageModel(oldTemplate),
2057
- {
2058
- isUserDraft: false,
2059
- isServerRender: false,
2060
- },
2061
- );
1942
+ const model = migrateBrandPageModel(new BrandPageModel(oldTemplate), {
1943
+ isUserDraft: false,
1944
+ });
2062
1945
 
2063
- expect(model.brandPageModel.faviconUrl).toBe(nonUserUrl);
2064
- expect(model.brandPageModel.ogImageUrl).toBe(nonUserUrl);
2065
- const pageContent = model.brandPageModel.pages[0].contents[0] as any;
1946
+ expect(model.faviconUrl).toBe(nonUserUrl);
1947
+ expect(model.ogImageUrl).toBe(nonUserUrl);
1948
+ const pageContent = model.pages[0].contents[0] as any;
2066
1949
 
2067
1950
  expect(pageContent.imageUrl).toBe(nonUserUrl);
2068
1951
  });