@studyportals/fawkes 8.7.0 → 8.7.1-0

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 (520) hide show
  1. package/dist/organisations-seo/index.d.ts +3 -3
  2. package/dist/organisations-seo/index.js +1 -1
  3. package/dist/programmes-seo/index.d.ts +5 -5
  4. package/dist/programmes-seo/index.js +1 -1
  5. package/dist/scholarships-seo/index.d.ts +4 -4
  6. package/dist/scholarships-seo/index.js +2 -2
  7. package/dist/sitemap-generator-seo/index.d.ts +14 -14
  8. package/dist/sitemap-generator-seo/index.js +5 -5
  9. package/dist/src/common/IDependencies.d.ts +1 -1
  10. package/dist/src/common/IPresenter.d.ts +1 -1
  11. package/dist/src/common/ISearchDependencies.d.ts +1 -1
  12. package/dist/src/common/ISeoDependencies.d.ts +2 -2
  13. package/dist/src/common/ISitemapDependencies.d.ts +2 -2
  14. package/dist/src/common/ISitemapUrlGenerator.d.ts +1 -1
  15. package/dist/src/common/policies/BaseSeoIndexabilityPolicy.d.ts +1 -1
  16. package/dist/src/common/policies/BaseSeoIndexabilityPolicy.js +2 -2
  17. package/dist/src/common/rules/NoFiltersSelectedRule.d.ts +2 -2
  18. package/dist/src/common/rules/OnlineAttendanceRule.d.ts +1 -1
  19. package/dist/src/common/rules/OnlineAttendanceRule.js +1 -1
  20. package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +2 -2
  21. package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +2 -2
  22. package/dist/src/organisations/IOrganisationSearchApplicationState.d.ts +1 -1
  23. package/dist/src/organisations/ISeoSortingState.d.ts +1 -1
  24. package/dist/src/organisations/SearchIndexabilityManager.d.ts +4 -4
  25. package/dist/src/organisations/SearchIndexabilityManager.js +2 -2
  26. package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.d.ts +3 -3
  27. package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.js +3 -3
  28. package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.d.ts +1 -1
  29. package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.js +1 -1
  30. package/dist/src/organisations/policies/our-picks/Area.d.ts +5 -5
  31. package/dist/src/organisations/policies/our-picks/Area.js +6 -6
  32. package/dist/src/organisations/policies/our-picks/AreaAttendance.d.ts +7 -7
  33. package/dist/src/organisations/policies/our-picks/AreaAttendance.js +9 -9
  34. package/dist/src/organisations/policies/our-picks/Attendance.d.ts +6 -6
  35. package/dist/src/organisations/policies/our-picks/Attendance.js +7 -7
  36. package/dist/src/organisations/policies/our-picks/Continent.d.ts +5 -5
  37. package/dist/src/organisations/policies/our-picks/Continent.js +6 -6
  38. package/dist/src/organisations/policies/our-picks/Country.d.ts +5 -5
  39. package/dist/src/organisations/policies/our-picks/Country.js +6 -6
  40. package/dist/src/organisations/policies/our-picks/CountryAreaCity.d.ts +6 -6
  41. package/dist/src/organisations/policies/our-picks/CountryAreaCity.js +7 -7
  42. package/dist/src/organisations/policies/our-picks/CountryAttendance.d.ts +7 -7
  43. package/dist/src/organisations/policies/our-picks/CountryAttendance.js +9 -9
  44. package/dist/src/organisations/policies/our-picks/CountryCity.d.ts +6 -6
  45. package/dist/src/organisations/policies/our-picks/CountryCity.js +7 -7
  46. package/dist/src/organisations/policies/our-picks/Unfiltered.d.ts +4 -4
  47. package/dist/src/organisations/policies/our-picks/Unfiltered.js +4 -4
  48. package/dist/src/organisations/policies/ranked/RankedArea.d.ts +4 -4
  49. package/dist/src/organisations/policies/ranked/RankedArea.js +4 -4
  50. package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.d.ts +5 -5
  51. package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.js +6 -6
  52. package/dist/src/organisations/policies/ranked/RankedAttendance.d.ts +5 -5
  53. package/dist/src/organisations/policies/ranked/RankedAttendance.js +5 -5
  54. package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.d.ts +5 -5
  55. package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +6 -6
  56. package/dist/src/organisations/policies/ranked/RankedContinent.d.ts +4 -4
  57. package/dist/src/organisations/policies/ranked/RankedContinent.js +4 -4
  58. package/dist/src/organisations/policies/ranked/RankedContinentAttendance.d.ts +6 -6
  59. package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +7 -7
  60. package/dist/src/organisations/policies/ranked/RankedCountry.d.ts +4 -4
  61. package/dist/src/organisations/policies/ranked/RankedCountry.js +4 -4
  62. package/dist/src/organisations/policies/ranked/RankedCountryAttendance.d.ts +5 -5
  63. package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +6 -6
  64. package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.d.ts +4 -4
  65. package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +5 -5
  66. package/dist/src/organisations/policies/ranked/RankedDiscipline.d.ts +4 -4
  67. package/dist/src/organisations/policies/ranked/RankedDiscipline.js +4 -4
  68. package/dist/src/organisations/policies/ranked/RankedUnfiltered.d.ts +3 -3
  69. package/dist/src/organisations/policies/ranked/RankedUnfiltered.js +2 -2
  70. package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +3 -3
  71. package/dist/src/organisations/rules/ContinentIsEuropeRule.d.ts +1 -1
  72. package/dist/src/organisations/rules/ContinentIsEuropeRule.js +1 -1
  73. package/dist/src/organisations/rules/ExcludeByIdForCitiesRule.d.ts +3 -3
  74. package/dist/src/organisations/rules/MinimumAmountOfRankedResultsRule.d.ts +3 -3
  75. package/dist/src/organisations/rules/MinimumAmountOfRankedResultsRule.js +1 -1
  76. package/dist/src/organisations/rules/MinimumAmountOfResultsRule.d.ts +4 -4
  77. package/dist/src/organisations/rules/MinimumAmountOfResultsRule.js +1 -1
  78. package/dist/src/organisations/rules/NoFiltersSelectedRule.d.ts +2 -2
  79. package/dist/src/organisations/types/IOrganisationSearchDependencies.d.ts +2 -2
  80. package/dist/src/organisations/types/IOrganisationsSitemapDependencies.d.ts +3 -3
  81. package/dist/src/presenters/AreaPresenter.d.ts +1 -1
  82. package/dist/src/presenters/AttendancePresenter.d.ts +1 -1
  83. package/dist/src/presenters/CityPresenter.d.ts +1 -1
  84. package/dist/src/presenters/ContinentPresenter.d.ts +1 -1
  85. package/dist/src/presenters/CountryPresenter.d.ts +1 -1
  86. package/dist/src/presenters/DegreePresenter.d.ts +1 -1
  87. package/dist/src/presenters/DisciplinePresenter.d.ts +1 -1
  88. package/dist/src/presenters/DurationPresenter.d.ts +1 -1
  89. package/dist/src/presenters/EducationalFormPresenter.d.ts +1 -1
  90. package/dist/src/presenters/FormatPresenter.d.ts +1 -1
  91. package/dist/src/presenters/SpecialProgrammesPresenter.d.ts +1 -1
  92. package/dist/src/presenters/TuitionFeePresenter.d.ts +1 -1
  93. package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.d.ts +2 -2
  94. package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.js +1 -1
  95. package/dist/src/programmes/BaseProgrammeRule.d.ts +2 -2
  96. package/dist/src/programmes/IProgrammeRule.d.ts +2 -2
  97. package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +3 -3
  98. package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.js +1 -1
  99. package/dist/src/programmes/SearchIndexabilityManager.d.ts +4 -4
  100. package/dist/src/programmes/SearchIndexabilityManager.js +8 -4
  101. package/dist/src/programmes/policies/Area.d.ts +3 -3
  102. package/dist/src/programmes/policies/Area.js +4 -4
  103. package/dist/src/programmes/policies/Attendance.d.ts +4 -4
  104. package/dist/src/programmes/policies/Attendance.js +5 -5
  105. package/dist/src/programmes/policies/AttendanceArea.d.ts +4 -4
  106. package/dist/src/programmes/policies/AttendanceArea.js +6 -6
  107. package/dist/src/programmes/policies/AttendanceContinent.d.ts +4 -4
  108. package/dist/src/programmes/policies/AttendanceContinent.js +6 -6
  109. package/dist/src/programmes/policies/AttendanceDegree.d.ts +2 -2
  110. package/dist/src/programmes/policies/AttendanceDegree.js +5 -5
  111. package/dist/src/programmes/policies/AttendanceDuration.d.ts +5 -5
  112. package/dist/src/programmes/policies/AttendanceDuration.js +7 -7
  113. package/dist/src/programmes/policies/AttendanceFormat.d.ts +4 -4
  114. package/dist/src/programmes/policies/AttendanceFormat.js +6 -6
  115. package/dist/src/programmes/policies/Continent.d.ts +3 -3
  116. package/dist/src/programmes/policies/Continent.js +4 -4
  117. package/dist/src/programmes/policies/ContinentDuration.d.ts +3 -3
  118. package/dist/src/programmes/policies/ContinentDuration.js +5 -5
  119. package/dist/src/programmes/policies/ContinentFormat.d.ts +3 -3
  120. package/dist/src/programmes/policies/ContinentFormat.js +5 -5
  121. package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +4 -4
  122. package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +6 -6
  123. package/dist/src/programmes/policies/Country.d.ts +3 -3
  124. package/dist/src/programmes/policies/Country.js +4 -4
  125. package/dist/src/programmes/policies/CountryAttendance.d.ts +4 -4
  126. package/dist/src/programmes/policies/CountryAttendance.js +6 -6
  127. package/dist/src/programmes/policies/CountryAttendanceDegree.d.ts +4 -4
  128. package/dist/src/programmes/policies/CountryAttendanceDegree.js +7 -7
  129. package/dist/src/programmes/policies/CountryDegree.d.ts +2 -2
  130. package/dist/src/programmes/policies/CountryDegree.js +5 -5
  131. package/dist/src/programmes/policies/CountryDuration.d.ts +3 -3
  132. package/dist/src/programmes/policies/CountryDuration.js +5 -5
  133. package/dist/src/programmes/policies/CountryDurationDegree.d.ts +3 -3
  134. package/dist/src/programmes/policies/CountryDurationDegree.js +6 -6
  135. package/dist/src/programmes/policies/CountryEducationalForm.d.ts +2 -2
  136. package/dist/src/programmes/policies/CountryEducationalForm.js +5 -5
  137. package/dist/src/programmes/policies/CountryFormat.d.ts +3 -3
  138. package/dist/src/programmes/policies/CountryFormat.js +5 -5
  139. package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +4 -4
  140. package/dist/src/programmes/policies/CountrySpecialProgrammes.js +6 -6
  141. package/dist/src/programmes/policies/Degree.d.ts +3 -3
  142. package/dist/src/programmes/policies/Degree.js +4 -4
  143. package/dist/src/programmes/policies/DegreeArea.d.ts +3 -3
  144. package/dist/src/programmes/policies/DegreeArea.js +5 -5
  145. package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +4 -4
  146. package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +7 -7
  147. package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +4 -4
  148. package/dist/src/programmes/policies/DegreeAttendanceFormat.js +7 -7
  149. package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +4 -4
  150. package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +7 -7
  151. package/dist/src/programmes/policies/DegreeContinent.d.ts +2 -2
  152. package/dist/src/programmes/policies/DegreeContinent.js +5 -5
  153. package/dist/src/programmes/policies/DegreeCountryAttendance.d.ts +3 -3
  154. package/dist/src/programmes/policies/DegreeCountryAttendance.js +6 -6
  155. package/dist/src/programmes/policies/DegreeCountryDiscipline.d.ts +3 -3
  156. package/dist/src/programmes/policies/DegreeCountryDiscipline.js +6 -6
  157. package/dist/src/programmes/policies/DegreeCountryTuitionFee.d.ts +3 -3
  158. package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +6 -6
  159. package/dist/src/programmes/policies/DegreeDuration.d.ts +2 -2
  160. package/dist/src/programmes/policies/DegreeDuration.js +5 -5
  161. package/dist/src/programmes/policies/DegreeFormat.d.ts +2 -2
  162. package/dist/src/programmes/policies/DegreeFormat.js +5 -5
  163. package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +3 -3
  164. package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +5 -5
  165. package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +3 -3
  166. package/dist/src/programmes/policies/DegreeTuitionFee.js +5 -5
  167. package/dist/src/programmes/policies/{DisciplineTuitionFee.d.ts → DegreeTuitionFeeArea.d.ts} +5 -5
  168. package/dist/src/programmes/policies/{DegreeAreaTuitionFee.js → DegreeTuitionFeeArea.js} +7 -7
  169. package/dist/src/programmes/policies/{DegreeAttendanceTuitionFee.d.ts → DegreeTuitionFeeAttendance.d.ts} +2 -2
  170. package/dist/src/programmes/policies/{DegreeAttendanceTuitionFee.js → DegreeTuitionFeeAttendance.js} +7 -7
  171. package/dist/src/programmes/policies/{DegreeContinentTuitionFee.d.ts → DegreeTuitionFeeContinent.d.ts} +2 -2
  172. package/dist/src/programmes/policies/{DegreeContinentTuitionFee.js → DegreeTuitionFeeContinent.js} +6 -6
  173. package/dist/src/programmes/policies/{DegreeFormatTuitionFee.d.ts → DegreeTuitionFeeFormat.d.ts} +3 -3
  174. package/dist/src/programmes/policies/{DegreeFormatTuitionFee.js → DegreeTuitionFeeFormat.js} +9 -9
  175. package/dist/src/programmes/policies/Discipline.d.ts +3 -3
  176. package/dist/src/programmes/policies/Discipline.js +4 -4
  177. package/dist/src/programmes/policies/DisciplineAttendance.d.ts +4 -4
  178. package/dist/src/programmes/policies/DisciplineAttendance.js +6 -6
  179. package/dist/src/programmes/policies/DisciplineContinent.d.ts +3 -3
  180. package/dist/src/programmes/policies/DisciplineContinent.js +5 -5
  181. package/dist/src/programmes/policies/DisciplineContinentAttendance.d.ts +4 -4
  182. package/dist/src/programmes/policies/DisciplineContinentAttendance.js +7 -7
  183. package/dist/src/programmes/policies/DisciplineCountry.d.ts +3 -3
  184. package/dist/src/programmes/policies/DisciplineCountry.js +5 -5
  185. package/dist/src/programmes/policies/DisciplineCountryAttendance.d.ts +4 -4
  186. package/dist/src/programmes/policies/DisciplineCountryAttendance.js +7 -7
  187. package/dist/src/programmes/policies/DisciplineCountryEducationalForm.d.ts +2 -2
  188. package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +6 -6
  189. package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +3 -3
  190. package/dist/src/programmes/policies/DisciplineCountryFormat.js +6 -6
  191. package/dist/src/programmes/policies/DisciplineDegree.d.ts +3 -3
  192. package/dist/src/programmes/policies/DisciplineDegree.js +5 -5
  193. package/dist/src/programmes/policies/DisciplineDuration.d.ts +3 -3
  194. package/dist/src/programmes/policies/DisciplineDuration.js +5 -5
  195. package/dist/src/programmes/policies/DisciplineEducationalForm.d.ts +2 -2
  196. package/dist/src/programmes/policies/DisciplineEducationalForm.js +5 -5
  197. package/dist/src/programmes/policies/DisciplineFormat.d.ts +3 -3
  198. package/dist/src/programmes/policies/DisciplineFormat.js +5 -5
  199. package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +3 -3
  200. package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +5 -5
  201. package/dist/src/programmes/policies/Duration.d.ts +3 -3
  202. package/dist/src/programmes/policies/Duration.js +4 -4
  203. package/dist/src/programmes/policies/Format.d.ts +3 -3
  204. package/dist/src/programmes/policies/Format.js +4 -4
  205. package/dist/src/programmes/policies/SpecialProgrammes.d.ts +3 -3
  206. package/dist/src/programmes/policies/SpecialProgrammes.js +4 -4
  207. package/dist/src/programmes/policies/TuitionFee.d.ts +3 -3
  208. package/dist/src/programmes/policies/TuitionFee.js +4 -4
  209. package/dist/src/programmes/policies/TuitionFeeAttendance.d.ts +4 -4
  210. package/dist/src/programmes/policies/TuitionFeeAttendance.js +6 -6
  211. package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.d.ts +4 -4
  212. package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.js +7 -7
  213. package/dist/src/programmes/policies/TuitionFeeContinent.d.ts +3 -3
  214. package/dist/src/programmes/policies/TuitionFeeContinent.js +5 -5
  215. package/dist/src/programmes/policies/TuitionFeeCountry.d.ts +3 -3
  216. package/dist/src/programmes/policies/TuitionFeeCountry.js +5 -5
  217. package/dist/src/programmes/policies/TuitionFeeDiscipline.d.ts +3 -3
  218. package/dist/src/programmes/policies/TuitionFeeDiscipline.js +5 -5
  219. package/dist/src/programmes/policies/Unfiltered.d.ts +2 -2
  220. package/dist/src/programmes/policies/Unfiltered.js +2 -2
  221. package/dist/src/programmes/policies/index.d.ts +4 -5
  222. package/dist/src/programmes/policies/index.js +4 -5
  223. package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.d.ts +2 -2
  224. package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.d.ts +2 -2
  225. package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.d.ts +2 -2
  226. package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.d.ts +2 -2
  227. package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.d.ts +2 -2
  228. package/dist/src/programmes/rules/DegreeDisciplineRule.d.ts +2 -2
  229. package/dist/src/programmes/rules/IndexableDegreeRule.d.ts +2 -2
  230. package/dist/src/programmes/rules/IndexableDegreeRule.js +1 -1
  231. package/dist/src/programmes/rules/IndexableDurationRule.d.ts +2 -2
  232. package/dist/src/programmes/rules/IndexableDurationRule.js +1 -1
  233. package/dist/src/programmes/rules/IndexableEducationalFormRule.d.ts +2 -2
  234. package/dist/src/programmes/rules/IndexableEducationalFormRule.js +1 -1
  235. package/dist/src/programmes/rules/IndexablePageNumberRule.js +1 -1
  236. package/dist/src/programmes/rules/MbaOrMscDegreeRule.d.ts +2 -2
  237. package/dist/src/programmes/rules/MinimumAmountOfResultsRule.d.ts +3 -3
  238. package/dist/src/programmes/rules/MinimumAmountOfResultsRule.js +1 -1
  239. package/dist/src/programmes/rules/NotDistanceLearningPortalRule.js +1 -1
  240. package/dist/src/programmes/rules/OneYearOnlyRule.d.ts +2 -2
  241. package/dist/src/programmes/types/IProgrammeSearchApplicationState.d.ts +1 -1
  242. package/dist/src/programmes/types/IProgrammeSearchDependencies.d.ts +1 -1
  243. package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.d.ts +1 -1
  244. package/dist/src/programmes/types/IProgrammeSitemapDependencies.d.ts +2 -2
  245. package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.d.ts +1 -1
  246. package/dist/src/scholarships/SearchIndexabilityManager.d.ts +5 -5
  247. package/dist/src/scholarships/SearchIndexabilityManager.js +1 -1
  248. package/dist/src/scholarships/policies/Area.d.ts +3 -3
  249. package/dist/src/scholarships/policies/Area.js +4 -4
  250. package/dist/src/scholarships/policies/Country.d.ts +3 -3
  251. package/dist/src/scholarships/policies/Country.js +4 -4
  252. package/dist/src/scholarships/policies/Discipline.d.ts +4 -4
  253. package/dist/src/scholarships/policies/Discipline.js +5 -5
  254. package/dist/src/scholarships/policies/DisciplineCountry.d.ts +3 -3
  255. package/dist/src/scholarships/policies/DisciplineCountry.js +5 -5
  256. package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.d.ts +2 -2
  257. package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.js +2 -2
  258. package/dist/src/scholarships/policies/Unfiltered.d.ts +2 -2
  259. package/dist/src/scholarships/policies/Unfiltered.js +2 -2
  260. package/dist/src/scholarships/policies/UniversityCountry.d.ts +3 -3
  261. package/dist/src/scholarships/policies/UniversityCountry.js +4 -4
  262. package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +3 -3
  263. package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +1 -1
  264. package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +3 -3
  265. package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.d.ts +3 -3
  266. package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +3 -3
  267. package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +3 -3
  268. package/dist/src/scholarships/types/IScholarshipSeoDependencies.d.ts +1 -1
  269. package/dist/src/scholarships/types/IScholarshipSitemapDependencies.d.ts +2 -2
  270. package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +3 -3
  271. package/dist/src/sitemap-generator/IRankingApiClient.d.ts +1 -1
  272. package/dist/src/sitemap-generator/ISearchApiClient.d.ts +1 -1
  273. package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +3 -3
  274. package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +4 -4
  275. package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +8 -8
  276. package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +3 -3
  277. package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +15 -15
  278. package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.d.ts +3 -3
  279. package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.js +7 -7
  280. package/dist/src/structured-data/OrganisationStructuredDataFactory.d.ts +1 -1
  281. package/dist/src/structured-data/ProgrammeStructuredDataFactory.d.ts +1 -1
  282. package/dist/tests/common/rules/NoFiltersSelectedRule.test.d.mts +1 -0
  283. package/dist/tests/common/rules/NoFiltersSelectedRule.test.mjs +40 -0
  284. package/dist/tests/common/rules/OnlyFiltersSelectedRule.test.d.mts +1 -0
  285. package/dist/tests/common/rules/OnlyFiltersSelectedRule.test.mjs +70 -0
  286. package/dist/tests/common/rules/SingleValueSelectedForFilterRule.test.d.mts +1 -0
  287. package/dist/tests/common/rules/SingleValueSelectedForFilterRule.test.mjs +54 -0
  288. package/dist/tests/organisations/policies/our-picks/Area.test.d.mts +1 -0
  289. package/dist/tests/organisations/policies/our-picks/Area.test.mjs +125 -0
  290. package/dist/tests/organisations/policies/our-picks/AreaAttendance.test.d.mts +1 -0
  291. package/dist/tests/organisations/policies/our-picks/AreaAttendance.test.mjs +238 -0
  292. package/dist/tests/organisations/policies/our-picks/Attendance.test.d.mts +1 -0
  293. package/dist/tests/organisations/policies/our-picks/Attendance.test.mjs +119 -0
  294. package/dist/tests/organisations/policies/our-picks/Continent.test.d.mts +1 -0
  295. package/dist/tests/organisations/policies/our-picks/Continent.test.mjs +105 -0
  296. package/dist/tests/organisations/policies/our-picks/Country.test.d.mts +1 -0
  297. package/dist/tests/organisations/policies/our-picks/Country.test.mjs +109 -0
  298. package/dist/tests/organisations/policies/our-picks/CountryAreaCity.test.d.mts +1 -0
  299. package/dist/tests/organisations/policies/our-picks/CountryAreaCity.test.mjs +152 -0
  300. package/dist/tests/organisations/policies/our-picks/CountryAttendance.test.d.mts +1 -0
  301. package/dist/tests/organisations/policies/our-picks/CountryAttendance.test.mjs +223 -0
  302. package/dist/tests/organisations/policies/our-picks/CountryCity.test.d.mts +1 -0
  303. package/dist/tests/organisations/policies/our-picks/CountryCity.test.mjs +109 -0
  304. package/dist/tests/organisations/policies/our-picks/Unfiltered.test.d.mts +1 -0
  305. package/dist/tests/organisations/policies/our-picks/Unfiltered.test.mjs +60 -0
  306. package/dist/tests/organisations/policies/ranked/RankedArea.test.d.mts +1 -0
  307. package/dist/tests/organisations/policies/ranked/RankedArea.test.mjs +149 -0
  308. package/dist/tests/organisations/policies/ranked/RankedAreaDiscipline.test.d.mts +1 -0
  309. package/dist/tests/organisations/policies/ranked/RankedAreaDiscipline.test.mjs +237 -0
  310. package/dist/tests/organisations/policies/ranked/RankedAttendance.test.d.mts +1 -0
  311. package/dist/tests/organisations/policies/ranked/RankedAttendance.test.mjs +139 -0
  312. package/dist/tests/organisations/policies/ranked/RankedAttendanceDiscipline.test.d.mts +1 -0
  313. package/dist/tests/organisations/policies/ranked/RankedAttendanceDiscipline.test.mjs +224 -0
  314. package/dist/tests/organisations/policies/ranked/RankedContinent.test.d.mts +1 -0
  315. package/dist/tests/organisations/policies/ranked/RankedContinent.test.mjs +125 -0
  316. package/dist/tests/organisations/policies/ranked/RankedContinentAttendance.test.d.mts +1 -0
  317. package/dist/tests/organisations/policies/ranked/RankedContinentAttendance.test.mjs +253 -0
  318. package/dist/tests/organisations/policies/ranked/RankedCountry.test.d.mts +1 -0
  319. package/dist/tests/organisations/policies/ranked/RankedCountry.test.mjs +131 -0
  320. package/dist/tests/organisations/policies/ranked/RankedCountryAttendance.test.d.mts +1 -0
  321. package/dist/tests/organisations/policies/ranked/RankedCountryAttendance.test.mjs +230 -0
  322. package/dist/tests/organisations/policies/ranked/RankedCountryDiscipline.test.d.mts +1 -0
  323. package/dist/tests/organisations/policies/ranked/RankedCountryDiscipline.test.mjs +197 -0
  324. package/dist/tests/organisations/policies/ranked/RankedDiscipline.test.d.mts +1 -0
  325. package/dist/tests/organisations/policies/ranked/RankedDiscipline.test.mjs +124 -0
  326. package/dist/tests/organisations/policies/ranked/RankedUnfiltered.test.d.mts +1 -0
  327. package/dist/tests/organisations/policies/ranked/RankedUnfiltered.test.mjs +75 -0
  328. package/dist/tests/organisations/rules/ContinentIsEuropeRule.test.d.mts +1 -0
  329. package/dist/tests/organisations/rules/ContinentIsEuropeRule.test.mjs +59 -0
  330. package/dist/tests/organisations/rules/MinimumAmountOfRankedResultsRule.test.d.mts +1 -0
  331. package/dist/tests/organisations/rules/MinimumAmountOfRankedResultsRule.test.mjs +77 -0
  332. package/dist/tests/organisations/rules/MinimumAmountOfResultsRule.test.d.mts +1 -0
  333. package/dist/tests/organisations/rules/MinimumAmountOfResultsRule.test.mjs +77 -0
  334. package/dist/tests/organisations/rules/OnlineAttendanceRule.test.d.mts +1 -0
  335. package/dist/tests/organisations/rules/OnlineAttendanceRule.test.mjs +59 -0
  336. package/dist/tests/organisations/rules/SearchVolumeAreasAttendanceRule.test.d.mts +1 -0
  337. package/dist/tests/organisations/rules/SearchVolumeAreasAttendanceRule.test.mjs +59 -0
  338. package/dist/tests/organisations/rules/SearchVolumeAreasDisciplineRule.test.d.mts +1 -0
  339. package/dist/tests/organisations/rules/SearchVolumeAreasDisciplineRule.test.mjs +59 -0
  340. package/dist/tests/organisations/rules/SearchVolumeCountriesAttendanceRule.test.d.mts +1 -0
  341. package/dist/tests/organisations/rules/SearchVolumeCountriesAttendanceRule.test.mjs +59 -0
  342. package/dist/tests/organisations/utils/SearchDependencies.util.d.mts +20 -0
  343. package/dist/tests/organisations/utils/SearchDependencies.util.mjs +88 -0
  344. package/dist/tests/organisations/utils/SitemapDependencies.util.d.mts +18 -0
  345. package/dist/tests/organisations/utils/SitemapDependencies.util.mjs +54 -0
  346. package/dist/tests/presenters/AreaPresenter.test.d.mts +1 -0
  347. package/dist/tests/presenters/AreaPresenter.test.mjs +46 -0
  348. package/dist/tests/presenters/AttendancePresenter.test.d.mts +1 -0
  349. package/dist/tests/presenters/AttendancePresenter.test.mjs +41 -0
  350. package/dist/tests/presenters/ContinentPresenter.test.d.mts +1 -0
  351. package/dist/tests/presenters/ContinentPresenter.test.mjs +44 -0
  352. package/dist/tests/presenters/CountryPresenter.test.d.mts +1 -0
  353. package/dist/tests/presenters/CountryPresenter.test.mjs +50 -0
  354. package/dist/tests/presenters/DegreePresenter.test.d.mts +1 -0
  355. package/dist/tests/presenters/DegreePresenter.test.mjs +51 -0
  356. package/dist/tests/presenters/DisciplinePresenter.test.d.mts +1 -0
  357. package/dist/tests/presenters/DisciplinePresenter.test.mjs +40 -0
  358. package/dist/tests/presenters/DurationPresenter.test.d.mts +1 -0
  359. package/dist/tests/presenters/DurationPresenter.test.mjs +64 -0
  360. package/dist/tests/presenters/EducationalFormPresenter.test.d.mts +1 -0
  361. package/dist/tests/presenters/EducationalFormPresenter.test.mjs +60 -0
  362. package/dist/tests/presenters/FormatPresenter.test.d.mts +1 -0
  363. package/dist/tests/presenters/FormatPresenter.test.mjs +43 -0
  364. package/dist/tests/presenters/SpecialProgrammesPresenter.test.d.mts +1 -0
  365. package/dist/tests/presenters/SpecialProgrammesPresenter.test.mjs +66 -0
  366. package/dist/tests/presenters/TuitionFeePresenter.test.d.mts +1 -0
  367. package/dist/tests/presenters/TuitionFeePresenter.test.mjs +52 -0
  368. package/dist/tests/programmes/policies/Area.test.d.mts +1 -0
  369. package/dist/tests/programmes/policies/Area.test.mjs +153 -0
  370. package/dist/tests/programmes/policies/Attendance.test.d.mts +1 -0
  371. package/dist/tests/programmes/policies/Attendance.test.mjs +173 -0
  372. package/dist/tests/programmes/policies/AttendanceDegree.test.d.mts +1 -0
  373. package/dist/tests/programmes/policies/AttendanceDegree.test.mjs +291 -0
  374. package/dist/tests/programmes/policies/Continent.test.d.mts +1 -0
  375. package/dist/tests/programmes/policies/Continent.test.mjs +169 -0
  376. package/dist/tests/programmes/policies/Country.test.d.mts +1 -0
  377. package/dist/tests/programmes/policies/Country.test.mjs +164 -0
  378. package/dist/tests/programmes/policies/CountryAttendance.test.d.mts +1 -0
  379. package/dist/tests/programmes/policies/CountryAttendance.test.mjs +251 -0
  380. package/dist/tests/programmes/policies/CountryAttendanceDegree.test.d.mts +1 -0
  381. package/dist/tests/programmes/policies/CountryAttendanceDegree.test.mjs +337 -0
  382. package/dist/tests/programmes/policies/CountryDegree.test.d.mts +1 -0
  383. package/dist/tests/programmes/policies/CountryDegree.test.mjs +262 -0
  384. package/dist/tests/programmes/policies/CountryDuration.test.d.mts +1 -0
  385. package/dist/tests/programmes/policies/CountryDuration.test.mjs +234 -0
  386. package/dist/tests/programmes/policies/CountryDurationDegree.test.d.mts +1 -0
  387. package/dist/tests/programmes/policies/CountryDurationDegree.test.mjs +304 -0
  388. package/dist/tests/programmes/policies/CountryEducationalForm.test.d.mts +1 -0
  389. package/dist/tests/programmes/policies/CountryEducationalForm.test.mjs +260 -0
  390. package/dist/tests/programmes/policies/CountryFormat.test.d.mts +1 -0
  391. package/dist/tests/programmes/policies/CountryFormat.test.mjs +253 -0
  392. package/dist/tests/programmes/policies/DegreeAttendanceDiscipline.test.d.mts +1 -0
  393. package/dist/tests/programmes/policies/DegreeAttendanceDiscipline.test.mjs +179 -0
  394. package/dist/tests/programmes/policies/DegreeCountryAttendance.test.d.mts +1 -0
  395. package/dist/tests/programmes/policies/DegreeCountryAttendance.test.mjs +267 -0
  396. package/dist/tests/programmes/policies/DegreeCountryTuitionFee.test.d.mts +1 -0
  397. package/dist/tests/programmes/policies/DegreeCountryTuitionFee.test.mjs +217 -0
  398. package/dist/tests/programmes/policies/DegreeFormat.test.d.mts +1 -0
  399. package/dist/tests/programmes/policies/DegreeFormat.test.mjs +221 -0
  400. package/dist/tests/programmes/policies/Discipline.test.d.mts +1 -0
  401. package/dist/tests/programmes/policies/Discipline.test.mjs +159 -0
  402. package/dist/tests/programmes/policies/DisciplineAttendance.test.d.mts +1 -0
  403. package/dist/tests/programmes/policies/DisciplineAttendance.test.mjs +292 -0
  404. package/dist/tests/programmes/policies/DisciplineContinent.test.d.mts +1 -0
  405. package/dist/tests/programmes/policies/DisciplineContinent.test.mjs +253 -0
  406. package/dist/tests/programmes/policies/DisciplineCountry.test.d.mts +1 -0
  407. package/dist/tests/programmes/policies/DisciplineCountry.test.mjs +244 -0
  408. package/dist/tests/programmes/policies/DisciplineCountryEducationalForm.test.d.mts +1 -0
  409. package/dist/tests/programmes/policies/DisciplineCountryEducationalForm.test.mjs +345 -0
  410. package/dist/tests/programmes/policies/DisciplineDegree.test.d.mts +1 -0
  411. package/dist/tests/programmes/policies/DisciplineDegree.test.mjs +273 -0
  412. package/dist/tests/programmes/policies/DisciplineDuration.test.d.mts +1 -0
  413. package/dist/tests/programmes/policies/DisciplineDuration.test.mjs +278 -0
  414. package/dist/tests/programmes/policies/DisciplineEducationalForm.test.d.mts +1 -0
  415. package/dist/tests/programmes/policies/DisciplineEducationalForm.test.mjs +302 -0
  416. package/dist/tests/programmes/policies/DisciplineFormat.test.d.mts +1 -0
  417. package/dist/tests/programmes/policies/DisciplineFormat.test.mjs +266 -0
  418. package/dist/tests/programmes/policies/Duration.test.d.mts +1 -0
  419. package/dist/tests/programmes/policies/Duration.test.mjs +179 -0
  420. package/dist/tests/programmes/policies/Format.test.d.mts +1 -0
  421. package/dist/tests/programmes/policies/Format.test.mjs +117 -0
  422. package/dist/tests/programmes/policies/NewRulesValidation.test.d.mts +1 -0
  423. package/dist/tests/programmes/policies/NewRulesValidation.test.mjs +320 -0
  424. package/dist/tests/programmes/policies/SpecialProgrammes.test.d.mts +1 -0
  425. package/dist/tests/programmes/policies/SpecialProgrammes.test.mjs +171 -0
  426. package/dist/tests/programmes/policies/TuitionFeeAttendanceDiscipline.test.d.mts +1 -0
  427. package/dist/tests/programmes/policies/TuitionFeeAttendanceDiscipline.test.mjs +360 -0
  428. package/dist/tests/programmes/policies/TuitionFeeContinent.test.d.mts +1 -0
  429. package/dist/tests/programmes/policies/TuitionFeeContinent.test.mjs +293 -0
  430. package/dist/tests/programmes/policies/TuitionFeeCountry.test.d.mts +1 -0
  431. package/dist/tests/programmes/policies/TuitionFeeCountry.test.mjs +266 -0
  432. package/dist/tests/programmes/policies/TuitionFeeDiscipline.test.d.mts +1 -0
  433. package/dist/tests/programmes/policies/TuitionFeeDiscipline.test.mjs +267 -0
  434. package/dist/tests/programmes/policies/Unfiltered.test.d.mts +1 -0
  435. package/dist/tests/programmes/policies/Unfiltered.test.mjs +90 -0
  436. package/dist/tests/programmes/rules/AffordableTuitionFeeRule.test.d.mts +1 -0
  437. package/dist/tests/programmes/rules/AffordableTuitionFeeRule.test.mjs +27 -0
  438. package/dist/tests/programmes/rules/DegreeCountrySpecificRule.test.d.mts +1 -0
  439. package/dist/tests/programmes/rules/DegreeCountrySpecificRule.test.mjs +121 -0
  440. package/dist/tests/programmes/rules/DegreeDisciplineRule.test.d.mts +1 -0
  441. package/dist/tests/programmes/rules/DegreeDisciplineRule.test.mjs +169 -0
  442. package/dist/tests/programmes/rules/IndexableDegreeRule.test.d.mts +1 -0
  443. package/dist/tests/programmes/rules/IndexableDegreeRule.test.mjs +101 -0
  444. package/dist/tests/programmes/rules/IndexableDurationRule.test..d.mts +1 -0
  445. package/dist/tests/programmes/rules/IndexableDurationRule.test..mjs +25 -0
  446. package/dist/tests/programmes/rules/IndexableEducationalFormRule.test.d.mts +1 -0
  447. package/dist/tests/programmes/rules/IndexableEducationalFormRule.test.mjs +27 -0
  448. package/dist/tests/programmes/rules/IndexablePageNumberRule.test.d.mts +1 -0
  449. package/dist/tests/programmes/rules/IndexablePageNumberRule.test.mjs +51 -0
  450. package/dist/tests/programmes/rules/MbaDegreeRule.test.d.mts +1 -0
  451. package/dist/tests/programmes/rules/MbaDegreeRule.test.mjs +55 -0
  452. package/dist/tests/programmes/rules/MbaOrMscDegreeRule.test.d.mts +1 -0
  453. package/dist/tests/programmes/rules/MbaOrMscDegreeRule.test.mjs +53 -0
  454. package/dist/tests/programmes/rules/MinimumAmountOfResultsRule.test.d.mts +1 -0
  455. package/dist/tests/programmes/rules/MinimumAmountOfResultsRule.test.mjs +79 -0
  456. package/dist/tests/programmes/rules/NotDistanceLearningPortalRule.test.d.mts +1 -0
  457. package/dist/tests/programmes/rules/NotDistanceLearningPortalRule.test.mjs +57 -0
  458. package/dist/tests/programmes/rules/OneYearDurationRule.test..d.mts +1 -0
  459. package/dist/tests/programmes/rules/OneYearDurationRule.test..mjs +40 -0
  460. package/dist/tests/programmes/rules/OnlineAttendanceRule.test.d.mts +1 -0
  461. package/dist/tests/programmes/rules/OnlineAttendanceRule.test.mjs +69 -0
  462. package/dist/tests/programmes/rules/PartTimeFormatRule.test.d.mts +1 -0
  463. package/dist/tests/programmes/rules/PartTimeFormatRule.test.mjs +27 -0
  464. package/dist/tests/programmes/utils/SearchDependencies.util.d.mts +16 -0
  465. package/dist/tests/programmes/utils/SearchDependencies.util.mjs +73 -0
  466. package/dist/tests/programmes/utils/SitemapDependencies.util.d.mts +15 -0
  467. package/dist/tests/programmes/utils/SitemapDependencies.util.mjs +49 -0
  468. package/dist/tests/scholarships/policies/Area.test.d.mts +1 -0
  469. package/dist/tests/scholarships/policies/Area.test.mjs +121 -0
  470. package/dist/tests/scholarships/policies/Country.test.d.mts +1 -0
  471. package/dist/tests/scholarships/policies/Country.test.mjs +97 -0
  472. package/dist/tests/scholarships/policies/Discipline.test.d.mts +1 -0
  473. package/dist/tests/scholarships/policies/Discipline.test.mjs +93 -0
  474. package/dist/tests/scholarships/policies/DisciplineCountry.test.d.mts +1 -0
  475. package/dist/tests/scholarships/policies/DisciplineCountry.test.mjs +151 -0
  476. package/dist/tests/scholarships/policies/Unfiltered.test.d.mts +1 -0
  477. package/dist/tests/scholarships/policies/Unfiltered.test.mjs +44 -0
  478. package/dist/tests/scholarships/policies/UniversityCountry.test.d.mts +1 -0
  479. package/dist/tests/scholarships/policies/UniversityCountry.test.mjs +115 -0
  480. package/dist/tests/scholarships/rules/ExceptAustaliaAreasRule.test.d.mts +1 -0
  481. package/dist/tests/scholarships/rules/ExceptAustaliaAreasRule.test.mjs +64 -0
  482. package/dist/tests/scholarships/rules/SearchVolumeAreasRule.test.d.mts +1 -0
  483. package/dist/tests/scholarships/rules/SearchVolumeAreasRule.test.mjs +62 -0
  484. package/dist/tests/scholarships/rules/SearchVolumeCountriesDisciplinesRule.test.d.mts +1 -0
  485. package/dist/tests/scholarships/rules/SearchVolumeCountriesDisciplinesRule.test.mjs +114 -0
  486. package/dist/tests/scholarships/rules/SearchVolumeCountriesRule.test.d.mts +1 -0
  487. package/dist/tests/scholarships/rules/SearchVolumeCountriesRule.test.mjs +62 -0
  488. package/dist/tests/scholarships/rules/SearchVolumeDisciplinesRule.test.d.mts +1 -0
  489. package/dist/tests/scholarships/rules/SearchVolumeDisciplinesRule.test.mjs +62 -0
  490. package/dist/tests/scholarships/utils/SearchDependencies.util.d.mts +16 -0
  491. package/dist/tests/scholarships/utils/SearchDependencies.util.mjs +70 -0
  492. package/dist/tests/scholarships/utils/SitemapDependencies.util.d.mts +11 -0
  493. package/dist/tests/scholarships/utils/SitemapDependencies.util.mjs +33 -0
  494. package/dist/tests/sitemap-generator/BaseSitemapUrlGeneratorManager.test.d.mts +1 -0
  495. package/dist/tests/sitemap-generator/BaseSitemapUrlGeneratorManager.test.mjs +82 -0
  496. package/dist/tests/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.test.d.mts +1 -0
  497. package/dist/tests/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.test.mjs +85 -0
  498. package/dist/tests/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.test.d.mts +1 -0
  499. package/dist/tests/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.test.mjs +77 -0
  500. package/dist/tests/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.test.d.mts +1 -0
  501. package/dist/tests/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.test.mjs +60 -0
  502. package/dist/tests/structured-data/OrganisationStructuredDataFactory.test.d.mts +1 -0
  503. package/dist/tests/structured-data/OrganisationStructuredDataFactory.test.mjs +334 -0
  504. package/dist/tests/structured-data/ProgrammeStructuredDataFactory.test.d.mts +1 -0
  505. package/dist/tests/structured-data/ProgrammeStructuredDataFactory.test.mjs +562 -0
  506. package/dist/tests/structured-data/ScholarshipStructuredDataFactory.test.d.mts +1 -0
  507. package/dist/tests/structured-data/ScholarshipStructuredDataFactory.test.mjs +292 -0
  508. package/dist/tests/structured-data/SearchStructuredDataFactory.paywall.test.d.mts +1 -0
  509. package/dist/tests/structured-data/SearchStructuredDataFactory.paywall.test.mjs +258 -0
  510. package/package.json +1 -1
  511. package/dist/src/programmes/policies/AttendanceTuitionFee.d.ts +0 -17
  512. package/dist/src/programmes/policies/AttendanceTuitionFee.js +0 -51
  513. package/dist/src/programmes/policies/ContinentTuitionFee.d.ts +0 -16
  514. package/dist/src/programmes/policies/ContinentTuitionFee.js +0 -46
  515. package/dist/src/programmes/policies/CountryTuitionFee.d.ts +0 -16
  516. package/dist/src/programmes/policies/CountryTuitionFee.js +0 -46
  517. package/dist/src/programmes/policies/DegreeAreaTuitionFee.d.ts +0 -16
  518. package/dist/src/programmes/policies/DisciplineTuitionFee.js +0 -46
  519. package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.d.ts +0 -17
  520. package/dist/src/programmes/policies/DisciplineTuitionFeeAttendance.js +0 -54
@@ -0,0 +1,244 @@
1
+ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
2
+ import { FilterKey } from '@studyportals/search-filters/server-side';
3
+ import { SearchDependencies } from '../utils/SearchDependencies.util.mjs';
4
+ import { SitemapDependencies } from '../utils/SitemapDependencies.util.mjs';
5
+ import { DisciplineCountry } from '@/programmes/policies/DisciplineCountry';
6
+ import { PortalType } from '@studyportals/domain-client';
7
+ import { DisciplinePresenter } from '@/presenters/DisciplinePresenter';
8
+ import { CountryPresenter } from '@/presenters/CountryPresenter';
9
+ describe('Policy:DisciplineCountry', () => {
10
+ describe('shouldIndex', () => {
11
+ let searchDependenciesHelper;
12
+ let disciplineCountryPolicy;
13
+ beforeEach(() => {
14
+ searchDependenciesHelper = new SearchDependencies();
15
+ disciplineCountryPolicy = new DisciplineCountry(searchDependenciesHelper.dependencies);
16
+ searchDependenciesHelper.setResultsCount(10);
17
+ searchDependenciesHelper.setPageNumber(1);
18
+ searchDependenciesHelper.setPortalType(PortalType.PHD);
19
+ });
20
+ it('Should return true when all conditions are met', async () => {
21
+ const disciplineId = '54'; // Agriculture & Forestry
22
+ const countryId = '30'; // UK
23
+ searchDependenciesHelper.setFilterKeyValues(new Map([
24
+ [FilterKey.DISCIPLINES, [disciplineId]],
25
+ [FilterKey.COUNTRY, [countryId]]
26
+ ]));
27
+ const result = await disciplineCountryPolicy.shouldIndex();
28
+ expect(result).toBe(true);
29
+ });
30
+ it('Should return false when multiple disciplines are selected', async () => {
31
+ const firstDisciplineId = '54'; // Agriculture & Forestry
32
+ const secondDisciplineId = '12'; // Applied Sciences & Professions
33
+ const countryId = '30'; // UK
34
+ searchDependenciesHelper.setFilterKeyValues(new Map([
35
+ [FilterKey.DISCIPLINES, [firstDisciplineId, secondDisciplineId]],
36
+ [FilterKey.COUNTRY, [countryId]]
37
+ ]));
38
+ const result = await disciplineCountryPolicy.shouldIndex();
39
+ expect(result).toBe(false);
40
+ });
41
+ it('Should return false when multiple countries are selected', async () => {
42
+ const disciplineId = '54'; // Agriculture & Forestry
43
+ const firstCountryId = '30'; // UK
44
+ const secondCountryId = '82'; // USA
45
+ searchDependenciesHelper.setFilterKeyValues(new Map([
46
+ [FilterKey.DISCIPLINES, [disciplineId]],
47
+ [FilterKey.COUNTRY, [firstCountryId, secondCountryId]]
48
+ ]));
49
+ const result = await disciplineCountryPolicy.shouldIndex();
50
+ expect(result).toBe(false);
51
+ });
52
+ it('Should return false when no disciplines are selected', async () => {
53
+ const countryId = '30'; // UK
54
+ searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.COUNTRY, [countryId]]]));
55
+ const result = await disciplineCountryPolicy.shouldIndex();
56
+ expect(result).toBe(false);
57
+ });
58
+ it('Should return false when no countries are selected', async () => {
59
+ const disciplineId = '54'; // Agriculture & Forestry
60
+ searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [disciplineId]]]));
61
+ const result = await disciplineCountryPolicy.shouldIndex();
62
+ expect(result).toBe(false);
63
+ });
64
+ it('Should return false when other filters are selected', async () => {
65
+ const disciplineId = '54'; // Agriculture & Forestry
66
+ const countryId = '30'; // UK
67
+ const areaId = '996';
68
+ searchDependenciesHelper.setFilterKeyValues(new Map([
69
+ [FilterKey.COUNTRY, [countryId]],
70
+ [FilterKey.DISCIPLINES, [disciplineId]],
71
+ [FilterKey.AREA, [areaId]]
72
+ ]));
73
+ const result = await disciplineCountryPolicy.shouldIndex();
74
+ expect(result).toBe(false);
75
+ });
76
+ it('Should return false when number of results is less than 7', async () => {
77
+ const disciplineId = '54'; // Agriculture & Forestry
78
+ const countryId = '30'; // UK
79
+ searchDependenciesHelper.setResultsCount(6);
80
+ searchDependenciesHelper.setFilterKeyValues(new Map([
81
+ [FilterKey.DISCIPLINES, [disciplineId]],
82
+ [FilterKey.COUNTRY, [countryId]]
83
+ ]));
84
+ const result = await disciplineCountryPolicy.shouldIndex();
85
+ expect(result).toBe(false);
86
+ });
87
+ it('Should return false when page number is higher than 2', async () => {
88
+ const disciplineId = '54'; // Agriculture & Forestry
89
+ const countryId = '30'; // UK
90
+ searchDependenciesHelper.setPageNumber(5);
91
+ searchDependenciesHelper.setFilterKeyValues(new Map([
92
+ [FilterKey.DISCIPLINES, [disciplineId]],
93
+ [FilterKey.COUNTRY, [countryId]]
94
+ ]));
95
+ const result = await disciplineCountryPolicy.shouldIndex();
96
+ expect(result).toBe(false);
97
+ });
98
+ it('Should return false when portal type is distance learning', async () => {
99
+ const disciplineId = '54'; // Agriculture & Forestry
100
+ const countryId = '30'; // UK
101
+ searchDependenciesHelper.setPortalType(PortalType.DISTANCE_LEARNING);
102
+ searchDependenciesHelper.setFilterKeyValues(new Map([
103
+ [FilterKey.DISCIPLINES, [disciplineId]],
104
+ [FilterKey.COUNTRY, [countryId]]
105
+ ]));
106
+ const result = await disciplineCountryPolicy.shouldIndex();
107
+ expect(result).toBe(false);
108
+ });
109
+ });
110
+ describe('generateUrls', () => {
111
+ let sitemapDependenciesHelper;
112
+ let disciplineCountryPolicy;
113
+ beforeEach(() => {
114
+ sitemapDependenciesHelper = new SitemapDependencies();
115
+ sitemapDependenciesHelper.setProgrammeCount(10); // More than 7 programs
116
+ disciplineCountryPolicy = new DisciplineCountry(sitemapDependenciesHelper.dependencies);
117
+ DisciplinePresenter.getInstance = vi.fn().mockReturnValue({
118
+ getFragments: vi.fn().mockReturnValue([
119
+ { id: '54', path: 'agriculture-forestry' },
120
+ { id: '12', path: 'applied-sciences' },
121
+ { id: '152', path: 'computer-science-it' }
122
+ ])
123
+ });
124
+ CountryPresenter.getInstance = vi.fn().mockReturnValue({
125
+ getFragments: vi.fn().mockReturnValue([
126
+ { id: '30', path: 'uk' },
127
+ { id: '202', path: 'australia' },
128
+ { id: '56', path: 'usa' }
129
+ ])
130
+ });
131
+ });
132
+ afterEach(() => {
133
+ sitemapDependenciesHelper.resetMocks();
134
+ });
135
+ it('Should generate URLs for all valid discipline-country combinations', async () => {
136
+ // Mock the checkRulesForSitemap to return true for all combinations
137
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
138
+ // Call the method via reflection since it's protected
139
+ const urls = await disciplineCountryPolicy.generateUrls();
140
+ // The total number of URLs should be the product of the number of disciplines and countries
141
+ // 3 disciplines × 3 countries x 2 pages = 18 URLs
142
+ expect(urls).toHaveLength(9);
143
+ // Verify some specific combinations
144
+ expect(urls).toContain('agriculture-forestry/uk');
145
+ expect(urls).toContain('computer-science-it/australia');
146
+ expect(urls).toContain('applied-sciences/usa');
147
+ });
148
+ it('Should exclude specific discipline-country combinations based on rules', async () => {
149
+ // Create a map that returns false for specific combinations
150
+ const resultMap = new Map([
151
+ // Exclude agriculture from UK
152
+ [`${FilterKey.DISCIPLINES}:54|${FilterKey.COUNTRY}:30`, false],
153
+ // Exclude applied sciences from Australia
154
+ [`${FilterKey.DISCIPLINES}:12|${FilterKey.COUNTRY}:202`, false],
155
+ // Exclude computer science from USA
156
+ [`${FilterKey.DISCIPLINES}:152|${FilterKey.COUNTRY}:56`, false]
157
+ ]);
158
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
159
+ const urls = await disciplineCountryPolicy.generateUrls();
160
+ // Should include all combinations except the excluded ones, so 9 - 3 * 2 = 12
161
+ expect(urls).toHaveLength(6);
162
+ // Verify excluded combinations
163
+ expect(urls).not.toContain('agriculture-forestry/uk');
164
+ expect(urls).not.toContain('applied-sciences/australia');
165
+ expect(urls).not.toContain('computer-science-it/usa');
166
+ // Verify included combinations
167
+ expect(urls).toContain('agriculture-forestry/australia');
168
+ expect(urls).toContain('applied-sciences/uk');
169
+ expect(urls).toContain('computer-science-it/uk');
170
+ });
171
+ it('Should exclude all URLs when all rule checks fail', async () => {
172
+ // Create a map that returns false for all combinations
173
+ const resultMap = new Map();
174
+ for (const discipline of ['54', '12', '152']) {
175
+ for (const country of ['30', '202', '56']) {
176
+ const key = `${FilterKey.DISCIPLINES}:${discipline}|${FilterKey.COUNTRY}:${country}`;
177
+ resultMap.set(key, false);
178
+ }
179
+ }
180
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
181
+ const urls = await disciplineCountryPolicy.generateUrls();
182
+ // Should include no URLs
183
+ expect(urls).toHaveLength(0);
184
+ });
185
+ it('Should handle empty discipline fragments', async () => {
186
+ // Mock the DisciplinePresenter to return empty fragments
187
+ DisciplinePresenter.getInstance.mockReturnValueOnce({
188
+ getFragments: vi.fn().mockReturnValue([])
189
+ });
190
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
191
+ const urls = await disciplineCountryPolicy.generateUrls();
192
+ // Should return empty array
193
+ expect(urls).toHaveLength(0);
194
+ });
195
+ it('Should handle empty country fragments', async () => {
196
+ // Mock the CountryPresenter to return empty fragments
197
+ CountryPresenter.getInstance.mockReturnValueOnce({
198
+ getFragments: vi.fn().mockReturnValue([])
199
+ });
200
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
201
+ const urls = await disciplineCountryPolicy.generateUrls();
202
+ // Should return empty array
203
+ expect(urls).toHaveLength(0);
204
+ });
205
+ it('Should handle performance with large number of combinations', async () => {
206
+ // Generate larger datasets for testing
207
+ const largeDisciplineSet = Array.from({ length: 20 }, (_, index) => ({
208
+ id: `discipline-${index}`,
209
+ path: `discipline-path-${index}`
210
+ }));
211
+ const largeCountrySet = Array.from({ length: 15 }, (_, index) => ({
212
+ id: `country-${index}`,
213
+ path: `country-path-${index}`
214
+ }));
215
+ // Override mocks with large datasets
216
+ DisciplinePresenter.getInstance.mockReturnValueOnce({
217
+ getFragments: vi.fn().mockReturnValue(largeDisciplineSet)
218
+ });
219
+ CountryPresenter.getInstance.mockReturnValueOnce({
220
+ getFragments: vi.fn().mockReturnValue(largeCountrySet)
221
+ });
222
+ // Mock to allow only combinations where both discipline and country indices are even
223
+ const resultMap = new Map();
224
+ for (let d = 0; d < largeDisciplineSet.length; d++) {
225
+ for (let c = 0; c < largeCountrySet.length; c++) {
226
+ const disciplineId = largeDisciplineSet[d].id;
227
+ const countryId = largeCountrySet[c].id;
228
+ const key = `${FilterKey.DISCIPLINES}:${disciplineId}|${FilterKey.COUNTRY}:${countryId}`;
229
+ resultMap.set(key, d % 2 === 0 && c % 2 === 0);
230
+ }
231
+ }
232
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
233
+ const urls = await disciplineCountryPolicy.generateUrls();
234
+ // Calculate expected count: 10 disciplines (even indices) * 8 countries (even indices) * 2 pages
235
+ // = 10 * 8 * 2 = 160 URLs
236
+ expect(urls).toHaveLength(80);
237
+ // Test specific items
238
+ expect(urls).toContain('discipline-path-0/country-path-0'); // Both even indices
239
+ expect(urls).toContain('discipline-path-2/country-path-4'); // Both even indices
240
+ expect(urls).not.toContain('discipline-path-1/country-path-0'); // Odd discipline index
241
+ expect(urls).not.toContain('discipline-path-0/country-path-1'); // Odd country index
242
+ });
243
+ });
244
+ });
@@ -0,0 +1,345 @@
1
+ import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
2
+ import { PortalType } from '@studyportals/domain-client';
3
+ import { FilterKey } from '@studyportals/search-filters/server-side';
4
+ import { SearchDependencies } from '../utils/SearchDependencies.util.mjs';
5
+ import { SitemapDependencies } from '../utils/SitemapDependencies.util.mjs';
6
+ import { DisciplineCountryEducationalForm } from '@/programmes/policies/DisciplineCountryEducationalForm';
7
+ import { DisciplinePresenter } from '@/presenters/DisciplinePresenter';
8
+ import { CountryPresenter } from '@/presenters/CountryPresenter';
9
+ import { EducationalFormPresenter } from '@/presenters/EducationalFormPresenter';
10
+ describe('Policy:DisciplineCountryEducationalForm', () => {
11
+ describe('shouldIndex', () => {
12
+ let searchDependenciesHelper;
13
+ let disciplineCountryEducationalForm;
14
+ beforeEach(() => {
15
+ searchDependenciesHelper = new SearchDependencies();
16
+ disciplineCountryEducationalForm = new DisciplineCountryEducationalForm(searchDependenciesHelper.dependencies);
17
+ searchDependenciesHelper.setResultsCount(7);
18
+ searchDependenciesHelper.setPageNumber(1);
19
+ searchDependenciesHelper.setPortalType(PortalType.SHORT);
20
+ });
21
+ it('Should return true when all conditions are met', async () => {
22
+ const disciplineId = '54'; // Agriculture & Forestry
23
+ const countryId = '30'; // UK
24
+ const educationalForm = 'academic';
25
+ searchDependenciesHelper.setFilterKeyValues(new Map([
26
+ [FilterKey.DISCIPLINES, [disciplineId]],
27
+ [FilterKey.COUNTRY, [countryId]],
28
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
29
+ ]));
30
+ const result = await disciplineCountryEducationalForm.shouldIndex();
31
+ expect(result).toBe(true);
32
+ });
33
+ it('Should return false when multiple disciplines are selected', async () => {
34
+ const firstDisciplineId = '54'; // Agriculture & Forestry
35
+ const secondDisciplineId = '12'; // Applied Sciences & Professions
36
+ const countryId = '30'; // UK
37
+ const educationalForm = 'academic';
38
+ searchDependenciesHelper.setFilterKeyValues(new Map([
39
+ [FilterKey.DISCIPLINES, [firstDisciplineId, secondDisciplineId]],
40
+ [FilterKey.COUNTRY, [countryId]],
41
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
42
+ ]));
43
+ const result = await disciplineCountryEducationalForm.shouldIndex();
44
+ expect(result).toBe(false);
45
+ });
46
+ it('Should return false when multiple countries are selected', async () => {
47
+ const disciplineId = '54'; // Agriculture & Forestry
48
+ const firstCountryId = '30'; // UK
49
+ const secondCountryId = '82'; // US
50
+ const educationalForm = 'semester';
51
+ searchDependenciesHelper.setFilterKeyValues(new Map([
52
+ [FilterKey.DISCIPLINES, [disciplineId]],
53
+ [FilterKey.COUNTRY, [firstCountryId, secondCountryId]],
54
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
55
+ ]));
56
+ const result = await disciplineCountryEducationalForm.shouldIndex();
57
+ expect(result).toBe(false);
58
+ });
59
+ it('Should return false when multiple educational form values are selected', async () => {
60
+ const disciplineId = '54'; // Agriculture & Forestry
61
+ const countryId = '30'; // UK
62
+ const firstEducationalForm = 'academic';
63
+ const secondEducationaForm = 'semester';
64
+ searchDependenciesHelper.setFilterKeyValues(new Map([
65
+ [FilterKey.DISCIPLINES, [disciplineId]],
66
+ [FilterKey.COUNTRY, [countryId]],
67
+ [FilterKey.EDUCATIONAL_FORM, [firstEducationalForm, secondEducationaForm]]
68
+ ]));
69
+ const result = await disciplineCountryEducationalForm.shouldIndex();
70
+ expect(result).toBe(false);
71
+ });
72
+ it('Should return false when no disciplines are selected', async () => {
73
+ const countryId = '30'; // UK
74
+ const educationalForm = 'academic';
75
+ searchDependenciesHelper.setFilterKeyValues(new Map([
76
+ [FilterKey.COUNTRY, [countryId]],
77
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
78
+ ]));
79
+ const result = await disciplineCountryEducationalForm.shouldIndex();
80
+ expect(result).toBe(false);
81
+ });
82
+ it('Should return false when no country is selected', async () => {
83
+ const disciplineId = '54'; // Agriculture & Forestry
84
+ const educationalForm = 'academic';
85
+ searchDependenciesHelper.setFilterKeyValues(new Map([
86
+ [FilterKey.DISCIPLINES, [disciplineId]],
87
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
88
+ ]));
89
+ const result = await disciplineCountryEducationalForm.shouldIndex();
90
+ expect(result).toBe(false);
91
+ });
92
+ it('Should return false when no educational form value is selected', async () => {
93
+ const disciplineId = '54'; // Agriculture & Forestry
94
+ const countryId = '82'; // US
95
+ searchDependenciesHelper.setFilterKeyValues(new Map([
96
+ [FilterKey.DISCIPLINES, [disciplineId]],
97
+ [FilterKey.COUNTRY, [countryId]]
98
+ ]));
99
+ const result = await disciplineCountryEducationalForm.shouldIndex();
100
+ expect(result).toBe(false);
101
+ });
102
+ it('Should return false when other filters are selected', async () => {
103
+ const disciplineId = '54'; // Agriculture & Forestry
104
+ const educationalForm = 'academic';
105
+ const countryId = '82'; // US
106
+ const tuitionFee = '[0,2500]'; // Affordable
107
+ searchDependenciesHelper.setFilterKeyValues(new Map([
108
+ [FilterKey.DISCIPLINES, [disciplineId]],
109
+ [FilterKey.TUITION_FEE, [tuitionFee]],
110
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]],
111
+ [FilterKey.COUNTRY, [countryId]]
112
+ ]));
113
+ const result = await disciplineCountryEducationalForm.shouldIndex();
114
+ expect(result).toBe(false);
115
+ });
116
+ it('Should return false when educational form is not indexable (i.e. Winter School)', async () => {
117
+ const disciplineId = '54'; // Agriculture & Forestry
118
+ const countryId = '30'; // UK
119
+ const educationalForm = 'winter_school';
120
+ searchDependenciesHelper.setFilterKeyValues(new Map([
121
+ [FilterKey.DISCIPLINES, [disciplineId]],
122
+ [FilterKey.COUNTRY, [countryId]],
123
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
124
+ ]));
125
+ const result = await disciplineCountryEducationalForm.shouldIndex();
126
+ expect(result).toBe(false);
127
+ });
128
+ it('Should return false when number of results is less than 7', async () => {
129
+ const disciplineId = '54'; // Agriculture & Forestry
130
+ const countryId = '30'; // UK
131
+ const educationalForm = 'semester';
132
+ searchDependenciesHelper.setResultsCount(5);
133
+ searchDependenciesHelper.setFilterKeyValues(new Map([
134
+ [FilterKey.DISCIPLINES, [disciplineId]],
135
+ [FilterKey.COUNTRY, [countryId]],
136
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
137
+ ]));
138
+ const result = await disciplineCountryEducationalForm.shouldIndex();
139
+ expect(result).toBe(false);
140
+ });
141
+ it('Should return false when page number is higher than 2', async () => {
142
+ const disciplineId = '54'; // Agriculture & Forestry
143
+ const countryId = '30'; // UK
144
+ const educationalForm = 'academic';
145
+ searchDependenciesHelper.setPageNumber(15);
146
+ searchDependenciesHelper.setFilterKeyValues(new Map([
147
+ [FilterKey.DISCIPLINES, [disciplineId]],
148
+ [FilterKey.COUNTRY, [countryId]],
149
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
150
+ ]));
151
+ const result = await disciplineCountryEducationalForm.shouldIndex();
152
+ expect(result).toBe(false);
153
+ });
154
+ it('Should return false when portal is distance learning', async () => {
155
+ const disciplineId = '54'; // Agriculture & Forestry
156
+ const countryId = '30'; // UK
157
+ const educationalForm = 'academic';
158
+ searchDependenciesHelper.setPortalType(PortalType.DISTANCE_LEARNING);
159
+ searchDependenciesHelper.setFilterKeyValues(new Map([
160
+ [FilterKey.DISCIPLINES, [disciplineId]],
161
+ [FilterKey.COUNTRY, [countryId]],
162
+ [FilterKey.EDUCATIONAL_FORM, [educationalForm]]
163
+ ]));
164
+ const result = await disciplineCountryEducationalForm.shouldIndex();
165
+ expect(result).toBe(false);
166
+ });
167
+ });
168
+ describe('generateUrls', () => {
169
+ let sitemapDependenciesHelper;
170
+ let disciplineCountryEducationalForm;
171
+ beforeEach(() => {
172
+ sitemapDependenciesHelper = new SitemapDependencies();
173
+ sitemapDependenciesHelper.setProgrammeCount(10); // More than 7 programs
174
+ disciplineCountryEducationalForm = new DisciplineCountryEducationalForm(sitemapDependenciesHelper.dependencies);
175
+ DisciplinePresenter.getInstance = vi.fn().mockReturnValue({
176
+ getFragments: vi.fn().mockReturnValue([
177
+ { id: '54', path: 'agriculture-forestry' },
178
+ { id: '12', path: 'applied-sciences' }
179
+ ])
180
+ });
181
+ CountryPresenter.getInstance = vi.fn().mockReturnValue({
182
+ getFragments: vi.fn().mockReturnValue([
183
+ { id: '30', path: 'uk' },
184
+ { id: '56', path: 'usa' }
185
+ ])
186
+ });
187
+ EducationalFormPresenter.getInstance = vi.fn().mockReturnValue({
188
+ getFragments: vi.fn().mockReturnValue([
189
+ { id: 'academic', path: 'academic' },
190
+ { id: 'summer_school', path: 'summer-courses' },
191
+ { id: 'semester', path: 'semester' },
192
+ { id: 'skill', path: 'professional-courses' },
193
+ { id: 'winter_school', path: 'winter-school' }
194
+ ])
195
+ });
196
+ });
197
+ afterEach(() => {
198
+ sitemapDependenciesHelper.resetMocks();
199
+ });
200
+ it('Should generate URLs for valid discipline-country-educational form combinations', async () => {
201
+ const resultMap = new Map();
202
+ for (const discipline of ['54', '12']) {
203
+ for (const country of ['30', '56']) {
204
+ for (const form of ['academic', 'summer_school', 'semester', 'skill', 'winter_school']) {
205
+ const key = `${FilterKey.DISCIPLINES}:${discipline}|${FilterKey.COUNTRY}:${country}|${FilterKey.EDUCATIONAL_FORM}:${form}`;
206
+ // Only these forms should pass (exclude winter_school)
207
+ resultMap.set(key, ['academic', 'summer_school', 'semester', 'skill'].includes(form));
208
+ }
209
+ }
210
+ }
211
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap, false);
212
+ // Call the method via reflection since it's protected
213
+ const urls = await disciplineCountryEducationalForm.generateUrls();
214
+ // Calculate expected URLs: 2 disciplines * 2 countries * 4 indexable forms * 2 pages = 32 URLs
215
+ expect(urls).toHaveLength(16);
216
+ // Verify some valid combinations
217
+ expect(urls).toContain('agriculture-forestry/academic/uk');
218
+ expect(urls).toContain('agriculture-forestry/summer-courses/uk');
219
+ expect(urls).toContain('applied-sciences/academic/usa');
220
+ // Verify non-indexable forms are excluded
221
+ expect(urls).not.toContain('agriculture-forestry/winter-courses/uk');
222
+ expect(urls).not.toContain('applied-sciences/winter-courses/usa');
223
+ });
224
+ it('Should exclude specific discipline-country-educational form combinations based on rules', async () => {
225
+ // Create a map that returns false for specific combinations
226
+ const resultMap = new Map();
227
+ // Only allow academic form with UK but not with USA
228
+ for (const discipline of ['54', '12']) {
229
+ for (const country of ['30', '82']) {
230
+ for (const form of ['academic', 'summer_school', 'semester', 'skill', 'winter_school']) {
231
+ const key = `${FilterKey.DISCIPLINES}:${discipline}|${FilterKey.COUNTRY}:${country}|${FilterKey.EDUCATIONAL_FORM}:${form}`;
232
+ // Only academic form with UK should pass
233
+ resultMap.set(key, form === 'academic' && country === '30');
234
+ }
235
+ }
236
+ }
237
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap, false);
238
+ const urls = await disciplineCountryEducationalForm.generateUrls();
239
+ // Calculate expected URLs: 2 disciplines * 1 country (UK) * 1 form (academic) * 2 pages = 4 URLs
240
+ expect(urls).toHaveLength(2);
241
+ // Verify included combinations
242
+ expect(urls).toContain('agriculture-forestry/academic/uk');
243
+ expect(urls).toContain('applied-sciences/academic/uk');
244
+ // Verify excluded combinations
245
+ expect(urls).not.toContain('agriculture-forestry/academic/usa');
246
+ expect(urls).not.toContain('applied-sciences/summer-courses/uk');
247
+ });
248
+ it('Should exclude all URLs when all rule checks fail', async () => {
249
+ // Create a map that returns false for all combinations
250
+ const resultMap = new Map();
251
+ for (const discipline of ['54', '12']) {
252
+ for (const country of ['30', '82']) {
253
+ for (const form of ['academic', 'summer_school', 'semester', 'skill', 'winter_school']) {
254
+ const key = `${FilterKey.DISCIPLINES}:${discipline}|${FilterKey.COUNTRY}:${country}|${FilterKey.EDUCATIONAL_FORM}:${form}`;
255
+ resultMap.set(key, false);
256
+ }
257
+ }
258
+ }
259
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap, false);
260
+ const urls = await disciplineCountryEducationalForm.generateUrls();
261
+ // Should include no URLs
262
+ expect(urls).toHaveLength(0);
263
+ });
264
+ it('Should handle empty discipline fragments', async () => {
265
+ // Mock the DisciplinePresenter to return empty fragments
266
+ DisciplinePresenter.getInstance.mockReturnValueOnce({
267
+ getFragments: vi.fn().mockReturnValue([])
268
+ });
269
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
270
+ const urls = await disciplineCountryEducationalForm.generateUrls();
271
+ // Should return empty array
272
+ expect(urls).toHaveLength(0);
273
+ });
274
+ it('Should handle empty country fragments', async () => {
275
+ // Mock the CountryPresenter to return empty fragments
276
+ CountryPresenter.getInstance.mockReturnValueOnce({
277
+ getFragments: vi.fn().mockReturnValue([])
278
+ });
279
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
280
+ const urls = await disciplineCountryEducationalForm.generateUrls();
281
+ // Should return empty array
282
+ expect(urls).toHaveLength(0);
283
+ });
284
+ it('Should handle empty educational form fragments', async () => {
285
+ // Mock the EducationalFormPresenter to return empty fragments
286
+ EducationalFormPresenter.getInstance.mockReturnValueOnce({
287
+ getFragments: vi.fn().mockReturnValue([])
288
+ });
289
+ sitemapDependenciesHelper.mockCheckRulesForSitemap();
290
+ const urls = await disciplineCountryEducationalForm.generateUrls();
291
+ // Should return empty array
292
+ expect(urls).toHaveLength(0);
293
+ });
294
+ it('Should handle performance with large number of combinations', async () => {
295
+ // Generate larger datasets for testing
296
+ const largeDisciplineSet = Array.from({ length: 5 }, (_, index) => ({
297
+ id: `discipline-${index}`,
298
+ path: `discipline-path-${index}`
299
+ }));
300
+ const largeCountrySet = Array.from({ length: 5 }, (_, index) => ({
301
+ id: `country-${index}`,
302
+ path: `country-path-${index}`
303
+ }));
304
+ const largeEducationalFormSet = Array.from({ length: 5 }, (_, index) => ({
305
+ id: `form-${index}`,
306
+ path: `form-path-${index}`
307
+ }));
308
+ // Override mocks with large datasets
309
+ DisciplinePresenter.getInstance.mockReturnValueOnce({
310
+ getFragments: vi.fn().mockReturnValue(largeDisciplineSet)
311
+ });
312
+ CountryPresenter.getInstance.mockReturnValueOnce({
313
+ getFragments: vi.fn().mockReturnValue(largeCountrySet)
314
+ });
315
+ EducationalFormPresenter.getInstance.mockReturnValueOnce({
316
+ getFragments: vi.fn().mockReturnValue(largeEducationalFormSet)
317
+ });
318
+ // Mock to only allow combinations where discipline index is even,
319
+ // country index is less than 3, and educational form index is 0-2
320
+ const resultMap = new Map();
321
+ for (let d = 0; d < largeDisciplineSet.length; d++) {
322
+ for (let c = 0; c < largeCountrySet.length; c++) {
323
+ for (let f = 0; f < largeEducationalFormSet.length; f++) {
324
+ const disciplineId = largeDisciplineSet[d].id;
325
+ const countryId = largeCountrySet[c].id;
326
+ const formId = largeEducationalFormSet[f].id;
327
+ const key = `${FilterKey.DISCIPLINES}:${disciplineId}|${FilterKey.COUNTRY}:${countryId}|${FilterKey.EDUCATIONAL_FORM}:${formId}`;
328
+ resultMap.set(key, d % 2 === 0 && c < 3 && f <= 2);
329
+ }
330
+ }
331
+ }
332
+ sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
333
+ const urls = await disciplineCountryEducationalForm.generateUrls();
334
+ // Calculate expected count: 3 disciplines (even indices) * 3 countries (0-2) * 3 forms (0-2) * 2 pages
335
+ // = 3 * 3 * 3 * 2 = 54 URLs
336
+ expect(urls).toHaveLength(27);
337
+ // Test specific items
338
+ expect(urls).toContain('discipline-path-0/form-path-0/country-path-0');
339
+ expect(urls).toContain('discipline-path-2/form-path-1/country-path-1');
340
+ expect(urls).not.toContain('discipline-path-1/form-path-0/country-path-0'); // Odd discipline
341
+ expect(urls).not.toContain('discipline-path-0/form-path-0/country-path-3'); // Country index >= 3
342
+ expect(urls).not.toContain('discipline-path-0/form-path-3/country-path-0'); // Form index > 2
343
+ });
344
+ });
345
+ });