Skip to content

Commit

Permalink
Remove surplus test suites
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Dec 11, 2023
1 parent 22f2a68 commit 7d8f6fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ describe('mission data listing & download', () => {
`"Mission dataService points visited: 13Products checked: 7Number of flagged products: 3Download mission data"`
);
expect(wrapper.find('Button').text()).toEqual('Download mission data');
// downloads mission data
expect(wrapper.find('a').at(0).props().href).toEqual(
'https://opensrp-stage.smartregister.org/opensrp/rest/event/export-data?eventTypes=flag_problem,service_point_check,looks_good,record_gps&planIdentifier=335ef7a3-7f35-58aa-8263-4419464946d8'
);

expect(fetch.mock.calls).toEqual([
[
'https://opensrp-stage.smartregister.org/opensrp/rest/task/search?planIdentifier=335ef7a3-7f35-58aa-8263-4419464946d8&code=service_point_check&returnTaskCountOnly=true&status=Completed',
Expand Down
13 changes: 1 addition & 12 deletions packages/opensrp-plans/src/helpers/tests/utils.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,12 @@ import {
ACTIVE_PLANS_LIST_VIEW_URL,
COMPLETE_PLANS_LIST_VIEW_URL,
DRAFT_PLANS_LIST_VIEW_URL,
OPENSRP_API_BASE_URL,
SORT_BY_EFFECTIVE_PERIOD_START_FIELD,
RETIRED_PLANS_LIST_VIEW_URL,
} from '../../constants';
import * as planDefinitionFixtures from '../../ducks/planDefinitions/tests/fixtures';
import { InterventionType, PlanDefinition, PlanStatus } from '@opensrp/plan-form-core';
import {
descendingOrderSort,
isPlanDefinitionOfType,
getPlanType,
BuildDownloadUrl,
} from '../utils';
import { descendingOrderSort, isPlanDefinitionOfType, getPlanType } from '../utils';
import { redirectPathGetter } from '../common';

describe('helpers/utils', () => {
Expand Down Expand Up @@ -76,9 +70,4 @@ describe('helpers/utils', () => {
expect(redirectPathGetter(PlanStatus.COMPLETE)).toEqual(COMPLETE_PLANS_LIST_VIEW_URL);
expect(redirectPathGetter(PlanStatus.RETIRED)).toEqual(RETIRED_PLANS_LIST_VIEW_URL);
});
it('tests BuildDownloadUrl', () => {
expect(BuildDownloadUrl(OPENSRP_API_BASE_URL, '123')).toEqual(
'https://opensrp-stage.smartregister.org/opensrp/rest/event/export-data?eventTypes=flag_problem,service_point_check,looks_good,record_gps&planIdentifier=123'
);
});
});

0 comments on commit 7d8f6fc

Please sign in to comment.