@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,221 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { SearchDependencies } from '../utils/SearchDependencies.util.mjs';
|
|
4
|
-
import { DegreeFormat } from '@/programmes/policies/DegreeFormat';
|
|
5
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
6
|
-
import { SitemapDependencies } from '../utils/SitemapDependencies.util.mjs';
|
|
7
|
-
import { DegreePresenter } from '@/presenters/DegreePresenter';
|
|
8
|
-
import { FormatPresenter } from '@/presenters/FormatPresenter';
|
|
9
|
-
describe('Policy:DegreeFormat', () => {
|
|
10
|
-
describe('shouldIndex', () => {
|
|
11
|
-
let searchDependenciesHelper;
|
|
12
|
-
let degreeFormatPolicy;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
15
|
-
degreeFormatPolicy = new DegreeFormat(searchDependenciesHelper.dependencies);
|
|
16
|
-
searchDependenciesHelper.setResultsCount(10);
|
|
17
|
-
searchDependenciesHelper.setPageNumber(1);
|
|
18
|
-
searchDependenciesHelper.setPortalType(PortalType.BACHELOR);
|
|
19
|
-
});
|
|
20
|
-
it('Should return true when all conditions are met (fulltime + degree)', async () => {
|
|
21
|
-
const format = 'fulltime';
|
|
22
|
-
const degree = 'mba';
|
|
23
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
24
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
25
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
26
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
27
|
-
]));
|
|
28
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
29
|
-
expect(result).toBe(true);
|
|
30
|
-
});
|
|
31
|
-
it('Should return true when all conditions are met (parttime + degree)', async () => {
|
|
32
|
-
const format = 'parttime';
|
|
33
|
-
const degree = 'msc';
|
|
34
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
35
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
36
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
37
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
38
|
-
]));
|
|
39
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
40
|
-
expect(result).toBe(true);
|
|
41
|
-
});
|
|
42
|
-
it('Should return false when multiple formats are selected', async () => {
|
|
43
|
-
const firstFormat = 'fulltime';
|
|
44
|
-
const secondFormat = 'parttime';
|
|
45
|
-
const degree = 'mba';
|
|
46
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
47
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
48
|
-
[FilterKey.ATTENDANCE, [firstFormat, secondFormat]],
|
|
49
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
50
|
-
]));
|
|
51
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
52
|
-
expect(result).toBe(false);
|
|
53
|
-
});
|
|
54
|
-
it('Should return false when multiple degrees are selected', async () => {
|
|
55
|
-
const format = 'fulltime';
|
|
56
|
-
const firstDegree = 'mba';
|
|
57
|
-
const secondDegree = 'msc';
|
|
58
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
59
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
60
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
61
|
-
[FilterKey.DEGREE_TYPE, [firstDegree, secondDegree]]
|
|
62
|
-
]));
|
|
63
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
64
|
-
expect(result).toBe(false);
|
|
65
|
-
});
|
|
66
|
-
it('Should return false when no format is selected', async () => {
|
|
67
|
-
const degree = 'mba';
|
|
68
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
69
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
70
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
71
|
-
]));
|
|
72
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
73
|
-
expect(result).toBe(false);
|
|
74
|
-
});
|
|
75
|
-
it('Should return false when no degree is selected', async () => {
|
|
76
|
-
const format = 'parttime';
|
|
77
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
78
|
-
[FilterKey.ATTENDANCE, [format]]
|
|
79
|
-
]));
|
|
80
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
81
|
-
expect(result).toBe(false);
|
|
82
|
-
});
|
|
83
|
-
it('Should return false when other filters are selected', async () => {
|
|
84
|
-
const format = 'fulltime';
|
|
85
|
-
const degree = 'mba';
|
|
86
|
-
const countryId = '30'; // UK
|
|
87
|
-
searchDependenciesHelper.setPortalType(PortalType.MASTER);
|
|
88
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
89
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
90
|
-
[FilterKey.DEGREE_TYPE, [degree]],
|
|
91
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
92
|
-
]));
|
|
93
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
94
|
-
expect(result).toBe(false);
|
|
95
|
-
});
|
|
96
|
-
it('Should return false when degree is not indexable', async () => {
|
|
97
|
-
const format = 'parttime';
|
|
98
|
-
const degree = 'ap'; // Academy Profession - not indexable
|
|
99
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
100
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
101
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
102
|
-
]));
|
|
103
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
104
|
-
expect(result).toBe(false);
|
|
105
|
-
});
|
|
106
|
-
it('Should return false when number of results is less than 7', async () => {
|
|
107
|
-
const format = 'fulltime';
|
|
108
|
-
const degree = 'mba';
|
|
109
|
-
searchDependenciesHelper.setResultsCount(6);
|
|
110
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
111
|
-
[FilterKey.ATTENDANCE, [format]],
|
|
112
|
-
[FilterKey.DEGREE_TYPE, [degree]]
|
|
113
|
-
]));
|
|
114
|
-
const result = await degreeFormatPolicy.shouldIndex();
|
|
115
|
-
expect(result).toBe(false);
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
describe('generateUrls', () => {
|
|
119
|
-
let sitemapDependenciesHelper;
|
|
120
|
-
let degreeFormatPolicy;
|
|
121
|
-
beforeEach(() => {
|
|
122
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
123
|
-
sitemapDependenciesHelper.setProgrammeCount(10);
|
|
124
|
-
degreeFormatPolicy = new DegreeFormat(sitemapDependenciesHelper.dependencies);
|
|
125
|
-
// Mock FormatPresenter - only fulltime and parttime should be used
|
|
126
|
-
FormatPresenter.getInstance = vi.fn().mockReturnValue({
|
|
127
|
-
getFragments: vi.fn().mockReturnValue([
|
|
128
|
-
{ id: 'fulltime', path: 'full-time' },
|
|
129
|
-
{ id: 'parttime', path: 'part-time' },
|
|
130
|
-
{ id: 'online', path: 'online' }, // Should be filtered out
|
|
131
|
-
{ id: 'blended', path: 'blended' } // Should be filtered out
|
|
132
|
-
])
|
|
133
|
-
});
|
|
134
|
-
DegreePresenter.getInstance = vi.fn().mockReturnValue({
|
|
135
|
-
getFragments: vi.fn().mockReturnValue([
|
|
136
|
-
{ id: 'mba', path: 'master-of-business-administration' },
|
|
137
|
-
{ id: 'msc', path: 'master-of-science' },
|
|
138
|
-
{ id: 'phd', path: 'doctor-of-philosophy' }
|
|
139
|
-
])
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
afterEach(() => {
|
|
143
|
-
sitemapDependenciesHelper.resetMocks();
|
|
144
|
-
});
|
|
145
|
-
it('Should generate URLs only for fulltime/parttime formats with degrees', async () => {
|
|
146
|
-
// Mock rules to return true for indexable combinations
|
|
147
|
-
const resultMap = new Map([
|
|
148
|
-
// Fulltime combinations
|
|
149
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:mba`, true],
|
|
150
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:msc`, true],
|
|
151
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:phd`, true],
|
|
152
|
-
// Parttime combinations
|
|
153
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:mba`, true],
|
|
154
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:msc`, true],
|
|
155
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:phd`, true]
|
|
156
|
-
]);
|
|
157
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
158
|
-
const urls = await degreeFormatPolicy.generateUrls();
|
|
159
|
-
// Should include 2 formats * 3 degrees = 6 URLs
|
|
160
|
-
expect(urls).toHaveLength(6);
|
|
161
|
-
// Verify specific combinations
|
|
162
|
-
expect(urls).toContain('master-of-business-administration/full-time');
|
|
163
|
-
expect(urls).toContain('master-of-business-administration/part-time');
|
|
164
|
-
expect(urls).toContain('master-of-science/full-time');
|
|
165
|
-
expect(urls).toContain('master-of-science/part-time');
|
|
166
|
-
expect(urls).toContain('doctor-of-philosophy/full-time');
|
|
167
|
-
expect(urls).toContain('doctor-of-philosophy/part-time');
|
|
168
|
-
// Should not contain online or blended formats
|
|
169
|
-
expect(urls).not.toContain('master-of-business-administration/online');
|
|
170
|
-
expect(urls).not.toContain('master-of-business-administration/blended');
|
|
171
|
-
});
|
|
172
|
-
it('Should exclude non-indexable degrees', async () => {
|
|
173
|
-
// Add non-indexable degree to mock
|
|
174
|
-
DegreePresenter.getInstance.mockReturnValueOnce({
|
|
175
|
-
getFragments: vi.fn().mockReturnValue([
|
|
176
|
-
{ id: 'mba', path: 'master-of-business-administration' },
|
|
177
|
-
{ id: 'ap', path: 'academy-profession' } // Non-indexable
|
|
178
|
-
])
|
|
179
|
-
});
|
|
180
|
-
const resultMap = new Map([
|
|
181
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:mba`, true],
|
|
182
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:mba`, true],
|
|
183
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:ap`, false], // Non-indexable
|
|
184
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:ap`, false] // Non-indexable
|
|
185
|
-
]);
|
|
186
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
187
|
-
const urls = await degreeFormatPolicy.generateUrls();
|
|
188
|
-
expect(urls).toHaveLength(2); // Only MBA combinations
|
|
189
|
-
expect(urls).toContain('master-of-business-administration/full-time');
|
|
190
|
-
expect(urls).toContain('master-of-business-administration/part-time');
|
|
191
|
-
expect(urls).not.toContain('academy-profession/full-time');
|
|
192
|
-
expect(urls).not.toContain('academy-profession/part-time');
|
|
193
|
-
});
|
|
194
|
-
it('Should handle rule failures', async () => {
|
|
195
|
-
const resultMap = new Map([
|
|
196
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:mba`, true],
|
|
197
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:mba`, false], // Fails
|
|
198
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:msc`, false], // Fails
|
|
199
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:msc`, true],
|
|
200
|
-
[`${FilterKey.ATTENDANCE}:fulltime|${FilterKey.DEGREE_TYPE}:phd`, true],
|
|
201
|
-
[`${FilterKey.ATTENDANCE}:parttime|${FilterKey.DEGREE_TYPE}:phd`, true]
|
|
202
|
-
]);
|
|
203
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
204
|
-
const urls = await degreeFormatPolicy.generateUrls();
|
|
205
|
-
expect(urls).toHaveLength(4); // mba/fulltime, msc/parttime, phd/fulltime, phd/parttime
|
|
206
|
-
expect(urls).toContain('master-of-business-administration/full-time');
|
|
207
|
-
expect(urls).toContain('master-of-science/part-time');
|
|
208
|
-
expect(urls).toContain('doctor-of-philosophy/full-time');
|
|
209
|
-
expect(urls).toContain('doctor-of-philosophy/part-time');
|
|
210
|
-
expect(urls).not.toContain('master-of-business-administration/part-time');
|
|
211
|
-
expect(urls).not.toContain('master-of-science/full-time');
|
|
212
|
-
});
|
|
213
|
-
it('Should handle empty fragments', async () => {
|
|
214
|
-
FormatPresenter.getInstance.mockReturnValueOnce({
|
|
215
|
-
getFragments: vi.fn().mockReturnValue([])
|
|
216
|
-
});
|
|
217
|
-
const urls = await degreeFormatPolicy.generateUrls();
|
|
218
|
-
expect(urls).toHaveLength(0);
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,159 +0,0 @@
|
|
|
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 { Discipline } from '@/programmes/policies/Discipline';
|
|
6
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
7
|
-
import { DisciplinePresenter } from '@/presenters/DisciplinePresenter';
|
|
8
|
-
describe('Policy:Discipline', () => {
|
|
9
|
-
describe('shouldIndex', () => {
|
|
10
|
-
let searchDependenciesHelper;
|
|
11
|
-
let disciplinePolicy;
|
|
12
|
-
beforeEach(() => {
|
|
13
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
14
|
-
disciplinePolicy = new Discipline(searchDependenciesHelper.dependencies);
|
|
15
|
-
searchDependenciesHelper.setResultsCount(10);
|
|
16
|
-
searchDependenciesHelper.setPageNumber(1);
|
|
17
|
-
searchDependenciesHelper.setPortalType(PortalType.PHD);
|
|
18
|
-
});
|
|
19
|
-
it('Should return true when all conditions are met', async () => {
|
|
20
|
-
const disciplineId = '54'; // Agriculture & Forestry
|
|
21
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [disciplineId]]]));
|
|
22
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
23
|
-
expect(result).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
it('Should return false when multiple disciplines are selected', async () => {
|
|
26
|
-
const firstDisciplineId = '54'; // Agriculture & Forestry
|
|
27
|
-
const secondDisciplineId = '12'; // Applied Sciences & Professions
|
|
28
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [firstDisciplineId, secondDisciplineId]]]));
|
|
29
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
30
|
-
expect(result).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
it('Should return false when no disciplines are selected', async () => {
|
|
33
|
-
const countryId = '30'; // UK
|
|
34
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.COUNTRY, [countryId]]]));
|
|
35
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
36
|
-
expect(result).toBe(false);
|
|
37
|
-
});
|
|
38
|
-
it('Should return false when other filters are selected', async () => {
|
|
39
|
-
const disciplineId = '54'; // Agriculture & Forestry
|
|
40
|
-
const countryId = '30'; // UK
|
|
41
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
42
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
43
|
-
[FilterKey.DISCIPLINES, [disciplineId]]
|
|
44
|
-
]));
|
|
45
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
46
|
-
expect(result).toBe(false);
|
|
47
|
-
});
|
|
48
|
-
it('Should return false when number of results is less than 7', async () => {
|
|
49
|
-
const disciplineId = '54'; // Agriculture & Forestry
|
|
50
|
-
searchDependenciesHelper.setResultsCount(6);
|
|
51
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [disciplineId]]]));
|
|
52
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
53
|
-
expect(result).toBe(false);
|
|
54
|
-
});
|
|
55
|
-
it('Should return false when page number is higher than 2', async () => {
|
|
56
|
-
const disciplineId = '54'; // Agriculture & Forestry
|
|
57
|
-
searchDependenciesHelper.setPageNumber(3);
|
|
58
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [disciplineId]]]));
|
|
59
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
60
|
-
expect(result).toBe(false);
|
|
61
|
-
});
|
|
62
|
-
it('Should return false when portal type is distance learning', async () => {
|
|
63
|
-
const disciplineId = '54'; // Agriculture & Forestry
|
|
64
|
-
searchDependenciesHelper.setPortalType(PortalType.DISTANCE_LEARNING);
|
|
65
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DISCIPLINES, [disciplineId]]]));
|
|
66
|
-
const result = await disciplinePolicy.shouldIndex();
|
|
67
|
-
expect(result).toBe(false);
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('generateUrls', () => {
|
|
71
|
-
let sitemapDependenciesHelper;
|
|
72
|
-
let disciplinePolicy;
|
|
73
|
-
beforeEach(() => {
|
|
74
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
75
|
-
sitemapDependenciesHelper.setProgrammeCount(10); // More than 7 programs
|
|
76
|
-
disciplinePolicy = new Discipline(sitemapDependenciesHelper.dependencies);
|
|
77
|
-
DisciplinePresenter.getInstance = vi.fn().mockReturnValue({
|
|
78
|
-
getFragments: vi.fn().mockReturnValue([
|
|
79
|
-
{ id: '54', path: 'agriculture-forestry' },
|
|
80
|
-
{ id: '12', path: 'applied-sciences' },
|
|
81
|
-
{ id: '152', path: 'computer-science-it' }
|
|
82
|
-
])
|
|
83
|
-
});
|
|
84
|
-
});
|
|
85
|
-
afterEach(() => {
|
|
86
|
-
sitemapDependenciesHelper.resetMocks();
|
|
87
|
-
});
|
|
88
|
-
it('Should generate URLs for all valid disciplines', async () => {
|
|
89
|
-
// Mock the checkRulesForSitemap to return true for all filter combinations
|
|
90
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap();
|
|
91
|
-
// Call the method via reflection since it's protected
|
|
92
|
-
const urls = await disciplinePolicy.generateUrls();
|
|
93
|
-
// Verify all discipline fragments were included
|
|
94
|
-
expect(urls).toHaveLength(3);
|
|
95
|
-
expect(urls).toContain('agriculture-forestry');
|
|
96
|
-
expect(urls).toContain('applied-sciences');
|
|
97
|
-
expect(urls).toContain('computer-science-it');
|
|
98
|
-
});
|
|
99
|
-
it('Should exclude URLs that fail rule checks', async () => {
|
|
100
|
-
// Create a map that returns false for Computer Science
|
|
101
|
-
const resultMap = new Map([[`${FilterKey.DISCIPLINES}:152`, false]]);
|
|
102
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
103
|
-
const urls = await disciplinePolicy.generateUrls();
|
|
104
|
-
// Should only include Agriculture and Applied Sciences, not Computer Science
|
|
105
|
-
expect(urls).toHaveLength(2);
|
|
106
|
-
expect(urls).toContain('agriculture-forestry');
|
|
107
|
-
expect(urls).toContain('applied-sciences');
|
|
108
|
-
expect(urls).not.toContain('computer-science-it');
|
|
109
|
-
});
|
|
110
|
-
it('Should exclude all URLs when all checks fail', async () => {
|
|
111
|
-
// Create a map that returns false for all disciplines
|
|
112
|
-
const resultMap = new Map([
|
|
113
|
-
[`${FilterKey.DISCIPLINES}:54`, false],
|
|
114
|
-
[`${FilterKey.DISCIPLINES}:12`, false],
|
|
115
|
-
[`${FilterKey.DISCIPLINES}:152`, false]
|
|
116
|
-
]);
|
|
117
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
118
|
-
const urls = await disciplinePolicy.generateUrls();
|
|
119
|
-
// Should include no URLs
|
|
120
|
-
expect(urls).toHaveLength(0);
|
|
121
|
-
});
|
|
122
|
-
it('Should handle empty fragments array', async () => {
|
|
123
|
-
// Mock the DisciplinePresenter to return empty fragments
|
|
124
|
-
DisciplinePresenter.getInstance.mockReturnValueOnce({
|
|
125
|
-
getFragments: vi.fn().mockReturnValue([])
|
|
126
|
-
});
|
|
127
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap();
|
|
128
|
-
const urls = await disciplinePolicy.generateUrls();
|
|
129
|
-
// Should return empty array
|
|
130
|
-
expect(urls).toHaveLength(0);
|
|
131
|
-
});
|
|
132
|
-
it('Should test the performance with a large number of fragments', async () => {
|
|
133
|
-
// Generate a large number of discipline fragments
|
|
134
|
-
const largeFragmentSet = Array.from({ length: 100 }, (_, index) => ({
|
|
135
|
-
id: `${1000 + index}`,
|
|
136
|
-
path: `discipline-${1000 + index}`
|
|
137
|
-
}));
|
|
138
|
-
// Mock the DisciplinePresenter to return large fragment set
|
|
139
|
-
DisciplinePresenter.getInstance.mockReturnValueOnce({
|
|
140
|
-
getFragments: vi.fn().mockReturnValue(largeFragmentSet)
|
|
141
|
-
});
|
|
142
|
-
// Make half of them fail the rule check
|
|
143
|
-
const resultMap = new Map();
|
|
144
|
-
for (let i = 0; i < largeFragmentSet.length; i++) {
|
|
145
|
-
if (i % 2 === 0) {
|
|
146
|
-
resultMap.set(`${FilterKey.DISCIPLINES}:${largeFragmentSet[i].id}`, false);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
sitemapDependenciesHelper.mockCheckRulesForSitemap(resultMap);
|
|
150
|
-
const urls = await disciplinePolicy.generateUrls();
|
|
151
|
-
// Should include half of the disciplines
|
|
152
|
-
expect(urls).toHaveLength(50);
|
|
153
|
-
// Check a few specific items
|
|
154
|
-
expect(urls).not.toContain('discipline-1004'); // Should be filtered out (index 0)
|
|
155
|
-
expect(urls).toContain('discipline-1003'); // Should be included (index 1)
|
|
156
|
-
expect(urls).not.toContain('discipline-1002'); // Should be filtered out (index 2)
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|