Skip to content

Commit

Permalink
fix: api test flash floods AB#31853
Browse files Browse the repository at this point in the history
  • Loading branch information
jannisvisser committed Dec 3, 2024
1 parent 29b8f35 commit cce4304
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,21 @@ describe('Should send an email for mwi flash flood', () => {
});

it('trigger', async () => {
const eventNames = ['Blantyre City', 'Karonga']; // Scneario contains also 'Rumphi' but as ongoing, for which no email is sent
const result = await testFlashFloodScenario(
FlashFloodsScenario.Trigger,
countryCodeISO3,
eventNames,
accessToken,
);
expect(result).toBeTruthy();
});
}, 90000); //Increase timeout to 90 seconds, because mock takes long for this scenario

it('no-trigger', async () => {
const result = await testFlashFloodScenario(
FlashFloodsScenario.NoTrigger,
countryCodeISO3,
[],
accessToken,
);
expect(result).toBeTruthy();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import {
export async function testFlashFloodScenario(
scenario: FlashFloodsScenario,
countryCodeISO3: string,
eventNames: string[] = [],
accessToken: string,
): Promise<boolean> {
const eventNames = ['Rumphi', 'Karonga'];
const disasterTypeLabel = 'Flash Flood'; // DisasterType.FlashFloods does not match

const mockResult = await mockFlashFlood(
Expand Down

0 comments on commit cce4304

Please sign in to comment.