@studyportals/fawkes 8.7.1-0 → 8.7.1
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.
- package/dist/organisations-seo/index.d.ts +3 -3
- package/dist/organisations-seo/index.js +1 -1
- package/dist/programmes-seo/index.d.ts +5 -5
- package/dist/programmes-seo/index.js +1 -1
- package/dist/scholarships-seo/index.d.ts +4 -4
- package/dist/scholarships-seo/index.js +2 -2
- package/dist/sitemap-generator-seo/index.d.ts +14 -14
- package/dist/sitemap-generator-seo/index.js +5 -5
- package/dist/src/common/IDependencies.d.ts +1 -1
- package/dist/src/common/IPresenter.d.ts +1 -1
- package/dist/src/common/ISearchDependencies.d.ts +1 -1
- package/dist/src/common/ISeoDependencies.d.ts +2 -2
- package/dist/src/common/ISitemapDependencies.d.ts +2 -2
- package/dist/src/common/ISitemapUrlGenerator.d.ts +1 -1
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.d.ts +1 -1
- package/dist/src/common/policies/BaseSeoIndexabilityPolicy.js +2 -2
- package/dist/src/common/rules/NoFiltersSelectedRule.d.ts +2 -2
- package/dist/src/common/rules/OnlineAttendanceRule.d.ts +1 -1
- package/dist/src/common/rules/OnlineAttendanceRule.js +1 -1
- package/dist/src/common/rules/OnlyFiltersSelectedRule.d.ts +2 -2
- package/dist/src/common/rules/SingleValueSelectedForFilterRule.d.ts +2 -2
- package/dist/src/organisations/IOrganisationSearchApplicationState.d.ts +1 -1
- package/dist/src/organisations/ISeoSortingState.d.ts +1 -1
- package/dist/src/organisations/SearchIndexabilityManager.d.ts +4 -4
- package/dist/src/organisations/SearchIndexabilityManager.js +2 -2
- package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.d.ts +3 -3
- package/dist/src/organisations/policies/OrganisationsSeoIndexabilityPolicy.js +3 -3
- package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.d.ts +1 -1
- package/dist/src/organisations/policies/RankedOrganisationsSeoIndexabilityPolicy.js +1 -1
- package/dist/src/organisations/policies/our-picks/Area.d.ts +5 -5
- package/dist/src/organisations/policies/our-picks/Area.js +6 -6
- package/dist/src/organisations/policies/our-picks/AreaAttendance.d.ts +7 -7
- package/dist/src/organisations/policies/our-picks/AreaAttendance.js +9 -9
- package/dist/src/organisations/policies/our-picks/Attendance.d.ts +6 -6
- package/dist/src/organisations/policies/our-picks/Attendance.js +7 -7
- package/dist/src/organisations/policies/our-picks/Continent.d.ts +5 -5
- package/dist/src/organisations/policies/our-picks/Continent.js +6 -6
- package/dist/src/organisations/policies/our-picks/Country.d.ts +5 -5
- package/dist/src/organisations/policies/our-picks/Country.js +6 -6
- package/dist/src/organisations/policies/our-picks/CountryAreaCity.d.ts +6 -6
- package/dist/src/organisations/policies/our-picks/CountryAreaCity.js +7 -7
- package/dist/src/organisations/policies/our-picks/CountryAttendance.d.ts +7 -7
- package/dist/src/organisations/policies/our-picks/CountryAttendance.js +9 -9
- package/dist/src/organisations/policies/our-picks/CountryCity.d.ts +6 -6
- package/dist/src/organisations/policies/our-picks/CountryCity.js +7 -7
- package/dist/src/organisations/policies/our-picks/Unfiltered.d.ts +4 -4
- package/dist/src/organisations/policies/our-picks/Unfiltered.js +4 -4
- package/dist/src/organisations/policies/ranked/RankedArea.d.ts +4 -4
- package/dist/src/organisations/policies/ranked/RankedArea.js +4 -4
- package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.d.ts +5 -5
- package/dist/src/organisations/policies/ranked/RankedAreaDiscipline.js +6 -6
- package/dist/src/organisations/policies/ranked/RankedAttendance.d.ts +5 -5
- package/dist/src/organisations/policies/ranked/RankedAttendance.js +5 -5
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.d.ts +5 -5
- package/dist/src/organisations/policies/ranked/RankedAttendanceDiscipline.js +6 -6
- package/dist/src/organisations/policies/ranked/RankedContinent.d.ts +4 -4
- package/dist/src/organisations/policies/ranked/RankedContinent.js +4 -4
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.d.ts +6 -6
- package/dist/src/organisations/policies/ranked/RankedContinentAttendance.js +7 -7
- package/dist/src/organisations/policies/ranked/RankedCountry.d.ts +4 -4
- package/dist/src/organisations/policies/ranked/RankedCountry.js +4 -4
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.d.ts +5 -5
- package/dist/src/organisations/policies/ranked/RankedCountryAttendance.js +6 -6
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.d.ts +4 -4
- package/dist/src/organisations/policies/ranked/RankedCountryDiscipline.js +5 -5
- package/dist/src/organisations/policies/ranked/RankedDiscipline.d.ts +4 -4
- package/dist/src/organisations/policies/ranked/RankedDiscipline.js +4 -4
- package/dist/src/organisations/policies/ranked/RankedUnfiltered.d.ts +3 -3
- package/dist/src/organisations/policies/ranked/RankedUnfiltered.js +2 -2
- package/dist/src/organisations/rules/BaseSearchVolumeOrganisationsRule.d.ts +3 -3
- package/dist/src/organisations/rules/ContinentIsEuropeRule.d.ts +1 -1
- package/dist/src/organisations/rules/ContinentIsEuropeRule.js +1 -1
- package/dist/src/organisations/rules/ExcludeByIdForCitiesRule.d.ts +3 -3
- package/dist/src/organisations/rules/MinimumAmountOfRankedResultsRule.d.ts +3 -3
- package/dist/src/organisations/rules/MinimumAmountOfRankedResultsRule.js +1 -1
- package/dist/src/organisations/rules/MinimumAmountOfResultsRule.d.ts +4 -4
- package/dist/src/organisations/rules/MinimumAmountOfResultsRule.js +1 -1
- package/dist/src/organisations/rules/NoFiltersSelectedRule.d.ts +2 -2
- package/dist/src/organisations/types/IOrganisationSearchDependencies.d.ts +2 -2
- package/dist/src/organisations/types/IOrganisationsSitemapDependencies.d.ts +3 -3
- package/dist/src/presenters/AreaPresenter.d.ts +1 -1
- package/dist/src/presenters/AttendancePresenter.d.ts +1 -1
- package/dist/src/presenters/CityPresenter.d.ts +1 -1
- package/dist/src/presenters/ContinentPresenter.d.ts +1 -1
- package/dist/src/presenters/CountryPresenter.d.ts +1 -1
- package/dist/src/presenters/DegreePresenter.d.ts +1 -1
- package/dist/src/presenters/DisciplinePresenter.d.ts +1 -1
- package/dist/src/presenters/DurationPresenter.d.ts +1 -1
- package/dist/src/presenters/EducationalFormPresenter.d.ts +1 -1
- package/dist/src/presenters/FormatPresenter.d.ts +1 -1
- package/dist/src/presenters/SpecialProgrammesPresenter.d.ts +1 -1
- package/dist/src/presenters/TuitionFeePresenter.d.ts +1 -1
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.d.ts +2 -2
- package/dist/src/programmes/BaseProgrammeFilterKeyValueRule.js +1 -1
- package/dist/src/programmes/BaseProgrammeRule.d.ts +2 -2
- package/dist/src/programmes/IProgrammeRule.d.ts +2 -2
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.d.ts +3 -3
- package/dist/src/programmes/ProgrammesBaseIndexabilityPolicy.js +1 -1
- package/dist/src/programmes/SearchIndexabilityManager.d.ts +4 -4
- package/dist/src/programmes/SearchIndexabilityManager.js +1 -1
- package/dist/src/programmes/policies/Area.d.ts +3 -3
- package/dist/src/programmes/policies/Area.js +4 -4
- package/dist/src/programmes/policies/Attendance.d.ts +4 -4
- package/dist/src/programmes/policies/Attendance.js +5 -5
- package/dist/src/programmes/policies/AttendanceArea.d.ts +4 -4
- package/dist/src/programmes/policies/AttendanceArea.js +6 -6
- package/dist/src/programmes/policies/AttendanceContinent.d.ts +4 -4
- package/dist/src/programmes/policies/AttendanceContinent.js +6 -6
- package/dist/src/programmes/policies/AttendanceDegree.d.ts +2 -2
- package/dist/src/programmes/policies/AttendanceDegree.js +5 -5
- package/dist/src/programmes/policies/AttendanceDuration.d.ts +5 -5
- package/dist/src/programmes/policies/AttendanceDuration.js +7 -7
- package/dist/src/programmes/policies/AttendanceFormat.d.ts +4 -4
- package/dist/src/programmes/policies/AttendanceFormat.js +6 -6
- package/dist/src/programmes/policies/Continent.d.ts +3 -3
- package/dist/src/programmes/policies/Continent.js +4 -4
- package/dist/src/programmes/policies/ContinentDuration.d.ts +3 -3
- package/dist/src/programmes/policies/ContinentDuration.js +5 -5
- package/dist/src/programmes/policies/ContinentFormat.d.ts +3 -3
- package/dist/src/programmes/policies/ContinentFormat.js +5 -5
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.d.ts +4 -4
- package/dist/src/programmes/policies/ContinentSpecialProgrammes.js +6 -6
- package/dist/src/programmes/policies/Country.d.ts +3 -3
- package/dist/src/programmes/policies/Country.js +4 -4
- package/dist/src/programmes/policies/CountryAttendance.d.ts +4 -4
- package/dist/src/programmes/policies/CountryAttendance.js +6 -6
- package/dist/src/programmes/policies/CountryAttendanceDegree.d.ts +4 -4
- package/dist/src/programmes/policies/CountryAttendanceDegree.js +7 -7
- package/dist/src/programmes/policies/CountryDegree.d.ts +2 -2
- package/dist/src/programmes/policies/CountryDegree.js +5 -5
- package/dist/src/programmes/policies/CountryDuration.d.ts +3 -3
- package/dist/src/programmes/policies/CountryDuration.js +5 -5
- package/dist/src/programmes/policies/CountryDurationDegree.d.ts +3 -3
- package/dist/src/programmes/policies/CountryDurationDegree.js +6 -6
- package/dist/src/programmes/policies/CountryEducationalForm.d.ts +2 -2
- package/dist/src/programmes/policies/CountryEducationalForm.js +5 -5
- package/dist/src/programmes/policies/CountryFormat.d.ts +3 -3
- package/dist/src/programmes/policies/CountryFormat.js +5 -5
- package/dist/src/programmes/policies/CountrySpecialProgrammes.d.ts +4 -4
- package/dist/src/programmes/policies/CountrySpecialProgrammes.js +6 -6
- package/dist/src/programmes/policies/Degree.d.ts +3 -3
- package/dist/src/programmes/policies/Degree.js +4 -4
- package/dist/src/programmes/policies/DegreeArea.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeArea.js +5 -5
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.d.ts +4 -4
- package/dist/src/programmes/policies/DegreeAttendanceDiscipline.js +7 -7
- package/dist/src/programmes/policies/DegreeAttendanceFormat.d.ts +4 -4
- package/dist/src/programmes/policies/DegreeAttendanceFormat.js +7 -7
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.d.ts +4 -4
- package/dist/src/programmes/policies/DegreeAttendanceSpecialProgrammes.js +7 -7
- package/dist/src/programmes/policies/DegreeContinent.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeContinent.js +5 -5
- package/dist/src/programmes/policies/DegreeCountryAttendance.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeCountryAttendance.js +6 -6
- package/dist/src/programmes/policies/DegreeCountryDiscipline.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeCountryDiscipline.js +6 -6
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeCountryTuitionFee.js +6 -6
- package/dist/src/programmes/policies/DegreeDuration.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeDuration.js +5 -5
- package/dist/src/programmes/policies/DegreeFormat.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeFormat.js +5 -5
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeSpecialProgrammes.js +5 -5
- package/dist/src/programmes/policies/DegreeTuitionFee.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeTuitionFee.js +5 -5
- package/dist/src/programmes/policies/DegreeTuitionFeeArea.d.ts +3 -3
- package/dist/src/programmes/policies/DegreeTuitionFeeArea.js +6 -6
- package/dist/src/programmes/policies/DegreeTuitionFeeAttendance.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeTuitionFeeAttendance.js +7 -7
- package/dist/src/programmes/policies/DegreeTuitionFeeContinent.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeTuitionFeeContinent.js +6 -6
- package/dist/src/programmes/policies/DegreeTuitionFeeFormat.d.ts +2 -2
- package/dist/src/programmes/policies/DegreeTuitionFeeFormat.js +6 -6
- package/dist/src/programmes/policies/Discipline.d.ts +3 -3
- package/dist/src/programmes/policies/Discipline.js +4 -4
- package/dist/src/programmes/policies/DisciplineAttendance.d.ts +4 -4
- package/dist/src/programmes/policies/DisciplineAttendance.js +6 -6
- package/dist/src/programmes/policies/DisciplineContinent.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineContinent.js +5 -5
- package/dist/src/programmes/policies/DisciplineContinentAttendance.d.ts +4 -4
- package/dist/src/programmes/policies/DisciplineContinentAttendance.js +7 -7
- package/dist/src/programmes/policies/DisciplineCountry.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineCountry.js +5 -5
- package/dist/src/programmes/policies/DisciplineCountryAttendance.d.ts +4 -4
- package/dist/src/programmes/policies/DisciplineCountryAttendance.js +7 -7
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.d.ts +2 -2
- package/dist/src/programmes/policies/DisciplineCountryEducationalForm.js +6 -6
- package/dist/src/programmes/policies/DisciplineCountryFormat.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineCountryFormat.js +6 -6
- package/dist/src/programmes/policies/DisciplineDegree.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineDegree.js +5 -5
- package/dist/src/programmes/policies/DisciplineDuration.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineDuration.js +5 -5
- package/dist/src/programmes/policies/DisciplineEducationalForm.d.ts +2 -2
- package/dist/src/programmes/policies/DisciplineEducationalForm.js +5 -5
- package/dist/src/programmes/policies/DisciplineFormat.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineFormat.js +5 -5
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.d.ts +3 -3
- package/dist/src/programmes/policies/DisciplineSpecialProgrammes.js +5 -5
- package/dist/src/programmes/policies/Duration.d.ts +3 -3
- package/dist/src/programmes/policies/Duration.js +4 -4
- package/dist/src/programmes/policies/Format.d.ts +3 -3
- package/dist/src/programmes/policies/Format.js +4 -4
- package/dist/src/programmes/policies/SpecialProgrammes.d.ts +3 -3
- package/dist/src/programmes/policies/SpecialProgrammes.js +4 -4
- package/dist/src/programmes/policies/TuitionFee.d.ts +3 -3
- package/dist/src/programmes/policies/TuitionFee.js +4 -4
- package/dist/src/programmes/policies/TuitionFeeAttendance.d.ts +4 -4
- package/dist/src/programmes/policies/TuitionFeeAttendance.js +6 -6
- package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.d.ts +4 -4
- package/dist/src/programmes/policies/TuitionFeeAttendanceDiscipline.js +7 -7
- package/dist/src/programmes/policies/TuitionFeeContinent.d.ts +3 -3
- package/dist/src/programmes/policies/TuitionFeeContinent.js +5 -5
- package/dist/src/programmes/policies/TuitionFeeCountry.d.ts +3 -3
- package/dist/src/programmes/policies/TuitionFeeCountry.js +5 -5
- package/dist/src/programmes/policies/TuitionFeeDiscipline.d.ts +3 -3
- package/dist/src/programmes/policies/TuitionFeeDiscipline.js +5 -5
- package/dist/src/programmes/policies/Unfiltered.d.ts +2 -2
- package/dist/src/programmes/policies/Unfiltered.js +2 -2
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineRule.d.ts +2 -2
- package/dist/src/programmes/rules/DegreeAttendanceDisciplineSpecificRule.d.ts +2 -2
- package/dist/src/programmes/rules/DegreeCountryAttendanceSpecificRule.d.ts +2 -2
- package/dist/src/programmes/rules/DegreeCountryDisciplineSpecificRule.d.ts +2 -2
- package/dist/src/programmes/rules/DegreeCountryTuitionFeeSpecificRule.d.ts +2 -2
- package/dist/src/programmes/rules/DegreeDisciplineRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableDegreeRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableDegreeRule.js +1 -1
- package/dist/src/programmes/rules/IndexableDurationRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableDurationRule.js +1 -1
- package/dist/src/programmes/rules/IndexableEducationalFormRule.d.ts +2 -2
- package/dist/src/programmes/rules/IndexableEducationalFormRule.js +1 -1
- package/dist/src/programmes/rules/IndexablePageNumberRule.js +1 -1
- package/dist/src/programmes/rules/MbaOrMscDegreeRule.d.ts +2 -2
- package/dist/src/programmes/rules/MinimumAmountOfResultsRule.d.ts +3 -3
- package/dist/src/programmes/rules/MinimumAmountOfResultsRule.js +1 -1
- package/dist/src/programmes/rules/NotDistanceLearningPortalRule.js +1 -1
- package/dist/src/programmes/rules/OneYearOnlyRule.d.ts +2 -2
- package/dist/src/programmes/types/IProgrammeSearchApplicationState.d.ts +1 -1
- package/dist/src/programmes/types/IProgrammeSearchDependencies.d.ts +1 -1
- package/dist/src/programmes/types/IProgrammeSearchSitemapDependencies.d.ts +1 -1
- package/dist/src/programmes/types/IProgrammeSitemapDependencies.d.ts +2 -2
- package/dist/src/programmes/types/IProgrammeSitemapUrlGenerator.d.ts +1 -1
- package/dist/src/scholarships/SearchIndexabilityManager.d.ts +5 -5
- package/dist/src/scholarships/SearchIndexabilityManager.js +1 -1
- package/dist/src/scholarships/policies/Area.d.ts +3 -3
- package/dist/src/scholarships/policies/Area.js +4 -4
- package/dist/src/scholarships/policies/Country.d.ts +3 -3
- package/dist/src/scholarships/policies/Country.js +4 -4
- package/dist/src/scholarships/policies/Discipline.d.ts +4 -4
- package/dist/src/scholarships/policies/Discipline.js +5 -5
- package/dist/src/scholarships/policies/DisciplineCountry.d.ts +3 -3
- package/dist/src/scholarships/policies/DisciplineCountry.js +5 -5
- package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.d.ts +2 -2
- package/dist/src/scholarships/policies/ScholarshipSeoIndexabilityPolicy.js +2 -2
- package/dist/src/scholarships/policies/Unfiltered.d.ts +2 -2
- package/dist/src/scholarships/policies/Unfiltered.js +2 -2
- package/dist/src/scholarships/policies/UniversityCountry.d.ts +3 -3
- package/dist/src/scholarships/policies/UniversityCountry.js +4 -4
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.d.ts +3 -3
- package/dist/src/scholarships/rules/ExceptAustaliaAreasRule.js +1 -1
- package/dist/src/scholarships/rules/SearchVolumeAreasRule.d.ts +3 -3
- package/dist/src/scholarships/rules/SearchVolumeCountriesDisciplinesRule.d.ts +3 -3
- package/dist/src/scholarships/rules/SearchVolumeCountriesRule.d.ts +3 -3
- package/dist/src/scholarships/rules/SearchVolumeDisciplinesRule.d.ts +3 -3
- package/dist/src/scholarships/types/IScholarshipSeoDependencies.d.ts +1 -1
- package/dist/src/scholarships/types/IScholarshipSitemapDependencies.d.ts +2 -2
- package/dist/src/sitemap-generator/BaseSitemapUrlGeneratorManager.d.ts +3 -3
- package/dist/src/sitemap-generator/IRankingApiClient.d.ts +1 -1
- package/dist/src/sitemap-generator/ISearchApiClient.d.ts +1 -1
- package/dist/src/sitemap-generator/ISitemapUrlGeneratorManager.d.ts +3 -3
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.d.ts +4 -4
- package/dist/src/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.js +8 -8
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.d.ts +3 -3
- package/dist/src/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.js +13 -13
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.d.ts +3 -3
- package/dist/src/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.js +7 -7
- package/dist/src/structured-data/OrganisationStructuredDataFactory.d.ts +1 -1
- package/dist/src/structured-data/ProgrammeStructuredDataFactory.d.ts +1 -1
- package/package.json +1 -1
- package/dist/tests/common/rules/NoFiltersSelectedRule.test.d.mts +0 -1
- package/dist/tests/common/rules/NoFiltersSelectedRule.test.mjs +0 -40
- package/dist/tests/common/rules/OnlyFiltersSelectedRule.test.d.mts +0 -1
- package/dist/tests/common/rules/OnlyFiltersSelectedRule.test.mjs +0 -70
- package/dist/tests/common/rules/SingleValueSelectedForFilterRule.test.d.mts +0 -1
- package/dist/tests/common/rules/SingleValueSelectedForFilterRule.test.mjs +0 -54
- package/dist/tests/organisations/policies/our-picks/Area.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/Area.test.mjs +0 -125
- package/dist/tests/organisations/policies/our-picks/AreaAttendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/AreaAttendance.test.mjs +0 -238
- package/dist/tests/organisations/policies/our-picks/Attendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/Attendance.test.mjs +0 -119
- package/dist/tests/organisations/policies/our-picks/Continent.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/Continent.test.mjs +0 -105
- package/dist/tests/organisations/policies/our-picks/Country.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/Country.test.mjs +0 -109
- package/dist/tests/organisations/policies/our-picks/CountryAreaCity.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/CountryAreaCity.test.mjs +0 -152
- package/dist/tests/organisations/policies/our-picks/CountryAttendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/CountryAttendance.test.mjs +0 -223
- package/dist/tests/organisations/policies/our-picks/CountryCity.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/CountryCity.test.mjs +0 -109
- package/dist/tests/organisations/policies/our-picks/Unfiltered.test.d.mts +0 -1
- package/dist/tests/organisations/policies/our-picks/Unfiltered.test.mjs +0 -60
- package/dist/tests/organisations/policies/ranked/RankedArea.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedArea.test.mjs +0 -149
- package/dist/tests/organisations/policies/ranked/RankedAreaDiscipline.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedAreaDiscipline.test.mjs +0 -237
- package/dist/tests/organisations/policies/ranked/RankedAttendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedAttendance.test.mjs +0 -139
- package/dist/tests/organisations/policies/ranked/RankedAttendanceDiscipline.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedAttendanceDiscipline.test.mjs +0 -224
- package/dist/tests/organisations/policies/ranked/RankedContinent.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedContinent.test.mjs +0 -125
- package/dist/tests/organisations/policies/ranked/RankedContinentAttendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedContinentAttendance.test.mjs +0 -253
- package/dist/tests/organisations/policies/ranked/RankedCountry.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedCountry.test.mjs +0 -131
- package/dist/tests/organisations/policies/ranked/RankedCountryAttendance.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedCountryAttendance.test.mjs +0 -230
- package/dist/tests/organisations/policies/ranked/RankedCountryDiscipline.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedCountryDiscipline.test.mjs +0 -197
- package/dist/tests/organisations/policies/ranked/RankedDiscipline.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedDiscipline.test.mjs +0 -124
- package/dist/tests/organisations/policies/ranked/RankedUnfiltered.test.d.mts +0 -1
- package/dist/tests/organisations/policies/ranked/RankedUnfiltered.test.mjs +0 -75
- package/dist/tests/organisations/rules/ContinentIsEuropeRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/ContinentIsEuropeRule.test.mjs +0 -59
- package/dist/tests/organisations/rules/MinimumAmountOfRankedResultsRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/MinimumAmountOfRankedResultsRule.test.mjs +0 -77
- package/dist/tests/organisations/rules/MinimumAmountOfResultsRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/MinimumAmountOfResultsRule.test.mjs +0 -77
- package/dist/tests/organisations/rules/OnlineAttendanceRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/OnlineAttendanceRule.test.mjs +0 -59
- package/dist/tests/organisations/rules/SearchVolumeAreasAttendanceRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/SearchVolumeAreasAttendanceRule.test.mjs +0 -59
- package/dist/tests/organisations/rules/SearchVolumeAreasDisciplineRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/SearchVolumeAreasDisciplineRule.test.mjs +0 -59
- package/dist/tests/organisations/rules/SearchVolumeCountriesAttendanceRule.test.d.mts +0 -1
- package/dist/tests/organisations/rules/SearchVolumeCountriesAttendanceRule.test.mjs +0 -59
- package/dist/tests/organisations/utils/SearchDependencies.util.d.mts +0 -20
- package/dist/tests/organisations/utils/SearchDependencies.util.mjs +0 -88
- package/dist/tests/organisations/utils/SitemapDependencies.util.d.mts +0 -18
- package/dist/tests/organisations/utils/SitemapDependencies.util.mjs +0 -54
- package/dist/tests/presenters/AreaPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/AreaPresenter.test.mjs +0 -46
- package/dist/tests/presenters/AttendancePresenter.test.d.mts +0 -1
- package/dist/tests/presenters/AttendancePresenter.test.mjs +0 -41
- package/dist/tests/presenters/ContinentPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/ContinentPresenter.test.mjs +0 -44
- package/dist/tests/presenters/CountryPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/CountryPresenter.test.mjs +0 -50
- package/dist/tests/presenters/DegreePresenter.test.d.mts +0 -1
- package/dist/tests/presenters/DegreePresenter.test.mjs +0 -51
- package/dist/tests/presenters/DisciplinePresenter.test.d.mts +0 -1
- package/dist/tests/presenters/DisciplinePresenter.test.mjs +0 -40
- package/dist/tests/presenters/DurationPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/DurationPresenter.test.mjs +0 -64
- package/dist/tests/presenters/EducationalFormPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/EducationalFormPresenter.test.mjs +0 -60
- package/dist/tests/presenters/FormatPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/FormatPresenter.test.mjs +0 -43
- package/dist/tests/presenters/SpecialProgrammesPresenter.test.d.mts +0 -1
- package/dist/tests/presenters/SpecialProgrammesPresenter.test.mjs +0 -66
- package/dist/tests/presenters/TuitionFeePresenter.test.d.mts +0 -1
- package/dist/tests/presenters/TuitionFeePresenter.test.mjs +0 -52
- package/dist/tests/programmes/policies/Area.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Area.test.mjs +0 -153
- package/dist/tests/programmes/policies/Attendance.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Attendance.test.mjs +0 -173
- package/dist/tests/programmes/policies/AttendanceDegree.test.d.mts +0 -1
- package/dist/tests/programmes/policies/AttendanceDegree.test.mjs +0 -291
- package/dist/tests/programmes/policies/Continent.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Continent.test.mjs +0 -169
- package/dist/tests/programmes/policies/Country.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Country.test.mjs +0 -164
- package/dist/tests/programmes/policies/CountryAttendance.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryAttendance.test.mjs +0 -251
- package/dist/tests/programmes/policies/CountryAttendanceDegree.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryAttendanceDegree.test.mjs +0 -337
- package/dist/tests/programmes/policies/CountryDegree.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryDegree.test.mjs +0 -262
- package/dist/tests/programmes/policies/CountryDuration.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryDuration.test.mjs +0 -234
- package/dist/tests/programmes/policies/CountryDurationDegree.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryDurationDegree.test.mjs +0 -304
- package/dist/tests/programmes/policies/CountryEducationalForm.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryEducationalForm.test.mjs +0 -260
- package/dist/tests/programmes/policies/CountryFormat.test.d.mts +0 -1
- package/dist/tests/programmes/policies/CountryFormat.test.mjs +0 -253
- package/dist/tests/programmes/policies/DegreeAttendanceDiscipline.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DegreeAttendanceDiscipline.test.mjs +0 -179
- package/dist/tests/programmes/policies/DegreeCountryAttendance.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DegreeCountryAttendance.test.mjs +0 -267
- package/dist/tests/programmes/policies/DegreeCountryTuitionFee.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DegreeCountryTuitionFee.test.mjs +0 -217
- package/dist/tests/programmes/policies/DegreeFormat.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DegreeFormat.test.mjs +0 -221
- package/dist/tests/programmes/policies/Discipline.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Discipline.test.mjs +0 -159
- package/dist/tests/programmes/policies/DisciplineAttendance.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineAttendance.test.mjs +0 -292
- package/dist/tests/programmes/policies/DisciplineContinent.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineContinent.test.mjs +0 -253
- package/dist/tests/programmes/policies/DisciplineCountry.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineCountry.test.mjs +0 -244
- package/dist/tests/programmes/policies/DisciplineCountryEducationalForm.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineCountryEducationalForm.test.mjs +0 -345
- package/dist/tests/programmes/policies/DisciplineDegree.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineDegree.test.mjs +0 -273
- package/dist/tests/programmes/policies/DisciplineDuration.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineDuration.test.mjs +0 -278
- package/dist/tests/programmes/policies/DisciplineEducationalForm.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineEducationalForm.test.mjs +0 -302
- package/dist/tests/programmes/policies/DisciplineFormat.test.d.mts +0 -1
- package/dist/tests/programmes/policies/DisciplineFormat.test.mjs +0 -266
- package/dist/tests/programmes/policies/Duration.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Duration.test.mjs +0 -179
- package/dist/tests/programmes/policies/Format.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Format.test.mjs +0 -117
- package/dist/tests/programmes/policies/NewRulesValidation.test.d.mts +0 -1
- package/dist/tests/programmes/policies/NewRulesValidation.test.mjs +0 -320
- package/dist/tests/programmes/policies/SpecialProgrammes.test.d.mts +0 -1
- package/dist/tests/programmes/policies/SpecialProgrammes.test.mjs +0 -171
- package/dist/tests/programmes/policies/TuitionFeeAttendanceDiscipline.test.d.mts +0 -1
- package/dist/tests/programmes/policies/TuitionFeeAttendanceDiscipline.test.mjs +0 -360
- package/dist/tests/programmes/policies/TuitionFeeContinent.test.d.mts +0 -1
- package/dist/tests/programmes/policies/TuitionFeeContinent.test.mjs +0 -293
- package/dist/tests/programmes/policies/TuitionFeeCountry.test.d.mts +0 -1
- package/dist/tests/programmes/policies/TuitionFeeCountry.test.mjs +0 -266
- package/dist/tests/programmes/policies/TuitionFeeDiscipline.test.d.mts +0 -1
- package/dist/tests/programmes/policies/TuitionFeeDiscipline.test.mjs +0 -267
- package/dist/tests/programmes/policies/Unfiltered.test.d.mts +0 -1
- package/dist/tests/programmes/policies/Unfiltered.test.mjs +0 -90
- package/dist/tests/programmes/rules/AffordableTuitionFeeRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/AffordableTuitionFeeRule.test.mjs +0 -27
- package/dist/tests/programmes/rules/DegreeCountrySpecificRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/DegreeCountrySpecificRule.test.mjs +0 -121
- package/dist/tests/programmes/rules/DegreeDisciplineRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/DegreeDisciplineRule.test.mjs +0 -169
- package/dist/tests/programmes/rules/IndexableDegreeRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/IndexableDegreeRule.test.mjs +0 -101
- package/dist/tests/programmes/rules/IndexableDurationRule.test..d.mts +0 -1
- package/dist/tests/programmes/rules/IndexableDurationRule.test..mjs +0 -25
- package/dist/tests/programmes/rules/IndexableEducationalFormRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/IndexableEducationalFormRule.test.mjs +0 -27
- package/dist/tests/programmes/rules/IndexablePageNumberRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/IndexablePageNumberRule.test.mjs +0 -51
- package/dist/tests/programmes/rules/MbaDegreeRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/MbaDegreeRule.test.mjs +0 -55
- package/dist/tests/programmes/rules/MbaOrMscDegreeRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/MbaOrMscDegreeRule.test.mjs +0 -53
- package/dist/tests/programmes/rules/MinimumAmountOfResultsRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/MinimumAmountOfResultsRule.test.mjs +0 -79
- package/dist/tests/programmes/rules/NotDistanceLearningPortalRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/NotDistanceLearningPortalRule.test.mjs +0 -57
- package/dist/tests/programmes/rules/OneYearDurationRule.test..d.mts +0 -1
- package/dist/tests/programmes/rules/OneYearDurationRule.test..mjs +0 -40
- package/dist/tests/programmes/rules/OnlineAttendanceRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/OnlineAttendanceRule.test.mjs +0 -69
- package/dist/tests/programmes/rules/PartTimeFormatRule.test.d.mts +0 -1
- package/dist/tests/programmes/rules/PartTimeFormatRule.test.mjs +0 -27
- package/dist/tests/programmes/utils/SearchDependencies.util.d.mts +0 -16
- package/dist/tests/programmes/utils/SearchDependencies.util.mjs +0 -73
- package/dist/tests/programmes/utils/SitemapDependencies.util.d.mts +0 -15
- package/dist/tests/programmes/utils/SitemapDependencies.util.mjs +0 -49
- package/dist/tests/scholarships/policies/Area.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/Area.test.mjs +0 -121
- package/dist/tests/scholarships/policies/Country.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/Country.test.mjs +0 -97
- package/dist/tests/scholarships/policies/Discipline.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/Discipline.test.mjs +0 -93
- package/dist/tests/scholarships/policies/DisciplineCountry.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/DisciplineCountry.test.mjs +0 -151
- package/dist/tests/scholarships/policies/Unfiltered.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/Unfiltered.test.mjs +0 -44
- package/dist/tests/scholarships/policies/UniversityCountry.test.d.mts +0 -1
- package/dist/tests/scholarships/policies/UniversityCountry.test.mjs +0 -115
- package/dist/tests/scholarships/rules/ExceptAustaliaAreasRule.test.d.mts +0 -1
- package/dist/tests/scholarships/rules/ExceptAustaliaAreasRule.test.mjs +0 -64
- package/dist/tests/scholarships/rules/SearchVolumeAreasRule.test.d.mts +0 -1
- package/dist/tests/scholarships/rules/SearchVolumeAreasRule.test.mjs +0 -62
- package/dist/tests/scholarships/rules/SearchVolumeCountriesDisciplinesRule.test.d.mts +0 -1
- package/dist/tests/scholarships/rules/SearchVolumeCountriesDisciplinesRule.test.mjs +0 -114
- package/dist/tests/scholarships/rules/SearchVolumeCountriesRule.test.d.mts +0 -1
- package/dist/tests/scholarships/rules/SearchVolumeCountriesRule.test.mjs +0 -62
- package/dist/tests/scholarships/rules/SearchVolumeDisciplinesRule.test.d.mts +0 -1
- package/dist/tests/scholarships/rules/SearchVolumeDisciplinesRule.test.mjs +0 -62
- package/dist/tests/scholarships/utils/SearchDependencies.util.d.mts +0 -16
- package/dist/tests/scholarships/utils/SearchDependencies.util.mjs +0 -70
- package/dist/tests/scholarships/utils/SitemapDependencies.util.d.mts +0 -11
- package/dist/tests/scholarships/utils/SitemapDependencies.util.mjs +0 -33
- package/dist/tests/sitemap-generator/BaseSitemapUrlGeneratorManager.test.d.mts +0 -1
- package/dist/tests/sitemap-generator/BaseSitemapUrlGeneratorManager.test.mjs +0 -82
- package/dist/tests/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.test.d.mts +0 -1
- package/dist/tests/sitemap-generator/OrganisationsSitemapUrlGeneratorManager.test.mjs +0 -85
- package/dist/tests/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.test.d.mts +0 -1
- package/dist/tests/sitemap-generator/ProgrammesSitemapUrlGeneratorManager.test.mjs +0 -77
- package/dist/tests/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.test.d.mts +0 -1
- package/dist/tests/sitemap-generator/ScholarshipsSitemapUrlGeneratorManager.test.mjs +0 -60
- package/dist/tests/structured-data/OrganisationStructuredDataFactory.test.d.mts +0 -1
- package/dist/tests/structured-data/OrganisationStructuredDataFactory.test.mjs +0 -334
- package/dist/tests/structured-data/ProgrammeStructuredDataFactory.test.d.mts +0 -1
- package/dist/tests/structured-data/ProgrammeStructuredDataFactory.test.mjs +0 -562
- package/dist/tests/structured-data/ScholarshipStructuredDataFactory.test.d.mts +0 -1
- package/dist/tests/structured-data/ScholarshipStructuredDataFactory.test.mjs +0 -292
- package/dist/tests/structured-data/SearchStructuredDataFactory.paywall.test.d.mts +0 -1
- package/dist/tests/structured-data/SearchStructuredDataFactory.paywall.test.mjs +0 -258
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
4
|
-
import { SearchDependencies } from '../utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SitemapDependencies } from '../utils/SitemapDependencies.util.mjs';
|
|
6
|
-
import { DegreeCountryAttendance } from '@/programmes/policies/DegreeCountryAttendance';
|
|
7
|
-
import { DegreePresenter } from '@/presenters/DegreePresenter';
|
|
8
|
-
import { CountryPresenter } from '@/presenters/CountryPresenter';
|
|
9
|
-
import { AttendancePresenter } from '@/presenters/AttendancePresenter';
|
|
10
|
-
describe('Policy:DegreeCountryAttendance', () => {
|
|
11
|
-
describe('shouldIndex', () => {
|
|
12
|
-
let searchDependenciesHelper;
|
|
13
|
-
let degreeCountryAttendancePolicy;
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
16
|
-
degreeCountryAttendancePolicy = new DegreeCountryAttendance(searchDependenciesHelper.dependencies);
|
|
17
|
-
searchDependenciesHelper.setResultsCount(7);
|
|
18
|
-
searchDependenciesHelper.setPageNumber(1);
|
|
19
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
20
|
-
});
|
|
21
|
-
describe('MBA with online attendance', () => {
|
|
22
|
-
it('Should return true for MBA with any country and online attendance', async () => {
|
|
23
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
24
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
25
|
-
[FilterKey.COUNTRY, ['999']], // Any country
|
|
26
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
27
|
-
]));
|
|
28
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
29
|
-
expect(result).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it('Should return false for MBA with non-online attendance', async () => {
|
|
32
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
33
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
34
|
-
[FilterKey.COUNTRY, ['82']], // USA
|
|
35
|
-
[FilterKey.DELIVERY_METHOD, ['on-campus']] // Non-online
|
|
36
|
-
]));
|
|
37
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
38
|
-
expect(result).toBe(false);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('Master of Laws with online attendance', () => {
|
|
42
|
-
it.each([
|
|
43
|
-
'82', // USA
|
|
44
|
-
'30', // UK
|
|
45
|
-
'56', // Canada
|
|
46
|
-
'108' // India
|
|
47
|
-
])('Should return true for LLM with country %s and online attendance', async (countryId) => {
|
|
48
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
49
|
-
[FilterKey.DEGREE_TYPE, ['llm']],
|
|
50
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
51
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
52
|
-
]));
|
|
53
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
54
|
-
expect(result).toBe(true);
|
|
55
|
-
});
|
|
56
|
-
it.each([
|
|
57
|
-
'11', // Germany (not allowed for LLM)
|
|
58
|
-
'202', // Australia (not allowed for LLM)
|
|
59
|
-
'999' // Invalid country
|
|
60
|
-
])('Should return false for LLM with invalid country %s', async (countryId) => {
|
|
61
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
62
|
-
[FilterKey.DEGREE_TYPE, ['llm']],
|
|
63
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
64
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
65
|
-
]));
|
|
66
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
67
|
-
expect(result).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('Master of Philosophy with online attendance', () => {
|
|
71
|
-
it.each([
|
|
72
|
-
'82', // USA
|
|
73
|
-
'30', // UK
|
|
74
|
-
'108' // India
|
|
75
|
-
])('Should return true for MPhil with country %s and online attendance', async (countryId) => {
|
|
76
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
77
|
-
[FilterKey.DEGREE_TYPE, ['mphil']],
|
|
78
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
79
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
80
|
-
]));
|
|
81
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
82
|
-
expect(result).toBe(true);
|
|
83
|
-
});
|
|
84
|
-
it.each([
|
|
85
|
-
'56', // Canada (not allowed for MPhil)
|
|
86
|
-
'11', // Germany (not allowed for MPhil)
|
|
87
|
-
'202', // Australia (not allowed for MPhil)
|
|
88
|
-
'999' // Invalid country
|
|
89
|
-
])('Should return false for MPhil with invalid country %s', async (countryId) => {
|
|
90
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
91
|
-
[FilterKey.DEGREE_TYPE, ['mphil']],
|
|
92
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
93
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
94
|
-
]));
|
|
95
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
96
|
-
expect(result).toBe(false);
|
|
97
|
-
});
|
|
98
|
-
});
|
|
99
|
-
describe('unsupported degrees', () => {
|
|
100
|
-
it('Should return false for unsupported degree types', async () => {
|
|
101
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
102
|
-
[FilterKey.DEGREE_TYPE, ['master-of-science']], // Not supported by this policy
|
|
103
|
-
[FilterKey.COUNTRY, ['82']],
|
|
104
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
105
|
-
]));
|
|
106
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
107
|
-
expect(result).toBe(false);
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
describe('filter validation', () => {
|
|
111
|
-
it('Should return false when multiple degrees are selected', async () => {
|
|
112
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
113
|
-
[FilterKey.DEGREE_TYPE, ['mba', 'llm']],
|
|
114
|
-
[FilterKey.COUNTRY, ['82']],
|
|
115
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
116
|
-
]));
|
|
117
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
118
|
-
expect(result).toBe(false);
|
|
119
|
-
});
|
|
120
|
-
it('Should return false when multiple countries are selected', async () => {
|
|
121
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
122
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
123
|
-
[FilterKey.COUNTRY, ['82', '30']],
|
|
124
|
-
[FilterKey.DELIVERY_METHOD, ['online']]
|
|
125
|
-
]));
|
|
126
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
127
|
-
expect(result).toBe(false);
|
|
128
|
-
});
|
|
129
|
-
it('Should return false when other filters are selected', async () => {
|
|
130
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
131
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
132
|
-
[FilterKey.COUNTRY, ['82']],
|
|
133
|
-
[FilterKey.DELIVERY_METHOD, ['online']],
|
|
134
|
-
[FilterKey.DISCIPLINES, ['54']] // Extra filter
|
|
135
|
-
]));
|
|
136
|
-
const result = await degreeCountryAttendancePolicy.shouldIndex();
|
|
137
|
-
expect(result).toBe(false);
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
describe('generateUrls', () => {
|
|
142
|
-
let sitemapDependenciesHelper;
|
|
143
|
-
let degreeCountryAttendancePolicy;
|
|
144
|
-
beforeEach(() => {
|
|
145
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
146
|
-
sitemapDependenciesHelper.setProgrammeCount(10);
|
|
147
|
-
degreeCountryAttendancePolicy = new DegreeCountryAttendance(sitemapDependenciesHelper.dependencies);
|
|
148
|
-
DegreePresenter.getInstance = vi.fn().mockReturnValue({
|
|
149
|
-
getFragments: vi.fn().mockReturnValue([
|
|
150
|
-
{ id: 'mba', path: 'mba' },
|
|
151
|
-
{ id: 'llm', path: 'llm' },
|
|
152
|
-
{ id: 'mphil', path: 'mphil' },
|
|
153
|
-
{ id: 'master-of-science', path: 'masters' } // Not supported
|
|
154
|
-
])
|
|
155
|
-
});
|
|
156
|
-
CountryPresenter.getInstance = vi.fn().mockReturnValue({
|
|
157
|
-
getFragments: vi.fn().mockReturnValue([
|
|
158
|
-
{ id: '82', path: 'usa' },
|
|
159
|
-
{ id: '30', path: 'uk' },
|
|
160
|
-
{ id: '56', path: 'canada' },
|
|
161
|
-
{ id: '108', path: 'india' },
|
|
162
|
-
{ id: '11', path: 'germany' },
|
|
163
|
-
{ id: '202', path: 'australia' }
|
|
164
|
-
])
|
|
165
|
-
});
|
|
166
|
-
AttendancePresenter.getInstance = vi.fn().mockReturnValue({
|
|
167
|
-
getFragments: vi.fn().mockReturnValue([
|
|
168
|
-
{ id: 'online', path: 'online' },
|
|
169
|
-
{ id: 'on-campus', path: 'on-campus' }
|
|
170
|
-
])
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
afterEach(() => {
|
|
174
|
-
sitemapDependenciesHelper.resetMocks();
|
|
175
|
-
});
|
|
176
|
-
it('Should generate URLs for MBA with all countries and online attendance', async () => {
|
|
177
|
-
const resultMap = new Map();
|
|
178
|
-
// MBA accepts all countries
|
|
179
|
-
const allCountries = ['82', '30', '56', '108', '11', '202'];
|
|
180
|
-
for (const country of allCountries) {
|
|
181
|
-
const key = `${FilterKey.DEGREE_TYPE}:mba|${FilterKey.COUNTRY}:${country}|${FilterKey.DELIVERY_METHOD}:online`;
|
|
182
|
-
resultMap.set(key, true);
|
|
183
|
-
}
|
|
184
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
185
|
-
const urls = await degreeCountryAttendancePolicy.generateUrls();
|
|
186
|
-
// MBA: 6 countries * 2 pages = 12 URLs
|
|
187
|
-
expect(urls.length).toBeGreaterThan(0);
|
|
188
|
-
expect(urls).toContain('mba/online/usa');
|
|
189
|
-
expect(urls).toContain('mba/online/uk');
|
|
190
|
-
expect(urls).toContain('mba/online/canada');
|
|
191
|
-
expect(urls).toContain('mba/online/india');
|
|
192
|
-
expect(urls).toContain('mba/online/germany');
|
|
193
|
-
expect(urls).toContain('mba/online/australia');
|
|
194
|
-
});
|
|
195
|
-
it('Should generate URLs for LLM with specific countries and online attendance', async () => {
|
|
196
|
-
const resultMap = new Map();
|
|
197
|
-
// LLM accepts only specific countries: USA, UK, Canada, India
|
|
198
|
-
const llmCountries = ['82', '30', '56', '108'];
|
|
199
|
-
for (const country of llmCountries) {
|
|
200
|
-
const key = `${FilterKey.DEGREE_TYPE}:llm|${FilterKey.COUNTRY}:${country}|${FilterKey.DELIVERY_METHOD}:online`;
|
|
201
|
-
resultMap.set(key, true);
|
|
202
|
-
}
|
|
203
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
204
|
-
const urls = await degreeCountryAttendancePolicy.generateUrls();
|
|
205
|
-
// LLM: 4 allowed countries * 2 pages = 8 URLs
|
|
206
|
-
expect(urls).toContain('llm/online/usa');
|
|
207
|
-
expect(urls).toContain('llm/online/uk');
|
|
208
|
-
expect(urls).toContain('llm/online/canada');
|
|
209
|
-
expect(urls).toContain('llm/online/india');
|
|
210
|
-
// Should not include invalid countries for LLM
|
|
211
|
-
expect(urls).not.toContain('llm/online/germany');
|
|
212
|
-
expect(urls).not.toContain('llm/online/australia');
|
|
213
|
-
});
|
|
214
|
-
it('Should generate URLs for MPhil with specific countries and online attendance', async () => {
|
|
215
|
-
const resultMap = new Map();
|
|
216
|
-
// MPhil accepts only specific countries: USA, UK, India
|
|
217
|
-
const mphilCountries = ['82', '30', '108'];
|
|
218
|
-
for (const country of mphilCountries) {
|
|
219
|
-
const key = `${FilterKey.DEGREE_TYPE}:mphil|${FilterKey.COUNTRY}:${country}|${FilterKey.DELIVERY_METHOD}:online`;
|
|
220
|
-
resultMap.set(key, true);
|
|
221
|
-
}
|
|
222
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
223
|
-
const urls = await degreeCountryAttendancePolicy.generateUrls();
|
|
224
|
-
// MPhil: 3 allowed countries * 2 pages = 6 URLs
|
|
225
|
-
expect(urls).toContain('mphil/online/usa');
|
|
226
|
-
expect(urls).toContain('mphil/online/uk');
|
|
227
|
-
expect(urls).toContain('mphil/online/india');
|
|
228
|
-
// Should not include invalid countries for MPhil
|
|
229
|
-
expect(urls).not.toContain('mphil/online/canada');
|
|
230
|
-
expect(urls).not.toContain('mphil/online/germany');
|
|
231
|
-
expect(urls).not.toContain('mphil/online/australia');
|
|
232
|
-
});
|
|
233
|
-
it('Should handle missing online attendance gracefully', async () => {
|
|
234
|
-
// Mock AttendancePresenter to not return online attendance
|
|
235
|
-
AttendancePresenter.getInstance.mockReturnValueOnce({
|
|
236
|
-
getFragments: vi.fn().mockReturnValue([
|
|
237
|
-
{ id: 'on-campus', path: 'on-campus' }
|
|
238
|
-
])
|
|
239
|
-
});
|
|
240
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap();
|
|
241
|
-
const urls = await degreeCountryAttendancePolicy.generateUrls();
|
|
242
|
-
// Should return empty array when no online attendance is available
|
|
243
|
-
expect(urls).toHaveLength(0);
|
|
244
|
-
});
|
|
245
|
-
it('Should exclude unsupported degrees', async () => {
|
|
246
|
-
const resultMap = new Map();
|
|
247
|
-
// Only MBA, LLM, and MPhil should be supported
|
|
248
|
-
const allDegrees = ['mba', 'llm', 'mphil', 'master-of-science'];
|
|
249
|
-
const supportedDegrees = ['mba', 'llm', 'mphil'];
|
|
250
|
-
const countries = ['82', '30'];
|
|
251
|
-
for (const degree of allDegrees) {
|
|
252
|
-
for (const country of countries) {
|
|
253
|
-
const key = `${FilterKey.DEGREE_TYPE}:${degree}|${FilterKey.COUNTRY}:${country}|${FilterKey.DELIVERY_METHOD}:online`;
|
|
254
|
-
resultMap.set(key, supportedDegrees.includes(degree));
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
258
|
-
const urls = await degreeCountryAttendancePolicy.generateUrls();
|
|
259
|
-
// Should include supported degrees
|
|
260
|
-
expect(urls).toContain('mba/online/usa');
|
|
261
|
-
expect(urls).toContain('llm/online/uk');
|
|
262
|
-
expect(urls).toContain('mphil/online/usa');
|
|
263
|
-
// Should not include unsupported degrees
|
|
264
|
-
expect(urls).not.toContain('masters/online/usa');
|
|
265
|
-
});
|
|
266
|
-
});
|
|
267
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
|
-
import { DegreeTypeFilterOptionValue, FilterKey, TuitionFeeFilterOptionValue } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
4
|
-
import { SearchDependencies } from '../utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SitemapDependencies } from '../utils/SitemapDependencies.util.mjs';
|
|
6
|
-
import { DegreeCountryTuitionFee } from '@/programmes/policies/DegreeCountryTuitionFee';
|
|
7
|
-
import { DegreePresenter } from '@/presenters/DegreePresenter';
|
|
8
|
-
import { CountryPresenter } from '@/presenters/CountryPresenter';
|
|
9
|
-
import { TuitionFeePresenter } from '@/presenters/TuitionFeePresenter';
|
|
10
|
-
describe('Policy:DegreeCountryTuitionFee', () => {
|
|
11
|
-
describe('shouldIndex', () => {
|
|
12
|
-
let searchDependenciesHelper;
|
|
13
|
-
let degreeCountryTuitionFeePolicy;
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
16
|
-
degreeCountryTuitionFeePolicy = new DegreeCountryTuitionFee(searchDependenciesHelper.dependencies);
|
|
17
|
-
searchDependenciesHelper.setResultsCount(7);
|
|
18
|
-
searchDependenciesHelper.setPageNumber(1);
|
|
19
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
20
|
-
});
|
|
21
|
-
describe('MBA with affordable tuition', () => {
|
|
22
|
-
it('Should return true for MBA with any country and affordable tuition', async () => {
|
|
23
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
24
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
25
|
-
[FilterKey.COUNTRY, ['999']], // Any country
|
|
26
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
27
|
-
]));
|
|
28
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
29
|
-
expect(result).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it('Should return false for MBA with expensive tuition', async () => {
|
|
32
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
33
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
34
|
-
[FilterKey.COUNTRY, ['82']], // USA
|
|
35
|
-
[FilterKey.TUITION_FEE, ['10000-15000']] // Expensive tuition
|
|
36
|
-
]));
|
|
37
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
38
|
-
expect(result).toBe(false);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('Master of Laws with affordable tuition', () => {
|
|
42
|
-
it.each([
|
|
43
|
-
'82', // USA
|
|
44
|
-
'30', // UK
|
|
45
|
-
'56', // Canada
|
|
46
|
-
'108' // India
|
|
47
|
-
])('Should return true for LLM with country %s and affordable tuition', async (countryId) => {
|
|
48
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
49
|
-
[FilterKey.DEGREE_TYPE, [DegreeTypeFilterOptionValue.LLM]],
|
|
50
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
51
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
52
|
-
]));
|
|
53
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
54
|
-
expect(result).toBe(true);
|
|
55
|
-
});
|
|
56
|
-
it.each([
|
|
57
|
-
'11', // Germany (not allowed for LLM)
|
|
58
|
-
'202', // Australia (not allowed for LLM)
|
|
59
|
-
'999' // Invalid country
|
|
60
|
-
])('Should return false for LLM with invalid country %s', async (countryId) => {
|
|
61
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
62
|
-
[FilterKey.DEGREE_TYPE, ['llm']],
|
|
63
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
64
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
65
|
-
]));
|
|
66
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
67
|
-
expect(result).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('unsupported degrees', () => {
|
|
71
|
-
it('Should return false for unsupported degree types', async () => {
|
|
72
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
73
|
-
[FilterKey.DEGREE_TYPE, ['msc']], // Not supported by this policy
|
|
74
|
-
[FilterKey.COUNTRY, ['82']],
|
|
75
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
76
|
-
]));
|
|
77
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
78
|
-
expect(result).toBe(false);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('filter validation', () => {
|
|
82
|
-
it('Should return false when multiple degrees are selected', async () => {
|
|
83
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
84
|
-
[FilterKey.DEGREE_TYPE, ['mba', 'llm']],
|
|
85
|
-
[FilterKey.COUNTRY, ['82']],
|
|
86
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
87
|
-
]));
|
|
88
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
89
|
-
expect(result).toBe(false);
|
|
90
|
-
});
|
|
91
|
-
it('Should return false when multiple countries are selected', async () => {
|
|
92
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
93
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
94
|
-
[FilterKey.COUNTRY, ['82', '30']],
|
|
95
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]]
|
|
96
|
-
]));
|
|
97
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
98
|
-
expect(result).toBe(false);
|
|
99
|
-
});
|
|
100
|
-
it('Should return false when other filters are selected', async () => {
|
|
101
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
102
|
-
[FilterKey.DEGREE_TYPE, ['mba']],
|
|
103
|
-
[FilterKey.COUNTRY, ['82']],
|
|
104
|
-
[FilterKey.TUITION_FEE, [TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED]],
|
|
105
|
-
[FilterKey.DISCIPLINES, ['54']] // Extra filter
|
|
106
|
-
]));
|
|
107
|
-
const result = await degreeCountryTuitionFeePolicy.shouldIndex();
|
|
108
|
-
expect(result).toBe(false);
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
describe('generateUrls', () => {
|
|
113
|
-
let sitemapDependenciesHelper;
|
|
114
|
-
let degreeCountryTuitionFeePolicy;
|
|
115
|
-
beforeEach(() => {
|
|
116
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
117
|
-
sitemapDependenciesHelper.setProgrammeCount(10);
|
|
118
|
-
degreeCountryTuitionFeePolicy = new DegreeCountryTuitionFee(sitemapDependenciesHelper.dependencies);
|
|
119
|
-
DegreePresenter.getInstance = vi.fn().mockReturnValue({
|
|
120
|
-
getFragments: vi.fn().mockReturnValue([
|
|
121
|
-
{ id: 'mba', path: 'mba' },
|
|
122
|
-
{ id: 'llm', path: 'llm' },
|
|
123
|
-
{ id: 'msc', path: 'masters' } // Not supported
|
|
124
|
-
])
|
|
125
|
-
});
|
|
126
|
-
CountryPresenter.getInstance = vi.fn().mockReturnValue({
|
|
127
|
-
getFragments: vi.fn().mockReturnValue([
|
|
128
|
-
{ id: '82', path: 'usa' },
|
|
129
|
-
{ id: '30', path: 'uk' },
|
|
130
|
-
{ id: '56', path: 'canada' },
|
|
131
|
-
{ id: '108', path: 'india' },
|
|
132
|
-
{ id: '11', path: 'germany' },
|
|
133
|
-
{ id: '202', path: 'australia' }
|
|
134
|
-
])
|
|
135
|
-
});
|
|
136
|
-
TuitionFeePresenter.getInstance = vi.fn().mockReturnValue({
|
|
137
|
-
getFragments: vi.fn().mockReturnValue([
|
|
138
|
-
{ id: TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED, path: 'affordable' },
|
|
139
|
-
{ id: '10000-15000', path: 'expensive' }
|
|
140
|
-
])
|
|
141
|
-
});
|
|
142
|
-
});
|
|
143
|
-
afterEach(() => {
|
|
144
|
-
sitemapDependenciesHelper.resetMocks();
|
|
145
|
-
});
|
|
146
|
-
it('Should generate URLs for MBA with all countries and affordable tuition', async () => {
|
|
147
|
-
const resultMap = new Map();
|
|
148
|
-
// MBA accepts all countries
|
|
149
|
-
const allCountries = ['82', '30', '32', '108', '11', '202'];
|
|
150
|
-
for (const country of allCountries) {
|
|
151
|
-
const key = `${FilterKey.DEGREE_TYPE}:mba|${FilterKey.COUNTRY}:${country}|${FilterKey.TUITION_FEE}:${TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED}`;
|
|
152
|
-
resultMap.set(key, true);
|
|
153
|
-
}
|
|
154
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
155
|
-
const urls = await degreeCountryTuitionFeePolicy.generateUrls();
|
|
156
|
-
// MBA: 6 countries * 2 pages = 12 URLs
|
|
157
|
-
expect(urls.length).toBeGreaterThan(0);
|
|
158
|
-
expect(urls).toContain('mba/affordable/usa');
|
|
159
|
-
expect(urls).toContain('mba/affordable/uk');
|
|
160
|
-
expect(urls).toContain('mba/affordable/canada');
|
|
161
|
-
expect(urls).toContain('mba/affordable/india');
|
|
162
|
-
expect(urls).toContain('mba/affordable/germany');
|
|
163
|
-
expect(urls).toContain('mba/affordable/australia');
|
|
164
|
-
});
|
|
165
|
-
it('Should generate URLs for LLM with specific countries and affordable tuition', async () => {
|
|
166
|
-
const resultMap = new Map();
|
|
167
|
-
// LLM accepts only specific countries: USA, UK, Canada, India
|
|
168
|
-
const llmCountries = ['82', '30', '56', '108'];
|
|
169
|
-
for (const country of llmCountries) {
|
|
170
|
-
const key = `${FilterKey.DEGREE_TYPE}:llm|${FilterKey.COUNTRY}:${country}|${FilterKey.TUITION_FEE}:${TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED}`;
|
|
171
|
-
resultMap.set(key, true);
|
|
172
|
-
}
|
|
173
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
174
|
-
const urls = await degreeCountryTuitionFeePolicy.generateUrls();
|
|
175
|
-
// LLM: 4 allowed countries * 2 pages = 8 URLs
|
|
176
|
-
expect(urls).toContain('llm/affordable/usa');
|
|
177
|
-
expect(urls).toContain('llm/affordable/uk');
|
|
178
|
-
expect(urls).toContain('llm/affordable/canada');
|
|
179
|
-
expect(urls).toContain('llm/affordable/india');
|
|
180
|
-
// Should not include invalid countries for LLM
|
|
181
|
-
expect(urls).not.toContain('llm/affordable/germany');
|
|
182
|
-
expect(urls).not.toContain('llm/affordable/australia');
|
|
183
|
-
});
|
|
184
|
-
it('Should handle missing affordable tuition gracefully', async () => {
|
|
185
|
-
// Mock TuitionFeePresenter to not return affordable tuition
|
|
186
|
-
TuitionFeePresenter.getInstance.mockReturnValueOnce({
|
|
187
|
-
getFragments: vi.fn().mockReturnValue([
|
|
188
|
-
{ id: '10000-15000', path: 'expensive' }
|
|
189
|
-
])
|
|
190
|
-
});
|
|
191
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap();
|
|
192
|
-
const urls = await degreeCountryTuitionFeePolicy.generateUrls();
|
|
193
|
-
// Should return empty array when no affordable tuition is available
|
|
194
|
-
expect(urls).toHaveLength(0);
|
|
195
|
-
});
|
|
196
|
-
it('Should exclude unsupported degrees', async () => {
|
|
197
|
-
const resultMap = new Map();
|
|
198
|
-
// Only MBA and LLM should be supported
|
|
199
|
-
const allDegrees = ['mba', 'llm', 'msc'];
|
|
200
|
-
const supportedDegrees = ['mba', 'llm'];
|
|
201
|
-
const countries = ['82', '30'];
|
|
202
|
-
for (const degree of allDegrees) {
|
|
203
|
-
for (const country of countries) {
|
|
204
|
-
const key = `${FilterKey.DEGREE_TYPE}:${degree}|${FilterKey.COUNTRY}:${country}|${FilterKey.TUITION_FEE}:${TuitionFeeFilterOptionValue.ZERO_TO_TWO_THOUSAND_FIVE_HUNDRED}`;
|
|
205
|
-
resultMap.set(key, supportedDegrees.includes(degree));
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
209
|
-
const urls = await degreeCountryTuitionFeePolicy.generateUrls();
|
|
210
|
-
// Should include supported degrees
|
|
211
|
-
expect(urls).toContain('mba/affordable/usa');
|
|
212
|
-
expect(urls).toContain('llm/affordable/uk');
|
|
213
|
-
// Should not include unsupported degrees
|
|
214
|
-
expect(urls).not.toContain('masters/affordable/usa');
|
|
215
|
-
});
|
|
216
|
-
});
|
|
217
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|