diff --git a/.github/workflows/tests-api-e2e.yml b/.github/workflows/tests-api-e2e.yml index bc6f1fed7d..0c2b22099b 100644 --- a/.github/workflows/tests-api-e2e.yml +++ b/.github/workflows/tests-api-e2e.yml @@ -28,7 +28,15 @@ jobs: - 'implicit-permissions' - 'integration' - 'legacy-project-import' - - 'project' + - 'projects/blm-calibration' + - 'projects/crud' + - 'projects/project-feature-tags' + - 'projects/user-projects' + - 'projects/cost-surfaces' + - 'projects/project-cloning' + - 'projects/project-scenario-comparison' + - 'projects/project-summaries' + - 'projects/published-projects' - 'project-jobs-status' - 'project-planning-areas-tiles' - 'project-planning-units' diff --git a/api/apps/api/test/project/update-project-calibration.e2e-spec.ts b/api/apps/api/test/projects/blm-calibration/update-project-calibration.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/update-project-calibration.e2e-spec.ts rename to api/apps/api/test/projects/blm-calibration/update-project-calibration.e2e-spec.ts diff --git a/api/apps/api/test/project/update-project-calibration.fixtures.ts b/api/apps/api/test/projects/blm-calibration/update-project-calibration.fixtures.ts similarity index 90% rename from api/apps/api/test/project/update-project-calibration.fixtures.ts rename to api/apps/api/test/projects/blm-calibration/update-project-calibration.fixtures.ts index 6195a21016..30fc4c9204 100644 --- a/api/apps/api/test/project/update-project-calibration.fixtures.ts +++ b/api/apps/api/test/projects/blm-calibration/update-project-calibration.fixtures.ts @@ -1,8 +1,8 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { E2E_CONFIG } from '../e2e.config'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { E2E_CONFIG } from '../../e2e.config'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; import * as request from 'supertest'; import { CommandBus } from '@nestjs/cqrs'; import { SetProjectBlm } from '@marxan-api/modules/projects/blm/set-project-blm'; diff --git a/api/apps/api/test/project/project-cost-surface.controller.acl.e2e-spec.ts b/api/apps/api/test/projects/cost-surfaces/project-cost-surface.controller.acl.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/project-cost-surface.controller.acl.e2e-spec.ts rename to api/apps/api/test/projects/cost-surfaces/project-cost-surface.controller.acl.e2e-spec.ts diff --git a/api/apps/api/test/project/project-cost-surface.e2e-spec.ts b/api/apps/api/test/projects/cost-surfaces/project-cost-surface.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/project-cost-surface.e2e-spec.ts rename to api/apps/api/test/projects/cost-surfaces/project-cost-surface.e2e-spec.ts diff --git a/api/apps/api/test/project/project-cost-surface.fixtures.ts b/api/apps/api/test/projects/cost-surfaces/project-cost-surface.fixtures.ts similarity index 98% rename from api/apps/api/test/project/project-cost-surface.fixtures.ts rename to api/apps/api/test/projects/cost-surfaces/project-cost-surface.fixtures.ts index bfc74d6174..bb3d471bc8 100644 --- a/api/apps/api/test/project/project-cost-surface.fixtures.ts +++ b/api/apps/api/test/projects/cost-surfaces/project-cost-surface.fixtures.ts @@ -1,4 +1,4 @@ -import { bootstrapApplication } from '../utils/api-application'; +import { bootstrapApplication } from '../../utils/api-application'; import { getEntityManagerToken, getRepositoryToken, @@ -13,8 +13,8 @@ import { ScenariosPuCostDataGeo, } from '@marxan/scenarios-planning-unit'; import { DbConnections } from '@marxan-api/ormconfig.connections'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { GivenUserExists } from '../steps/given-user-exists'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { GivenUserExists } from '../../steps/given-user-exists'; import { EntityManager, Repository } from 'typeorm'; import { Project } from '@marxan-api/modules/projects/project.api.entity'; import { Organization } from '@marxan-api/modules/organizations/organization.api.entity'; diff --git a/api/apps/api/test/project/delete-project-feature.e2e-spec.ts b/api/apps/api/test/projects/crud/delete-project-feature.e2e-spec.ts similarity index 95% rename from api/apps/api/test/project/delete-project-feature.e2e-spec.ts rename to api/apps/api/test/projects/crud/delete-project-feature.e2e-spec.ts index a26ef1468c..37c9e99ea9 100644 --- a/api/apps/api/test/project/delete-project-feature.e2e-spec.ts +++ b/api/apps/api/test/projects/crud/delete-project-feature.e2e-spec.ts @@ -2,9 +2,9 @@ import { FixtureType } from '@marxan/utils/tests/fixture-type'; import { getEntityManagerToken, getRepositoryToken } from '@nestjs/typeorm'; import * as request from 'supertest'; import { EntityManager, Repository } from 'typeorm'; -import { GivenProjectExists } from '../steps/given-project'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; +import { GivenProjectExists } from '../../steps/given-project'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; import { GeoFeature } from '@marxan-api/modules/geo-features/geo-feature.api.entity'; import { v4 } from 'uuid'; import { @@ -13,11 +13,11 @@ import { } from '@marxan-api/modules/scenarios/scenario.api.entity'; import { ProjectRoles } from '@marxan-api/modules/access-control/projects-acl/dto/user-role-project.dto'; import { UsersProjectsApiEntity } from '@marxan-api/modules/access-control/projects-acl/entity/users-projects.api.entity'; -import { GivenUserExists } from '../steps/given-user-exists'; -import { GivenScenarioFeaturesData } from '../../../geoprocessing/test/integration/cloning/fixtures'; +import { GivenUserExists } from '../../steps/given-user-exists'; +import { GivenScenarioFeaturesData } from '../../../../geoprocessing/test/integration/cloning/fixtures'; import { GeoFeatureGeometry } from '@marxan/geofeatures'; import { apiConnections } from '@marxan-api/ormconfig'; -import { GivenScenarioExists } from '../steps/given-scenario-exists'; +import { GivenScenarioExists } from '../../steps/given-scenario-exists'; import { DbConnections } from '@marxan-api/ormconfig.connections'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/delete-project.e2e-spec.ts b/api/apps/api/test/projects/crud/delete-project.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/delete-project.e2e-spec.ts rename to api/apps/api/test/projects/crud/delete-project.e2e-spec.ts diff --git a/api/apps/api/test/project/delete-project.fixtures.ts b/api/apps/api/test/projects/crud/delete-project.fixtures.ts similarity index 83% rename from api/apps/api/test/project/delete-project.fixtures.ts rename to api/apps/api/test/projects/crud/delete-project.fixtures.ts index d2f32c79a5..e82fb36f6f 100644 --- a/api/apps/api/test/project/delete-project.fixtures.ts +++ b/api/apps/api/test/projects/crud/delete-project.fixtures.ts @@ -1,11 +1,11 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { E2E_CONFIG } from '../e2e.config'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { E2E_CONFIG } from '../../e2e.config'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; import * as request from 'supertest'; import { CqrsModule } from '@nestjs/cqrs'; -import { EventBusTestUtils } from '../utils/event-bus.test.utils'; +import { EventBusTestUtils } from '../../utils/event-bus.test.utils'; import { ProjectDeleted } from '@marxan-api/modules/projects/events/project-deleted.event'; export const getFixtures = async () => { diff --git a/api/apps/api/test/project/project-get.e2e-spec.ts b/api/apps/api/test/projects/crud/project-get.e2e-spec.ts similarity index 95% rename from api/apps/api/test/project/project-get.e2e-spec.ts rename to api/apps/api/test/projects/crud/project-get.e2e-spec.ts index a1594f9f19..ad30adb5db 100644 --- a/api/apps/api/test/project/project-get.e2e-spec.ts +++ b/api/apps/api/test/projects/crud/project-get.e2e-spec.ts @@ -1,5 +1,5 @@ import { FixtureType } from '@marxan/utils/tests/fixture-type'; -import { getFixtures } from './projects.fixtures'; +import { getFixtures } from '../projects.fixtures'; let fixtures: FixtureType; diff --git a/api/apps/api/test/projects.e2e-spec.ts b/api/apps/api/test/projects/crud/projects.e2e-spec.ts similarity index 98% rename from api/apps/api/test/projects.e2e-spec.ts rename to api/apps/api/test/projects/crud/projects.e2e-spec.ts index 377a73c4ca..6a1af58d99 100644 --- a/api/apps/api/test/projects.e2e-spec.ts +++ b/api/apps/api/test/projects/crud/projects.e2e-spec.ts @@ -1,6 +1,6 @@ import { HttpStatus } from '@nestjs/common'; -import { E2E_CONFIG } from './e2e.config'; -import { TestClientApi } from './utils/test-client/test-client-api'; +import { E2E_CONFIG } from '../../e2e.config'; +import { TestClientApi } from '../../utils/test-client/test-client-api'; import { Repository } from 'typeorm'; import { CostSurface } from '@marxan-api/modules/cost-surface/cost-surface.api.entity'; import { getRepositoryToken } from '@nestjs/typeorm'; diff --git a/api/apps/api/test/project/update-project.e2e-spec.ts b/api/apps/api/test/projects/crud/update-project.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/update-project.e2e-spec.ts rename to api/apps/api/test/projects/crud/update-project.e2e-spec.ts diff --git a/api/apps/api/test/project/update-project.fixtures.ts b/api/apps/api/test/projects/crud/update-project.fixtures.ts similarity index 86% rename from api/apps/api/test/project/update-project.fixtures.ts rename to api/apps/api/test/projects/crud/update-project.fixtures.ts index 84f9d8f79f..2091300734 100644 --- a/api/apps/api/test/project/update-project.fixtures.ts +++ b/api/apps/api/test/projects/crud/update-project.fixtures.ts @@ -1,11 +1,11 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { E2E_CONFIG } from '../e2e.config'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { E2E_CONFIG } from '../../e2e.config'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; import * as request from 'supertest'; import { ProjectChecker } from '@marxan-api/modules/projects/project-checker/project-checker.service'; -import { ProjectCheckerFake } from '../utils/project-checker.service-fake'; +import { ProjectCheckerFake } from '../../utils/project-checker.service-fake'; import { HttpStatus } from '@nestjs/common'; export const getFixtures = async () => { diff --git a/api/apps/api/test/project/clone-project.e2e-spec.ts b/api/apps/api/test/projects/project-cloning/clone-project.e2e-spec.ts similarity index 94% rename from api/apps/api/test/project/clone-project.e2e-spec.ts rename to api/apps/api/test/projects/project-cloning/clone-project.e2e-spec.ts index 9fa9529321..301e2befe0 100644 --- a/api/apps/api/test/project/clone-project.e2e-spec.ts +++ b/api/apps/api/test/projects/project-cloning/clone-project.e2e-spec.ts @@ -33,13 +33,13 @@ import { isLeft } from 'fp-ts/lib/These'; import { Readable } from 'stream'; import * as request from 'supertest'; import { DataSource, Repository } from 'typeorm'; -import { GivenProjectExists } from '../steps/given-project'; -import { GivenUserExists } from '../steps/given-user-exists'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; -import { EventBusTestUtils } from '../utils/event-bus.test.utils'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { GivenProjectExists } from '../../steps/given-project'; +import { GivenUserExists } from '../../steps/given-user-exists'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { EventBusTestUtils } from '../../utils/event-bus.test.utils'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/get-export-file.e2e-spec.ts b/api/apps/api/test/projects/project-cloning/get-export-file.e2e-spec.ts similarity index 95% rename from api/apps/api/test/project/get-export-file.e2e-spec.ts rename to api/apps/api/test/projects/project-cloning/get-export-file.e2e-spec.ts index 70d0534a0a..c1830ea5eb 100644 --- a/api/apps/api/test/project/get-export-file.e2e-spec.ts +++ b/api/apps/api/test/projects/project-cloning/get-export-file.e2e-spec.ts @@ -17,11 +17,11 @@ import { isLeft } from 'fp-ts/lib/These'; import { Readable } from 'stream'; import * as request from 'supertest'; import { Repository } from 'typeorm'; -import { GivenProjectExists } from '../steps/given-project'; -import { GivenUserExists } from '../steps/given-user-exists'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; -import { EventBusTestUtils } from '../utils/event-bus.test.utils'; +import { GivenProjectExists } from '../../steps/given-project'; +import { GivenUserExists } from '../../steps/given-user-exists'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { EventBusTestUtils } from '../../utils/event-bus.test.utils'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/get-latest-export.e2e-spec.ts b/api/apps/api/test/projects/project-cloning/get-latest-export.e2e-spec.ts similarity index 95% rename from api/apps/api/test/project/get-latest-export.e2e-spec.ts rename to api/apps/api/test/projects/project-cloning/get-latest-export.e2e-spec.ts index 3077cc71b4..c84f684042 100644 --- a/api/apps/api/test/project/get-latest-export.e2e-spec.ts +++ b/api/apps/api/test/projects/project-cloning/get-latest-export.e2e-spec.ts @@ -17,11 +17,11 @@ import { isLeft } from 'fp-ts/lib/These'; import { Readable } from 'stream'; import * as request from 'supertest'; import { Repository } from 'typeorm'; -import { GivenProjectExists } from '../steps/given-project'; -import { GivenUserExists } from '../steps/given-user-exists'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; -import { EventBusTestUtils } from '../utils/event-bus.test.utils'; +import { GivenProjectExists } from '../../steps/given-project'; +import { GivenUserExists } from '../../steps/given-user-exists'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { EventBusTestUtils } from '../../utils/event-bus.test.utils'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/import-project.e2e-spec.ts b/api/apps/api/test/projects/project-cloning/import-project.e2e-spec.ts similarity index 94% rename from api/apps/api/test/project/import-project.e2e-spec.ts rename to api/apps/api/test/projects/project-cloning/import-project.e2e-spec.ts index 98789eab09..348189643c 100644 --- a/api/apps/api/test/project/import-project.e2e-spec.ts +++ b/api/apps/api/test/projects/project-cloning/import-project.e2e-spec.ts @@ -32,12 +32,12 @@ import { Readable } from 'stream'; import * as request from 'supertest'; import { DataSource } from 'typeorm'; import { v4 } from 'uuid'; -import { ExportId } from '../../src/modules/clone'; -import { ExportRepository } from '../../src/modules/clone/export/application/export-repository.port'; -import { ManifestFileService } from '../../src/modules/clone/export/application/manifest-file-service.port'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; -import { EventBusTestUtils } from '../utils/event-bus.test.utils'; +import { ExportId } from '../../../src/modules/clone'; +import { ExportRepository } from '../../../src/modules/clone/export/application/export-repository.port'; +import { ManifestFileService } from '../../../src/modules/clone/export/application/manifest-file-service.port'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { EventBusTestUtils } from '../../utils/event-bus.test.utils'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/request-project-export.e2e-spec.ts b/api/apps/api/test/projects/project-cloning/request-project-export.e2e-spec.ts similarity index 89% rename from api/apps/api/test/project/request-project-export.e2e-spec.ts rename to api/apps/api/test/projects/project-cloning/request-project-export.e2e-spec.ts index 9efb011996..58fa6ade3f 100644 --- a/api/apps/api/test/project/request-project-export.e2e-spec.ts +++ b/api/apps/api/test/projects/project-cloning/request-project-export.e2e-spec.ts @@ -5,17 +5,17 @@ import { FixtureType } from '@marxan/utils/tests/fixture-type'; import { getRepositoryToken } from '@nestjs/typeorm'; import * as request from 'supertest'; import { Repository } from 'typeorm'; -import { ProjectChecker } from '../../src/modules/projects/project-checker/project-checker.service'; -import { ScenarioChecker } from '../../src/modules/scenarios/scenario-checker/scenario-checker.service'; -import { GivenProjectExists } from '../steps/given-project'; -import { GivenScenarioExists } from '../steps/given-scenario-exists'; -import { GivenUserExists } from '../steps/given-user-exists'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { bootstrapApplication } from '../utils/api-application'; -import { ProjectCheckerFake } from '../utils/project-checker.service-fake'; -import { ScenarioCheckerFake } from '../utils/scenario-checker.service-fake'; -import { FakeQueue } from '../utils/queues'; -import { exportPieceQueueToken } from '../../src/modules/clone/infra/export/export-queue.provider'; +import { ProjectChecker } from '../../../src/modules/projects/project-checker/project-checker.service'; +import { ScenarioChecker } from '../../../src/modules/scenarios/scenario-checker/scenario-checker.service'; +import { GivenProjectExists } from '../../steps/given-project'; +import { GivenScenarioExists } from '../../steps/given-scenario-exists'; +import { GivenUserExists } from '../../steps/given-user-exists'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { ProjectCheckerFake } from '../../utils/project-checker.service-fake'; +import { ScenarioCheckerFake } from '../../utils/scenario-checker.service-fake'; +import { FakeQueue } from '../../utils/queues'; +import { exportPieceQueueToken } from '../../../src/modules/clone/infra/export/export-queue.provider'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/project-tags-acl.e2e-spec.ts b/api/apps/api/test/projects/project-feature-tags/project-tags-acl.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/project-tags-acl.e2e-spec.ts rename to api/apps/api/test/projects/project-feature-tags/project-tags-acl.e2e-spec.ts diff --git a/api/apps/api/test/project/project-tags.e2e-spec.ts b/api/apps/api/test/projects/project-feature-tags/project-tags.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/project-tags.e2e-spec.ts rename to api/apps/api/test/projects/project-feature-tags/project-tags.e2e-spec.ts diff --git a/api/apps/api/test/project/project-tags.fixtures.ts b/api/apps/api/test/projects/project-feature-tags/project-tags.fixtures.ts similarity index 95% rename from api/apps/api/test/project/project-tags.fixtures.ts rename to api/apps/api/test/projects/project-feature-tags/project-tags.fixtures.ts index 92aff8d263..fc1e94368c 100644 --- a/api/apps/api/test/project/project-tags.fixtures.ts +++ b/api/apps/api/test/projects/project-feature-tags/project-tags.fixtures.ts @@ -1,19 +1,19 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; import { ILike, Repository } from 'typeorm'; import { Project } from '@marxan-api/modules/projects/project.api.entity'; import { getRepositoryToken } from '@nestjs/typeorm'; import { Organization } from '@marxan-api/modules/organizations/organization.api.entity'; import { GeoFeature } from '@marxan-api/modules/geo-features/geo-feature.api.entity'; import { GeoFeatureTag } from '@marxan-api/modules/geo-feature-tags/geo-feature-tag.api.entity'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { E2E_CONFIG } from '../e2e.config'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { E2E_CONFIG } from '../../e2e.config'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; import * as request from 'supertest'; import { ProjectRoles } from '@marxan-api/modules/access-control/projects-acl/dto/user-role-project.dto'; import { UsersProjectsApiEntity } from '@marxan-api/modules/access-control/projects-acl/entity/users-projects.api.entity'; -import { GivenUserExists } from '../steps/given-user-exists'; +import { GivenUserExists } from '../../steps/given-user-exists'; import { tagMaxlength } from '@marxan-api/modules/geo-feature-tags/dto/update-geo-feature-tag.dto'; import { GeoFeaturesService } from '@marxan-api/modules/geo-features'; diff --git a/api/apps/api/test/project/comparison-map.e2e-spec.ts b/api/apps/api/test/projects/project-scenario-comparison/comparison-map.e2e-spec.ts similarity index 92% rename from api/apps/api/test/project/comparison-map.e2e-spec.ts rename to api/apps/api/test/projects/project-scenario-comparison/comparison-map.e2e-spec.ts index 76f5500135..3e79615149 100644 --- a/api/apps/api/test/project/comparison-map.e2e-spec.ts +++ b/api/apps/api/test/projects/project-scenario-comparison/comparison-map.e2e-spec.ts @@ -1,5 +1,5 @@ import { FixtureType } from '@marxan/utils/tests/fixture-type'; -import { getFixtures } from './projects.fixtures'; +import { getFixtures } from '../projects.fixtures'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/output-project-summaries.e2e-spec.ts b/api/apps/api/test/projects/project-summaries/output-project-summaries.e2e-spec.ts similarity index 98% rename from api/apps/api/test/project/output-project-summaries.e2e-spec.ts rename to api/apps/api/test/projects/project-summaries/output-project-summaries.e2e-spec.ts index b08f675d1a..4a33f61a22 100644 --- a/api/apps/api/test/project/output-project-summaries.e2e-spec.ts +++ b/api/apps/api/test/projects/project-summaries/output-project-summaries.e2e-spec.ts @@ -13,13 +13,13 @@ import { ProjectsPuEntity } from '@marxan-jobs/planning-unit-geometry'; import { parseStream } from 'fast-csv'; import { Readable } from 'stream'; import { DbConnections } from '@marxan-api/ormconfig.connections'; -import { bootstrapApplication } from '../utils/api-application'; -import { GivenScenarioPuData } from '../../../geoprocessing/test/steps/given-scenario-pu-data-exists'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenScenarioPuData } from '../../../../geoprocessing/test/steps/given-scenario-pu-data-exists'; import { Scenario } from '@marxan-api/modules/scenarios/scenario.api.entity'; import { Project } from '@marxan-api/modules/projects/project.api.entity'; import { Organization } from '@marxan-api/modules/organizations/organization.api.entity'; import { Parse, ParseStream } from 'unzipper'; -import { GivenProjectsPu } from '../../../geoprocessing/test/steps/given-projects-pu-exists'; +import { GivenProjectsPu } from '../../../../geoprocessing/test/steps/given-projects-pu-exists'; import { CostSurface } from '@marxan-api/modules/cost-surface/cost-surface.api.entity'; let fixtures: PromiseType>; diff --git a/api/apps/api/test/project/project-output-summary-acl.e2e-spec.ts b/api/apps/api/test/projects/project-summaries/project-output-summary-acl.e2e-spec.ts similarity index 90% rename from api/apps/api/test/project/project-output-summary-acl.e2e-spec.ts rename to api/apps/api/test/projects/project-summaries/project-output-summary-acl.e2e-spec.ts index 1e06cb3131..511f55b91f 100644 --- a/api/apps/api/test/project/project-output-summary-acl.e2e-spec.ts +++ b/api/apps/api/test/projects/project-summaries/project-output-summary-acl.e2e-spec.ts @@ -1,7 +1,7 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn, userObj } from '../steps/given-user-is-logged-in'; -import { GivenUserIsCreated } from '../steps/given-user-is-created'; -import { GivenProjectExists } from '../steps/given-project'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn, userObj } from '../../steps/given-user-is-logged-in'; +import { GivenUserIsCreated } from '../../steps/given-user-is-created'; +import { GivenProjectExists } from '../../steps/given-project'; import { Repository } from 'typeorm'; import { getRepositoryToken } from '@nestjs/typeorm'; diff --git a/api/apps/api/test/project/project-output-summary.e2e-spec.ts b/api/apps/api/test/projects/project-summaries/project-output-summary.e2e-spec.ts similarity index 94% rename from api/apps/api/test/project/project-output-summary.e2e-spec.ts rename to api/apps/api/test/projects/project-summaries/project-output-summary.e2e-spec.ts index e8df7fa808..af09d12280 100644 --- a/api/apps/api/test/project/project-output-summary.e2e-spec.ts +++ b/api/apps/api/test/projects/project-summaries/project-output-summary.e2e-spec.ts @@ -1,6 +1,6 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn, userObj } from '../steps/given-user-is-logged-in'; -import { GivenProjectExists } from '../steps/given-project'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn, userObj } from '../../steps/given-user-is-logged-in'; +import { GivenProjectExists } from '../../steps/given-project'; import { Repository } from 'typeorm'; import { getRepositoryToken } from '@nestjs/typeorm'; import * as archiver from 'archiver'; diff --git a/api/apps/api/test/project/projects-world.ts b/api/apps/api/test/projects/projects-world.ts similarity index 100% rename from api/apps/api/test/project/projects-world.ts rename to api/apps/api/test/projects/projects-world.ts diff --git a/api/apps/api/test/project/projects.fixtures.ts b/api/apps/api/test/projects/projects.fixtures.ts similarity index 100% rename from api/apps/api/test/project/projects.fixtures.ts rename to api/apps/api/test/projects/projects.fixtures.ts diff --git a/api/apps/api/test/project/public-projects.e2e-spec.ts b/api/apps/api/test/projects/published-projects/public-projects.e2e-spec.ts similarity index 99% rename from api/apps/api/test/project/public-projects.e2e-spec.ts rename to api/apps/api/test/projects/published-projects/public-projects.e2e-spec.ts index b9a3b9a5f3..9b028c74e0 100644 --- a/api/apps/api/test/project/public-projects.e2e-spec.ts +++ b/api/apps/api/test/projects/published-projects/public-projects.e2e-spec.ts @@ -1,5 +1,5 @@ import { FixtureType } from '@marxan/utils/tests/fixture-type'; -import { getFixtures } from './projects.fixtures'; +import { getFixtures } from '../projects.fixtures'; let fixtures: FixtureType; diff --git a/api/apps/api/test/project/user-projects.e2e-spec.ts b/api/apps/api/test/projects/user-projects/user-projects.e2e-spec.ts similarity index 100% rename from api/apps/api/test/project/user-projects.e2e-spec.ts rename to api/apps/api/test/projects/user-projects/user-projects.e2e-spec.ts diff --git a/api/apps/api/test/project/user-projects.fixtures.ts b/api/apps/api/test/projects/user-projects/user-projects.fixtures.ts similarity index 81% rename from api/apps/api/test/project/user-projects.fixtures.ts rename to api/apps/api/test/projects/user-projects/user-projects.fixtures.ts index 5bafd522b6..448689595d 100644 --- a/api/apps/api/test/project/user-projects.fixtures.ts +++ b/api/apps/api/test/projects/user-projects/user-projects.fixtures.ts @@ -1,7 +1,7 @@ -import { bootstrapApplication } from '../utils/api-application'; -import { GivenUserIsLoggedIn } from '../steps/given-user-is-logged-in'; -import { OrganizationsTestUtils } from '../utils/organizations.test.utils'; -import { ProjectsTestUtils } from '../utils/projects.test.utils'; +import { bootstrapApplication } from '../../utils/api-application'; +import { GivenUserIsLoggedIn } from '../../steps/given-user-is-logged-in'; +import { OrganizationsTestUtils } from '../../utils/organizations.test.utils'; +import { ProjectsTestUtils } from '../../utils/projects.test.utils'; import * as request from 'supertest'; export const getFixtures = async () => {