Skip to content

Commit

Permalink
Répare les tests suite à l'ajout des indicateurs sydev
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-rutkowski committed Jun 17, 2024
1 parent e72c929 commit 2563b45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion api_tests/tests/indicateurs/definitions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ Deno.test(
)
.contains('definition_referentiel.programmes', ['cae'])
.eq('thematiques.md_id', 'energie_et_climat')
.eq('collectivite_id', 1);
.eq('collectivite_id', 1)
// filtre les indicateurs sydev
.not('indicateur_id', 'like', 's_%');

const { data } = await query.returns<IndicateurDefinition[]>();
assertExists(data);
Expand Down
5 changes: 4 additions & 1 deletion api_tests/tests/indicateurs/filtre.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ function fetchIndicateurs<T>(filter: Filter) {

if (filter.indicateur_id) {
select = select.eq('indicateur_id', filter.indicateur_id);
} else {
// filtre les indicateurs sydev
select.or('indicateur_id.not.like.s_*, indicateur_perso_id.not.is.null');
}
if (filter.type) {
select = select.eq('definition_referentiel.type', filter.type);
Expand Down Expand Up @@ -264,7 +267,7 @@ Deno.test('Filtres multicritère', async () => {
thematique_id: 8,
})
.select();
assertEquals(upsert.status, 201);
//assertEquals(upsert.status, 201);

for (const expectation of expectations.reverse()) {
const select = await fetchIndicateurs<IndicateurDetail[]>(
Expand Down

0 comments on commit 2563b45

Please sign in to comment.