Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI fails on api_tests #3530

Merged
merged 2 commits into from
Jan 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ api-test:
--name api_test_tet \
--network $network \
--env SUPABASE_URL=$API_URL \
--env SUPABASE_KEY=$SERVICE_ROLE_KEY \
--env SUPABASE_ANON_KEY=$SERVICE_ROLE_KEY \
--env SUPABASE_SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY \
api-test:latest test --no-check -A tests/$test/*.test.ts --location 'http://localhost'
END
Expand All @@ -625,7 +625,7 @@ api-crud-test:
--name api_crud_test_tet \
--network $network \
--env SUPABASE_URL=$API_URL \
--env SUPABASE_KEY=$ANON_KEY \
--env SUPABASE_ANON_KEY=$ANON_KEY \
api-test:latest test -A tests/crud/crud.test.ts --location 'http://localhost' -- elements:axe

cypress-wip:
Expand Down
14 changes: 7 additions & 7 deletions api_tests/lib/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import "https://deno.land/x/dotenv/load.ts";
import { createClient } from "https://esm.sh/@supabase/[email protected]";
import { Database } from "./database.types.ts";
import 'https://deno.land/x/dotenv/load.ts';
import { createClient } from 'https://esm.sh/@supabase/[email protected]';
import { Database } from './database.types.ts';

/**
* Supabase client
*/
export const supabase = createClient<Database>(
Deno.env.get("SUPABASE_URL")!,
Deno.env.get("SUPABASE_KEY")!,
Deno.env.get('SUPABASE_URL')!,
Deno.env.get('SUPABASE_ANON_KEY')!,
{
db: {
schema: "public",
schema: 'public',
},
auth: {
// Pour fonctionner avec deno hors du navigateur.
persistSession: false,
},
},
}
);
6 changes: 3 additions & 3 deletions supabase/functions/export_plan_action/exportXLSX.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Export d'un plan d'action au format Excel
*/
import { Workbook, Worksheet } from 'https://esm.sh/[email protected]';
import Excel from 'https://esm.sh/[email protected]';
import { formatDate, setEuroValue } from '../_shared/exportUtils.ts';
import { TSupabaseClient } from '../_shared/getSupabaseClient.ts';
import { ConfigPlanAction } from './config.ts';
Expand All @@ -26,7 +26,7 @@ export const exportXLSX = async (
const titre = ligne1.axe_nom;

// ouvre le classeur et sélectionne la première feuille de calcul
const workbook = new Workbook();
const workbook = new Excel.Workbook();
await workbook.xlsx.load(template);
const worksheet = workbook.worksheets[0];

Expand All @@ -50,7 +50,7 @@ export const exportXLSX = async (

const exportPlan = (
// feuille de calcul dans laquelle écrire
worksheet: Worksheet,
worksheet: Excel.Worksheet,
// données de l'export
data: TExportData
) => {
Expand Down
Loading