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