From 0214369aa6fe70258e44b65b92ba9cb8cdcedbaf 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 d8ab2747bd..b82fe4c0b9 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 @@ -19,7 +19,6 @@ test(`custom feature csv upload`, async () => { await fixtures.ThenNewFeaturesAreCreated(); await fixtures.ThenNewFeaturesAmountsAreCreated(); 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 00fbb2cb28..e5745611d6 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'; export const getFixtures = async () => { const app = await bootstrapApplication(); @@ -50,10 +49,6 @@ export const getFixtures = async () => { getRepositoryToken(GeoFeature, DbConnections.default), ); - const projectsRepository: Repository = app.get( - getRepositoryToken(Project, DbConnections.default), - ); - const featuresAmounsGeoDbRepository: Repository = app.get( getRepositoryToken(GeoFeatureGeometry, DbConnections.geoprocessingDB), ); @@ -391,11 +386,5 @@ export const getFixtures = async () => { }); expect(featureImportRegistryRecord).toBeFalsy(); }, - ThenProjectSourcesIsSetToLegacyProject: async () => { - const project = await projectsRepository.findOne({ - where: { id: projectId }, - }); - expect(project?.sources).toEqual('legacy_import'); - }, }; };