Skip to content

Commit

Permalink
Attempt to fix functional tests
Browse files Browse the repository at this point in the history
  • Loading branch information
monsieurswag committed Dec 3, 2024
1 parent 61edd8b commit e79c87c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions enterprise/frontend/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
$: if (browser && $page.url.searchParams.has('refresh')) {
$page.url.searchParams.delete('refresh');
console.error(`[DEBUG2] ${window.location.href}`); // Just to test if the playwright JS console stderr would actually be outputed in the logs
// window.location.href = $page.url.href;
window.location.href = $page.url.href;
}
</script>

Expand Down
8 changes: 3 additions & 5 deletions frontend/src/routes/(app)/+page.server.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { redirect } from '@sveltejs/kit';
import type { PageServerLoad } from './$types';
import { CI_TEST } from '$lib/utils/env_constants';

const redirectURL = CI_TEST ? '/analytics' : '/analytics?refresh=1';

export const load: PageServerLoad = async () => {
redirect(301, redirectURL);
export const load: PageServerLoad = async ({ url }) => {
const queryParams = url.searchParams.has("refresh") ? "?refresh=1" : "";
redirect(301, `/analytics${queryParams}`);
};
1 change: 0 additions & 1 deletion frontend/src/routes/(authentication)/login/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ interface AuthenticationFlow {
function makeRedirectURL(currentLang: string, preferedLang: string, url: URL): string {
const next = url.searchParams.get('next');
const secureNext = getSecureRedirect(next) || '/';
console.error(`[DEBUG] '${currentLang}' === '${preferedLang}'`);
if (currentLang === preferedLang) {
return secureNext;
}
Expand Down

0 comments on commit e79c87c

Please sign in to comment.