From 1e45446db5f3c202bc18678fe99b23adf660898e Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 26 Oct 2023 12:53:15 +0200 Subject: [PATCH] test(Feature Amounts): Fixes upload feature shapefile after undoing legacy project hack --- .../upload-feature/upload-feature-csv.e2e-spec.ts | 1 - .../test/upload-feature/upload-feature.fixtures.ts | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/api/apps/api/test/upload-feature/upload-feature-csv.e2e-spec.ts b/api/apps/api/test/upload-feature/upload-feature-csv.e2e-spec.ts index 85fd5616a7..b6f88777b1 100644 --- a/api/apps/api/test/upload-feature/upload-feature-csv.e2e-spec.ts +++ b/api/apps/api/test/upload-feature/upload-feature-csv.e2e-spec.ts @@ -20,7 +20,6 @@ test(`custom feature csv upload`, async () => { await fixtures.ThenNewFeaturesAmountsAreCreated(); await fixtures.ThenFeatureAmountPerPlanningUnitAreCreated(); await fixtures.ThenFeatureUploadRegistryIsCleared(); - await fixtures.ThenProjectSourcesIsSetToLegacyProject(); }); test('custom feature csv upload when project not found', async () => { diff --git a/api/apps/api/test/upload-feature/upload-feature.fixtures.ts b/api/apps/api/test/upload-feature/upload-feature.fixtures.ts index 10a9e9aa51..08f192c1ae 100644 --- a/api/apps/api/test/upload-feature/upload-feature.fixtures.ts +++ b/api/apps/api/test/upload-feature/upload-feature.fixtures.ts @@ -13,7 +13,6 @@ import { GivenProjectsPuExists } from '../../../geoprocessing/test/steps/given-p import { HttpStatus } from '@nestjs/common'; import { GeoFeatureTag } from '@marxan-api/modules/geo-feature-tags/geo-feature-tag.api.entity'; import { tagMaxlength } from '@marxan-api/modules/geo-feature-tags/dto/update-geo-feature-tag.dto'; -import { Project } from '@marxan-api/modules/projects/project.api.entity'; import { FeatureAmountsPerPlanningUnitEntity } from '@marxan/feature-amounts-per-planning-unit'; export const getFixtures = async () => { @@ -51,10 +50,6 @@ export const getFixtures = async () => { getRepositoryToken(GeoFeature, DbConnections.default), ); - const projectsRepository: Repository = app.get( - getRepositoryToken(Project, DbConnections.default), - ); - const featuresAmountsGeoDbRepository: Repository = app.get( getRepositoryToken(GeoFeatureGeometry, DbConnections.geoprocessingDB), @@ -432,11 +427,5 @@ export const getFixtures = async () => { }); expect(featureImportRegistryRecord).toBeFalsy(); }, - ThenProjectSourcesIsSetToLegacyProject: async () => { - const project = await projectsRepository.findOne({ - where: { id: projectId }, - }); - expect(project?.sources).toEqual('legacy_import'); - }, }; };