@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,125 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { Area } from '@/organisations/policies/our-picks/Area';
|
|
4
|
-
import { SearchDependencies } from '../../utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SortingOptions } from '@/enums/SortingOptions';
|
|
6
|
-
import { SitemapDependencies } from '../../utils/SitemapDependencies.util.mjs';
|
|
7
|
-
import { AreaPresenter } from '@/presenters/AreaPresenter';
|
|
8
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
9
|
-
describe('Policy:Area', () => {
|
|
10
|
-
describe('shouldIndex', () => {
|
|
11
|
-
let searchDependenciesHelper;
|
|
12
|
-
let areaPolicy;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
15
|
-
areaPolicy = new Area(searchDependenciesHelper.dependencies);
|
|
16
|
-
searchDependenciesHelper.setSortingState(SortingOptions.OUR_PICKS);
|
|
17
|
-
searchDependenciesHelper.setNumberOfResults(10);
|
|
18
|
-
});
|
|
19
|
-
it('Should return true when all conditions are met', async () => {
|
|
20
|
-
const areaId = '996'; // England
|
|
21
|
-
const countryId = '30'; // UK
|
|
22
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
23
|
-
[FilterKey.AREA, [areaId]],
|
|
24
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
25
|
-
]));
|
|
26
|
-
const result = await areaPolicy.shouldIndex();
|
|
27
|
-
expect(result).toBe(true);
|
|
28
|
-
});
|
|
29
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should return false when the selected portal type is %s', async (portalType) => {
|
|
30
|
-
const areaId = '996'; // England
|
|
31
|
-
const countryId = '30'; // UK
|
|
32
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
33
|
-
[FilterKey.AREA, [areaId]],
|
|
34
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
35
|
-
]));
|
|
36
|
-
searchDependenciesHelper.setPortalType(portalType);
|
|
37
|
-
const result = await areaPolicy.shouldIndex();
|
|
38
|
-
expect(result).toBe(false);
|
|
39
|
-
});
|
|
40
|
-
it('Should return false when University Meta Ranking sorting is selected', async () => {
|
|
41
|
-
const areaId = '996'; // England
|
|
42
|
-
const countryId = '30'; // UK
|
|
43
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
44
|
-
[FilterKey.AREA, [areaId]],
|
|
45
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
46
|
-
]));
|
|
47
|
-
searchDependenciesHelper.setSortingState(SortingOptions.UNIVERSITY_META_RANKING);
|
|
48
|
-
const result = await areaPolicy.shouldIndex();
|
|
49
|
-
expect(result).toBe(false);
|
|
50
|
-
});
|
|
51
|
-
it('Should return false when multiple areas are selected', async () => {
|
|
52
|
-
const firstAreaId = '996'; // England
|
|
53
|
-
const secondAreaId = '994'; // Scotland
|
|
54
|
-
const countryId = '30'; // UK
|
|
55
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
56
|
-
[FilterKey.AREA, [firstAreaId, secondAreaId]],
|
|
57
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
58
|
-
]));
|
|
59
|
-
const result = await areaPolicy.shouldIndex();
|
|
60
|
-
expect(result).toBe(false);
|
|
61
|
-
});
|
|
62
|
-
it('Should return false when no areas are selected', async () => {
|
|
63
|
-
const countryId = '30'; // UK
|
|
64
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.COUNTRY, [countryId]]]));
|
|
65
|
-
const result = await areaPolicy.shouldIndex();
|
|
66
|
-
expect(result).toBe(false);
|
|
67
|
-
});
|
|
68
|
-
it('Should return false when other filters are selected', async () => {
|
|
69
|
-
const areaId = '996'; // England
|
|
70
|
-
const countryId = '30'; // UK
|
|
71
|
-
const disciplineId = '1';
|
|
72
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
73
|
-
[FilterKey.AREA, [areaId]],
|
|
74
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
75
|
-
[FilterKey.DISCIPLINES, [disciplineId]]
|
|
76
|
-
]));
|
|
77
|
-
const result = await areaPolicy.shouldIndex();
|
|
78
|
-
expect(result).toBe(false);
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
describe('generateSitemapUrls', () => {
|
|
82
|
-
let sitemapDependenciesHelper;
|
|
83
|
-
let areaPolicy;
|
|
84
|
-
let fragments;
|
|
85
|
-
beforeEach(() => {
|
|
86
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
87
|
-
sitemapDependenciesHelper.setOrganisationCount(10);
|
|
88
|
-
areaPolicy = new Area(sitemapDependenciesHelper.dependencies);
|
|
89
|
-
vi.spyOn(AreaPresenter, 'getInstance').mockReturnValue({
|
|
90
|
-
getFragments: vi.fn(() => fragments),
|
|
91
|
-
generatePaths: vi.fn(() => fragments),
|
|
92
|
-
fragments
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
it('Should return path when all conditions are met', async () => {
|
|
96
|
-
const areaId = '996'; // England
|
|
97
|
-
const countryId = '30'; // UK
|
|
98
|
-
const path = 'path';
|
|
99
|
-
fragments = [
|
|
100
|
-
{
|
|
101
|
-
id: areaId,
|
|
102
|
-
countryId: countryId,
|
|
103
|
-
path
|
|
104
|
-
}
|
|
105
|
-
];
|
|
106
|
-
const result = await areaPolicy.generateSitemapUrls();
|
|
107
|
-
expect(result).toEqual([path]);
|
|
108
|
-
});
|
|
109
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should not return path when portal type is %s', async (portalType) => {
|
|
110
|
-
const areaId = '996'; // England
|
|
111
|
-
const countryId = '30'; // UK
|
|
112
|
-
const path = 'path';
|
|
113
|
-
sitemapDependenciesHelper.setPortalType(portalType);
|
|
114
|
-
fragments = [
|
|
115
|
-
{
|
|
116
|
-
id: areaId,
|
|
117
|
-
countryId: countryId,
|
|
118
|
-
path
|
|
119
|
-
}
|
|
120
|
-
];
|
|
121
|
-
const result = await areaPolicy.generateSitemapUrls();
|
|
122
|
-
expect(result).toEqual([]);
|
|
123
|
-
});
|
|
124
|
-
});
|
|
125
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { AreaAttendance } from '@/organisations/policies/our-picks/AreaAttendance';
|
|
4
|
-
import { SearchDependencies } from '../../../organisations/utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SortingOptions } from '@/enums/SortingOptions';
|
|
6
|
-
import { SitemapDependencies } from '../../utils/SitemapDependencies.util.mjs';
|
|
7
|
-
import { AreaPresenter } from '@/presenters/AreaPresenter';
|
|
8
|
-
import { AttendancePresenter } from '@/presenters/AttendancePresenter';
|
|
9
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
10
|
-
describe('Policy:AreaAttendance', () => {
|
|
11
|
-
describe('shouldIndex', () => {
|
|
12
|
-
let searchDependenciesHelper;
|
|
13
|
-
let areaAttendancePolicy;
|
|
14
|
-
beforeEach(() => {
|
|
15
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
16
|
-
areaAttendancePolicy = new AreaAttendance(searchDependenciesHelper.dependencies);
|
|
17
|
-
searchDependenciesHelper.setSortingState(SortingOptions.OUR_PICKS);
|
|
18
|
-
searchDependenciesHelper.setNumberOfResults(10);
|
|
19
|
-
});
|
|
20
|
-
it('Should return true when all conditions are met', async () => {
|
|
21
|
-
const areaId = '3582'; // Georgia
|
|
22
|
-
const countryId = '82'; // US
|
|
23
|
-
const attendance = 'online';
|
|
24
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
25
|
-
[FilterKey.AREA, [areaId]],
|
|
26
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
27
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
28
|
-
]));
|
|
29
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
30
|
-
expect(result).toBe(true);
|
|
31
|
-
});
|
|
32
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should return false when the selected portal type is %s', async (portalType) => {
|
|
33
|
-
const areaId = '3582'; // Georgia
|
|
34
|
-
const countryId = '82'; // US
|
|
35
|
-
const attendance = 'online';
|
|
36
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
37
|
-
[FilterKey.AREA, [areaId]],
|
|
38
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
39
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
40
|
-
]));
|
|
41
|
-
searchDependenciesHelper.setPortalType(portalType);
|
|
42
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
43
|
-
expect(result).toBe(false);
|
|
44
|
-
});
|
|
45
|
-
it('Should return false when area when University Meta Ranking sorting is selected', async () => {
|
|
46
|
-
const areaId = '3582'; // Georgia
|
|
47
|
-
const countryId = '82'; // US
|
|
48
|
-
const attendance = 'online';
|
|
49
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
50
|
-
[FilterKey.AREA, [areaId]],
|
|
51
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
52
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
53
|
-
]));
|
|
54
|
-
searchDependenciesHelper.setSortingState(SortingOptions.UNIVERSITY_META_RANKING);
|
|
55
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
56
|
-
expect(result).toBe(false);
|
|
57
|
-
});
|
|
58
|
-
it('Should return false when multiple areas are selected', async () => {
|
|
59
|
-
const firstAreaId = '996'; // England
|
|
60
|
-
const secondAreaId = '994'; // Scotland
|
|
61
|
-
const countryId = '30'; // UK
|
|
62
|
-
const attendance = 'online';
|
|
63
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
64
|
-
[FilterKey.AREA, [firstAreaId, secondAreaId]],
|
|
65
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
66
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
67
|
-
]));
|
|
68
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
69
|
-
expect(result).toBe(false);
|
|
70
|
-
});
|
|
71
|
-
it('Should return false when no areas are selected', async () => {
|
|
72
|
-
const countryId = '30'; // UK
|
|
73
|
-
const attendance = 'online';
|
|
74
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
75
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
76
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
77
|
-
]));
|
|
78
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
79
|
-
expect(result).toBe(false);
|
|
80
|
-
});
|
|
81
|
-
it('Should return false when other filters are selected', async () => {
|
|
82
|
-
const areaId = '996'; // England
|
|
83
|
-
const countryId = '30'; // UK
|
|
84
|
-
const disciplineId = '1';
|
|
85
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
86
|
-
[FilterKey.AREA, [areaId]],
|
|
87
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
88
|
-
[FilterKey.DISCIPLINES, [disciplineId]]
|
|
89
|
-
]));
|
|
90
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
91
|
-
expect(result).toBe(false);
|
|
92
|
-
});
|
|
93
|
-
it('Should return false when attendance is not online', async () => {
|
|
94
|
-
const areaId = '996'; // England
|
|
95
|
-
const countryId = '30'; // UK
|
|
96
|
-
const attendance = 'other';
|
|
97
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
98
|
-
[FilterKey.AREA, [areaId]],
|
|
99
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
100
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
101
|
-
]));
|
|
102
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
103
|
-
expect(result).toBe(false);
|
|
104
|
-
});
|
|
105
|
-
it('Should return false when attendance is not selected', async () => {
|
|
106
|
-
const areaId = '3582'; // Georgia
|
|
107
|
-
const countryId = '82'; // US
|
|
108
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
109
|
-
[FilterKey.AREA, [areaId]],
|
|
110
|
-
[FilterKey.COUNTRY, [countryId]]
|
|
111
|
-
]));
|
|
112
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
113
|
-
expect(result).toBe(false);
|
|
114
|
-
});
|
|
115
|
-
it('Should return false when area has no search volume', async () => {
|
|
116
|
-
const areaId = '137'; // Western Australia
|
|
117
|
-
const countryId = '202'; // Australia
|
|
118
|
-
const attendance = 'online';
|
|
119
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
120
|
-
[FilterKey.AREA, [areaId]],
|
|
121
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
122
|
-
[FilterKey.DELIVERY_METHOD, [attendance]]
|
|
123
|
-
]));
|
|
124
|
-
const result = await areaAttendancePolicy.shouldIndex();
|
|
125
|
-
expect(result).toBe(false);
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
describe('generateSitemapUrls', () => {
|
|
129
|
-
let sitemapDependenciesHelper;
|
|
130
|
-
let areaAttendancePolicy;
|
|
131
|
-
let areaFragments;
|
|
132
|
-
let attendanceFragments;
|
|
133
|
-
beforeEach(() => {
|
|
134
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
135
|
-
sitemapDependenciesHelper.setOrganisationCount(10);
|
|
136
|
-
areaAttendancePolicy = new AreaAttendance(sitemapDependenciesHelper.dependencies);
|
|
137
|
-
vi.spyOn(AreaPresenter, 'getInstance').mockReturnValue({
|
|
138
|
-
getFragments: vi.fn(() => areaFragments),
|
|
139
|
-
generatePaths: vi.fn(() => areaFragments),
|
|
140
|
-
fragments: areaFragments
|
|
141
|
-
});
|
|
142
|
-
vi.spyOn(AttendancePresenter, 'getInstance').mockReturnValue({
|
|
143
|
-
getFragments: vi.fn(() => attendanceFragments),
|
|
144
|
-
generatePaths: vi.fn(() => attendanceFragments),
|
|
145
|
-
fragments: attendanceFragments
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
it('Should return path when all conditions are met', async () => {
|
|
149
|
-
const areaId = '3582'; // Georgia
|
|
150
|
-
const countryId = '82'; // US
|
|
151
|
-
const areaPath = 'area-path';
|
|
152
|
-
const attendance = 'online';
|
|
153
|
-
const attendancePath = 'attendance-path';
|
|
154
|
-
areaFragments = [
|
|
155
|
-
{
|
|
156
|
-
id: areaId,
|
|
157
|
-
path: areaPath,
|
|
158
|
-
countryId
|
|
159
|
-
}
|
|
160
|
-
];
|
|
161
|
-
attendanceFragments = [
|
|
162
|
-
{
|
|
163
|
-
id: attendance,
|
|
164
|
-
path: attendancePath
|
|
165
|
-
}
|
|
166
|
-
];
|
|
167
|
-
const result = await areaAttendancePolicy.generateSitemapUrls();
|
|
168
|
-
expect(result).toEqual([`${attendancePath}/${areaPath}`]);
|
|
169
|
-
});
|
|
170
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should not return path when portal type is %s', async (portalType) => {
|
|
171
|
-
const areaId = '3582'; // Georgia
|
|
172
|
-
const countryId = '82'; // US
|
|
173
|
-
const areaPath = 'area-path';
|
|
174
|
-
const attendance = 'online';
|
|
175
|
-
const attendancePath = 'attendance-path';
|
|
176
|
-
areaFragments = [
|
|
177
|
-
{
|
|
178
|
-
id: areaId,
|
|
179
|
-
path: areaPath,
|
|
180
|
-
countryId
|
|
181
|
-
}
|
|
182
|
-
];
|
|
183
|
-
attendanceFragments = [
|
|
184
|
-
{
|
|
185
|
-
id: attendance,
|
|
186
|
-
path: attendancePath
|
|
187
|
-
}
|
|
188
|
-
];
|
|
189
|
-
sitemapDependenciesHelper.setPortalType(portalType);
|
|
190
|
-
const result = await areaAttendancePolicy.generateSitemapUrls();
|
|
191
|
-
expect(result).toEqual([]);
|
|
192
|
-
});
|
|
193
|
-
it('Should not return path when attendance is not online', async () => {
|
|
194
|
-
const areaId = '137'; // Western Australia
|
|
195
|
-
const countryId = '202'; // Australia
|
|
196
|
-
const areaPath = 'area-path';
|
|
197
|
-
const attendance = 'face-2-face';
|
|
198
|
-
const attendancePath = 'attendance-path';
|
|
199
|
-
areaFragments = [
|
|
200
|
-
{
|
|
201
|
-
id: areaId,
|
|
202
|
-
path: areaPath,
|
|
203
|
-
countryId
|
|
204
|
-
}
|
|
205
|
-
];
|
|
206
|
-
attendanceFragments = [
|
|
207
|
-
{
|
|
208
|
-
id: attendance,
|
|
209
|
-
path: attendancePath
|
|
210
|
-
}
|
|
211
|
-
];
|
|
212
|
-
const result = await areaAttendancePolicy.generateSitemapUrls();
|
|
213
|
-
expect(result).toEqual([]);
|
|
214
|
-
});
|
|
215
|
-
it('Should not return path when there is not enough search volume', async () => {
|
|
216
|
-
const areaId = '137'; // Western Australia
|
|
217
|
-
const countryId = '202'; // Australia
|
|
218
|
-
const areaPath = 'area-path';
|
|
219
|
-
const attendance = 'online';
|
|
220
|
-
const attendancePath = 'attendance-path';
|
|
221
|
-
areaFragments = [
|
|
222
|
-
{
|
|
223
|
-
id: areaId,
|
|
224
|
-
path: areaPath,
|
|
225
|
-
countryId
|
|
226
|
-
}
|
|
227
|
-
];
|
|
228
|
-
attendanceFragments = [
|
|
229
|
-
{
|
|
230
|
-
id: attendance,
|
|
231
|
-
path: attendancePath
|
|
232
|
-
}
|
|
233
|
-
];
|
|
234
|
-
const result = await areaAttendancePolicy.generateSitemapUrls();
|
|
235
|
-
expect(result).toEqual([]);
|
|
236
|
-
});
|
|
237
|
-
});
|
|
238
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { Attendance } from '@/organisations/policies/our-picks/Attendance';
|
|
4
|
-
import { SearchDependencies } from '../../../organisations/utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SortingOptions } from '@/enums/SortingOptions';
|
|
6
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
7
|
-
import { SitemapDependencies } from '../../utils/SitemapDependencies.util.mjs';
|
|
8
|
-
import { AttendancePresenter } from '@/presenters/AttendancePresenter';
|
|
9
|
-
describe('Policy:Attendance', () => {
|
|
10
|
-
describe('shouldIndex', () => {
|
|
11
|
-
let searchDependenciesHelper;
|
|
12
|
-
let attendancePolicy;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
15
|
-
attendancePolicy = new Attendance(searchDependenciesHelper.dependencies);
|
|
16
|
-
searchDependenciesHelper.setSortingState(SortingOptions.OUR_PICKS);
|
|
17
|
-
searchDependenciesHelper.setNumberOfResults(10);
|
|
18
|
-
});
|
|
19
|
-
it('Should return true when all conditions are met', async () => {
|
|
20
|
-
const attendance = 'online';
|
|
21
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DELIVERY_METHOD, [attendance]]]));
|
|
22
|
-
const result = await attendancePolicy.shouldIndex();
|
|
23
|
-
expect(result).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should return false when the selected portal type is %s', async (portalType) => {
|
|
26
|
-
const attendance = 'online';
|
|
27
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DELIVERY_METHOD, [attendance]]]));
|
|
28
|
-
searchDependenciesHelper.setPortalType(portalType);
|
|
29
|
-
const result = await attendancePolicy.shouldIndex();
|
|
30
|
-
expect(result).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
it('Should return false when area when University Meta Ranking sorting is selected', async () => {
|
|
33
|
-
const attendance = 'online';
|
|
34
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DELIVERY_METHOD, [attendance]]]));
|
|
35
|
-
searchDependenciesHelper.setSortingState(SortingOptions.UNIVERSITY_META_RANKING);
|
|
36
|
-
const result = await attendancePolicy.shouldIndex();
|
|
37
|
-
expect(result).toBe(false);
|
|
38
|
-
});
|
|
39
|
-
it('Should return false when multiple attendances are selected', async () => {
|
|
40
|
-
const attendance = 'online';
|
|
41
|
-
const otherAttendance = 'blended';
|
|
42
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.DELIVERY_METHOD, [attendance, otherAttendance]]]));
|
|
43
|
-
const result = await attendancePolicy.shouldIndex();
|
|
44
|
-
expect(result).toBe(false);
|
|
45
|
-
});
|
|
46
|
-
it('Should return false when no attendances are selected', async () => {
|
|
47
|
-
const countryId = '30'; // UK
|
|
48
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.COUNTRY, [countryId]]]));
|
|
49
|
-
const result = await attendancePolicy.shouldIndex();
|
|
50
|
-
expect(result).toBe(false);
|
|
51
|
-
});
|
|
52
|
-
it('Should return false when other filters are selected', async () => {
|
|
53
|
-
const attendance = 'online';
|
|
54
|
-
const areaId = '996'; // England
|
|
55
|
-
const countryId = '30'; // UK
|
|
56
|
-
const disciplineId = '1';
|
|
57
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
58
|
-
[FilterKey.DELIVERY_METHOD, [attendance]],
|
|
59
|
-
[FilterKey.AREA, [areaId]],
|
|
60
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
61
|
-
[FilterKey.DISCIPLINES, [disciplineId]]
|
|
62
|
-
]));
|
|
63
|
-
const result = await attendancePolicy.shouldIndex();
|
|
64
|
-
expect(result).toBe(false);
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
describe('generateSitemapUrls', () => {
|
|
68
|
-
let sitemapDependenciesHelper;
|
|
69
|
-
let attendancePolicy;
|
|
70
|
-
let attendanceFragments;
|
|
71
|
-
beforeEach(() => {
|
|
72
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
73
|
-
sitemapDependenciesHelper.setOrganisationCount(10);
|
|
74
|
-
attendancePolicy = new Attendance(sitemapDependenciesHelper.dependencies);
|
|
75
|
-
vi.spyOn(AttendancePresenter, 'getInstance').mockReturnValue({
|
|
76
|
-
getFragments: vi.fn(() => attendanceFragments),
|
|
77
|
-
generatePaths: vi.fn(() => attendanceFragments),
|
|
78
|
-
fragments: attendanceFragments
|
|
79
|
-
});
|
|
80
|
-
});
|
|
81
|
-
it('Should return path when all conditions are met', async () => {
|
|
82
|
-
const attendance = 'online';
|
|
83
|
-
const attendancePath = 'attendance-path';
|
|
84
|
-
attendanceFragments = [
|
|
85
|
-
{
|
|
86
|
-
id: attendance,
|
|
87
|
-
path: attendancePath
|
|
88
|
-
}
|
|
89
|
-
];
|
|
90
|
-
const result = await attendancePolicy.generateSitemapUrls();
|
|
91
|
-
expect(result).toEqual([`${attendancePath}`]);
|
|
92
|
-
});
|
|
93
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should not return path when portal type is %s', async (portalType) => {
|
|
94
|
-
const attendance = 'online';
|
|
95
|
-
const attendancePath = 'attendance-path';
|
|
96
|
-
attendanceFragments = [
|
|
97
|
-
{
|
|
98
|
-
id: attendance,
|
|
99
|
-
path: attendancePath
|
|
100
|
-
}
|
|
101
|
-
];
|
|
102
|
-
sitemapDependenciesHelper.setPortalType(portalType);
|
|
103
|
-
const result = await attendancePolicy.generateSitemapUrls();
|
|
104
|
-
expect(result).toEqual([]);
|
|
105
|
-
});
|
|
106
|
-
it('Should not return path when attendance is not online', async () => {
|
|
107
|
-
const attendance = 'face-2-face';
|
|
108
|
-
const attendancePath = 'attendance-path';
|
|
109
|
-
attendanceFragments = [
|
|
110
|
-
{
|
|
111
|
-
id: attendance,
|
|
112
|
-
path: attendancePath
|
|
113
|
-
}
|
|
114
|
-
];
|
|
115
|
-
const result = await attendancePolicy.generateSitemapUrls();
|
|
116
|
-
expect(result).toEqual([]);
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
|
-
import { FilterKey } from '@studyportals/search-filters/server-side';
|
|
3
|
-
import { Continent } from '@/organisations/policies/our-picks/Continent';
|
|
4
|
-
import { SearchDependencies } from '../../../organisations/utils/SearchDependencies.util.mjs';
|
|
5
|
-
import { SitemapDependencies } from '../../utils/SitemapDependencies.util.mjs';
|
|
6
|
-
import { SortingOptions } from '@/enums/SortingOptions';
|
|
7
|
-
import { ContinentPresenter } from '@/presenters/ContinentPresenter';
|
|
8
|
-
import { PortalType } from '@studyportals/domain-client';
|
|
9
|
-
describe('Policy:Continent', () => {
|
|
10
|
-
describe('shouldIndex', () => {
|
|
11
|
-
let searchDependenciesHelper;
|
|
12
|
-
let continentPolicy;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
searchDependenciesHelper = new SearchDependencies();
|
|
15
|
-
continentPolicy = new Continent(searchDependenciesHelper.dependencies);
|
|
16
|
-
searchDependenciesHelper.setSortingState(SortingOptions.OUR_PICKS);
|
|
17
|
-
searchDependenciesHelper.setNumberOfResults(10);
|
|
18
|
-
});
|
|
19
|
-
it('Should return true when all conditions are met', async () => {
|
|
20
|
-
const continentId = '1'; // Europe
|
|
21
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.CONTINENT, [continentId]]]));
|
|
22
|
-
const result = await continentPolicy.shouldIndex();
|
|
23
|
-
expect(result).toBe(true);
|
|
24
|
-
});
|
|
25
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should return false when the selected portal type is %s', async (portalType) => {
|
|
26
|
-
const continentId = '1'; // Europe
|
|
27
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.CONTINENT, [continentId]]]));
|
|
28
|
-
searchDependenciesHelper.setPortalType(portalType);
|
|
29
|
-
const result = await continentPolicy.shouldIndex();
|
|
30
|
-
expect(result).toBe(false);
|
|
31
|
-
});
|
|
32
|
-
it('Should return false when area when University Meta Ranking sorting is selected', async () => {
|
|
33
|
-
const continentId = '1'; // Europe
|
|
34
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.CONTINENT, [continentId]]]));
|
|
35
|
-
searchDependenciesHelper.setSortingState(SortingOptions.UNIVERSITY_META_RANKING);
|
|
36
|
-
const result = await continentPolicy.shouldIndex();
|
|
37
|
-
expect(result).toBe(false);
|
|
38
|
-
});
|
|
39
|
-
it('Should return false when multiple continents are selected', async () => {
|
|
40
|
-
const firstContinentId = '1'; // Europe
|
|
41
|
-
const secondContinentId = '9'; // Asia
|
|
42
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.CONTINENT, [firstContinentId, secondContinentId]]]));
|
|
43
|
-
const result = await continentPolicy.shouldIndex();
|
|
44
|
-
expect(result).toBe(false);
|
|
45
|
-
});
|
|
46
|
-
it('Should return false when no continents are selected', async () => {
|
|
47
|
-
const countryId = '30'; // UK
|
|
48
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([[FilterKey.COUNTRY, [countryId]]]));
|
|
49
|
-
const result = await continentPolicy.shouldIndex();
|
|
50
|
-
expect(result).toBe(false);
|
|
51
|
-
});
|
|
52
|
-
it('Should return false when other filters are selected', async () => {
|
|
53
|
-
const continentId = '1'; // Europe
|
|
54
|
-
const areaId = '996'; // England
|
|
55
|
-
const countryId = '30'; // UK
|
|
56
|
-
searchDependenciesHelper.setFilterKeyValues(new Map([
|
|
57
|
-
[FilterKey.AREA, [areaId]],
|
|
58
|
-
[FilterKey.COUNTRY, [countryId]],
|
|
59
|
-
[FilterKey.CONTINENT, [continentId]]
|
|
60
|
-
]));
|
|
61
|
-
const result = await continentPolicy.shouldIndex();
|
|
62
|
-
expect(result).toBe(false);
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('generateSitemapUrls', () => {
|
|
66
|
-
let sitemapDependenciesHelper;
|
|
67
|
-
let continentPolicy;
|
|
68
|
-
let continentFragments;
|
|
69
|
-
beforeEach(() => {
|
|
70
|
-
sitemapDependenciesHelper = new SitemapDependencies();
|
|
71
|
-
sitemapDependenciesHelper.setOrganisationCount(10);
|
|
72
|
-
continentPolicy = new Continent(sitemapDependenciesHelper.dependencies);
|
|
73
|
-
vi.spyOn(ContinentPresenter, 'getInstance').mockReturnValue({
|
|
74
|
-
getFragments: vi.fn(() => continentFragments),
|
|
75
|
-
generatePaths: vi.fn(() => continentFragments),
|
|
76
|
-
fragments: continentFragments
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
it('Should return path when all conditions are met', async () => {
|
|
80
|
-
const continentId = '1'; // Europe
|
|
81
|
-
const continentPath = 'path';
|
|
82
|
-
continentFragments = [
|
|
83
|
-
{
|
|
84
|
-
id: continentId,
|
|
85
|
-
path: continentPath
|
|
86
|
-
}
|
|
87
|
-
];
|
|
88
|
-
const result = await continentPolicy.generateSitemapUrls();
|
|
89
|
-
expect(result).toEqual([`${continentPath}`]);
|
|
90
|
-
});
|
|
91
|
-
it.each([[PortalType.BACHELOR], [PortalType.PHD], [PortalType.SHORT]])('Should not return path when portal type is %s', async (portalType) => {
|
|
92
|
-
const continentId = '1'; // Europe
|
|
93
|
-
const continentPath = 'path';
|
|
94
|
-
continentFragments = [
|
|
95
|
-
{
|
|
96
|
-
id: continentId,
|
|
97
|
-
path: continentPath
|
|
98
|
-
}
|
|
99
|
-
];
|
|
100
|
-
sitemapDependenciesHelper.setPortalType(portalType);
|
|
101
|
-
const result = await continentPolicy.generateSitemapUrls();
|
|
102
|
-
expect(result).toEqual([]);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|