diff --git a/packages/frontend/src/App.svelte b/packages/frontend/src/App.svelte
index fc268cec..3940eb49 100644
--- a/packages/frontend/src/App.svelte
+++ b/packages/frontend/src/App.svelte
@@ -13,6 +13,7 @@ import Examples from './Examples.svelte';
import Navigation from './Navigation.svelte';
import DiskImagesList from './lib/disk-image/DiskImagesList.svelte';
import Dashboard from './lib/dashboard/Dashboard.svelte';
+import ExampleDetails from './lib/ExampleDetails.svelte';
router.mode.hash();
@@ -41,6 +42,10 @@ onMount(() => {
+
+
+
+
diff --git a/packages/frontend/src/lib/ExampleCard.spec.ts b/packages/frontend/src/lib/ExampleCard.spec.ts
index 66760f9a..042749c4 100644
--- a/packages/frontend/src/lib/ExampleCard.spec.ts
+++ b/packages/frontend/src/lib/ExampleCard.spec.ts
@@ -72,16 +72,16 @@ test('renders ExampleCard with correct content', async () => {
expect(architectureText).toBeInTheDocument();
});
-test('openURL function is called when Source button is clicked', async () => {
+test('redirection to /example/:id is called when More details button is clicked', async () => {
// Render the component with the example prop
render(ExampleCard, { props: { example } });
- // Find and click the "Source" button
- const sourceButton = screen.getByTitle('Source');
- await fireEvent.click(sourceButton);
+ // Find and click the "More details" button
+ const detailsButton = screen.getByTitle('More Details');
+ await fireEvent.click(detailsButton);
- // Ensure bootcClient.openLink is called with the correct URL
- expect(bootcClient.openLink).toHaveBeenCalledWith('https://example.com/example1');
+ // Ensure the router.goto is called with the correct path
+ expect(router.goto).toHaveBeenCalledWith('/example/example1');
});
test('pullImage function is called when Pull image button is clicked', async () => {
diff --git a/packages/frontend/src/lib/ExampleCard.svelte b/packages/frontend/src/lib/ExampleCard.svelte
index e92bfd17..cae60b38 100644
--- a/packages/frontend/src/lib/ExampleCard.svelte
+++ b/packages/frontend/src/lib/ExampleCard.svelte
@@ -16,7 +16,8 @@ let { example }: Props = $props();
let pullInProgress = $state(false);
async function openURL(): Promise {
- await bootcClient.openLink(example.repository);
+ //await bootcClient.openLink(example.repository);
+ router.goto(`/example/${example.id}`);
}
async function pullImage(): Promise {
@@ -76,10 +77,10 @@ async function gotoBuild(): Promise {
+ class="mr-2">More Details
{#if example?.state === 'pulled'}