Skip to content

Commit

Permalink
chore: move tests into own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Dec 3, 2024
1 parent 541fd18 commit bfe14e0
Show file tree
Hide file tree
Showing 14 changed files with 36 additions and 36 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EpidemicsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { EpidemicsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testDengueScenario } from './test-dengue-scenario.helper';

const countryCodeISO3 = 'PHL';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { EpidemicsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { EpidemicsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import {
getEventTitle,
mockEpidemics,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

export async function testDengueScenario(
scenario: EpidemicsScenario,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import {
getAccessToken,
getEventTitle,
mockDynamicData,
resetDB,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

const countryCodeISO3 = 'UGA';
const disasterType = DisasterType.Drought;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FlashFloodsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { FlashFloodsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testFlashFloodScenario } from './test-flash-flood-scenario.helper';

const countryCodeISO3 = 'MWI';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { FlashFloodsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { FlashFloodsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import {
getEventTitle,
mockFlashFlood,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

export async function testFlashFloodScenario(
scenario: FlashFloodsScenario,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FloodsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { FloodsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testFloodScenario } from './test-flood-scenario.helper';

const countryCodeISO3 = 'SSD';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FloodsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { FloodsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testFloodScenario } from './test-flood-scenario.helper';

const countryCodeISO3 = 'UGA';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { FloodsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { FloodsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';

import disasters from '../../../../services/API-service/src/scripts/json/disasters.json';
import disasters from '../../../../../services/API-service/src/scripts/json/disasters.json';
import {
getEventTitle,
mockFloods,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

interface Event {
eventName: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EpidemicsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { EpidemicsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testMalariaScenario } from './test-malaria-scenario.helper';

const countryCodeISO3 = 'ETH';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { EpidemicsScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { EpidemicsScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import {
getEventTitle,
mockEpidemics,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

export async function testMalariaScenario(
scenario: EpidemicsScenario,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { TyphoonScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../helpers/utility.helper';
import { TyphoonScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { getAccessToken, resetDB } from '../../../helpers/utility.helper';
import { testTyphoonScenario } from './test-typhoon-scenario.helper';

const countryCodeISO3 = 'PHL';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { JSDOM } from 'jsdom';

import { DisasterType } from '../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { TyphoonScenario } from '../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import { DisasterType } from '../../../../../services/API-service/src/api/disaster/disaster-type.enum';
import { TyphoonScenario } from '../../../../../services/API-service/src/scripts/enum/mock-scenario.enum';
import {
getEventTitle,
mockTyphoon,
sendNotification,
} from '../../helpers/utility.helper';
} from '../../../helpers/utility.helper';

export async function testTyphoonScenario(
scenario: TyphoonScenario,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { userData } from '../fixtures/users.const';
import { userData } from '../../fixtures/users.const';
import {
changePassword,
getAccessToken,
loginUser,
resetDB,
} from '../helpers/utility.helper';
} from '../../helpers/utility.helper';

describe('change password of user ..', () => {
let accessToken: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { UserRole } from '../../../services/API-service/src/api/user/user-role.enum';
import { userData } from '../fixtures/users.const';
import { UserRole } from '../../../../services/API-service/src/api/user/user-role.enum';
import { userData } from '../../fixtures/users.const';
import {
createUser,
getAccessToken,
loginUser,
resetDB,
} from '../helpers/utility.helper';
} from '../../helpers/utility.helper';

describe('create user', () => {
let accessToken: string;
Expand All @@ -15,7 +15,7 @@ describe('create user', () => {
await resetDB(accessToken);
});

it('successfully and log-in with it', async () => {
it('successfully, and log-in with it', async () => {
// Arrange
let newUserData = structuredClone(userData);
newUserData.email = '[email protected]';
Expand Down

0 comments on commit bfe14e0

Please sign in to comment.